24#ifndef _ROUTEPOINT_H__
25#define _ROUTEPOINT_H__
28#include <wx/clrpicker.h>
29#include <wx/datetime.h>
39#define MAX_INT_VAL 2147483647
44#define ETA_FORMAT_STR "%x %H:%M"
52 RoutePoint(
double lat,
double lon,
const wxString &icon_ident,
53 const wxString &name,
const wxString &pGUID = wxEmptyString,
54 bool bAddToList =
true);
58 void ReLoadIcon() { m_IconIsDirty =
true; }
60 void SetPosition(
double lat,
double lon);
61 double GetLatitude() {
return m_lat; };
62 double GetLongitude() {
return m_lon; };
63 LLBBox &GetBBox() {
return m_wpBBox; }
66 bool IsVisible() {
return m_bIsVisible; }
67 bool IsListed() {
return m_bIsListed; }
68 bool IsNameShown() {
return m_bShowName; }
70 bool IsShared() {
return m_bsharedMark; }
71 void SetShared(
bool bshared) { m_bsharedMark = bshared; }
73 bool IsSharedInVisibleRoute(
void);
75 bool IsVisibleSelectable(
double scale_val,
bool boverrideViz =
false);
76 void SetVisible(
bool viz =
true) { m_bIsVisible = viz; }
77 void SetListed(
bool viz =
true) { m_bIsListed = viz; }
78 void SetNameShown(
bool viz =
true) { m_bShowName = viz; }
79 bool GetNameShown() {
return m_bShowName; }
80 virtual wxString GetName(
void) {
return m_MarkName; }
81 wxString GetDescription(
void) {
return m_MarkDescription; }
83 wxDateTime GetCreateTime(
void);
84 void SetCreateTime(wxDateTime dt);
86 wxString GetIconName(
void) {
return m_IconName; }
87 void SetIconName(wxString name) { m_IconName = name; }
89 void *GetSelectNode(
void) {
return m_SelectNode; }
90 void SetSelectNode(
void *node) { m_SelectNode = node; }
92 void *GetManagerListNode(
void) {
return m_ManagerNode; }
93 void SetManagerListNode(
void *node) { m_ManagerNode = node; }
95 void SetName(
const wxString &name);
96 void CalculateNameExtents(
void);
98 void SetCourse(
double course) { m_routeprop_course = course; };
99 double GetCourse() {
return m_routeprop_course; };
100 void SetDistance(
double distance) { m_routeprop_distance = distance; };
101 double GetDistance() {
return m_routeprop_distance; };
103 void SetWaypointArrivalRadius(
double dArrivalDistance) {
104 m_WaypointArrivalRadius = dArrivalDistance;
106 void SetWaypointArrivalRadius(wxString wxArrivalDistance) {
107 wxArrivalDistance.ToDouble(&m_WaypointArrivalRadius);
109 double GetWaypointArrivalRadius();
110 bool GetShowWaypointRangeRings(
void) {
return m_bShowWaypointRangeRings; };
111 int GetWaypointRangeRingsNumber(
void);
112 float GetWaypointRangeRingsStep(
void);
113 int GetWaypointRangeRingsStepUnits(
void);
114 wxColour GetWaypointRangeRingsColour(
void);
115 void SetShowWaypointRangeRings(
bool b_showWaypointRangeRings) {
116 m_bShowWaypointRangeRings = b_showWaypointRangeRings;
118 void SetWaypointRangeRingsNumber(
int i_WaypointRangeRingsNumber) {
119 m_iWaypointRangeRingsNumber = i_WaypointRangeRingsNumber;
121 void SetWaypointRangeRingsStep(
float f_WaypointRangeRingsStep) {
122 m_fWaypointRangeRingsStep = f_WaypointRangeRingsStep;
124 void SetWaypointRangeRingsStepUnits(
int i_WaypointRangeRingsStepUnits) {
125 m_iWaypointRangeRingsStepUnits = i_WaypointRangeRingsStepUnits;
127 void SetWaypointRangeRingsColour(wxColour wxc_WaypointRangeRingsColour) {
128 m_wxcWaypointRangeRingsColour = wxc_WaypointRangeRingsColour;
130 void SetScaMin(wxString str);
131 void SetScaMin(
long val);
132 long GetScaMin() {
return m_ScaMin; };
133 void SetScaMax(wxString str);
134 void SetScaMax(
long val);
135 long GetScaMax() {
return m_ScaMax; };
136 bool GetUseSca() {
return b_UseScamin; };
137 void SetUseSca(
bool value) { b_UseScamin = value; };
138 bool IsDragHandleEnabled() {
return m_bDrawDragHandle; }
139 void SetPlannedSpeed(
double spd);
140 double GetPlannedSpeed();
142 wxDateTime GetManualETD();
143 void SetETD(
const wxDateTime &etd);
144 bool SetETD(
const wxString &ts);
147 void SetETE(wxLongLong secs);
153 wxDateTime m_seg_etd;
154 wxDateTime m_seg_eta;
155 wxLongLong m_seg_ete = 0;
156 bool m_manual_etd{
false};
158 bool m_bPtIsSelected;
159 bool m_bRPIsBeingEdited;
162 bool m_bIsolatedMark;
168 wxString m_MarkDescription;
171 wxString m_TideStation;
174 wxColour m_FontColor;
176 wxSize m_NameExtents;
180 bool m_bShowName, m_bShowNameData;
181 wxRect CurrentRect_in_DC;
182 int m_NameLocationOffsetX;
183 int m_NameLocationOffsetY;
187 double m_routeprop_course;
189 double m_routeprop_distance;
194 bool m_bShowWaypointRangeRings;
195 int m_iWaypointRangeRingsNumber;
197 float m_fWaypointRangeRingsStep;
198 int m_iWaypointRangeRingsStepUnits;
199 wxColour m_wxcWaypointRangeRingsColour;
203 bool use_cached_screen_coords =
false,
bool bVizOverride =
false);
204 unsigned int m_iTextTexture;
205 int m_iTextTextureWidth, m_iTextTextureHeight;
208 double m_wpBBox_view_scale_ppm, m_wpBBox_rotation;
210 bool m_pos_on_screen;
211 wxPoint2DDouble m_screen_pos;
214 double m_WaypointArrivalRadius;
215 HyperlinkList *m_HyperlinkList;
217 wxString m_timestring;
219 wxDateTime m_CreateTimeX;
230 float m_IconScaleFactor;
231 wxBitmap m_ScaledBMP;
233 bool m_bDrawDragHandle;
235 int m_drag_line_length_man, m_drag_icon_offset;
236 double m_dragHandleLat, m_dragHandleLon;
237 int m_draggingOffsetx, m_draggingOffsety;
241 double m_PlannedSpeed;
247 unsigned int m_dragIconTexture;
248 int m_dragIconTextureWidth, m_dragIconTextureHeight;