93 std::function<bool()> confirm_delete_ais_mob;
94 std::function<wxColour(wxString)> get_global_colour;
95 std::function<void()> show_with_fresh_fonts;
96 std::function<void()> clear_console_background;
97 std::function<void()> route_mgr_dlg_update_list_ctrl;
100 : confirm_delete_ais_mob([]() {
return true; }),
101 get_global_colour([](wxString c) {
return *wxBLACK; }),
102 show_with_fresh_fonts([]() {}),
103 clear_console_background([]() {}),
104 route_mgr_dlg_update_list_ctrl([]() {}) {}
119 bool DeleteTrack(
Track *pTrack);
121 void DeleteAllRoutes();
123 bool IsRouteValid(
Route *pRoute);
125 Route *FindRouteByGUID(
const wxString &guid);
126 Track *FindTrackByGUID(
const wxString &guid);
128 Route *FindRouteContainingWaypoint(
const std::string &guid);
143 bool DoesRouteContainSharedPoints(
Route *pRoute);
144 void RemovePointFromRoute(
RoutePoint *point,
Route *route,
int route_state);
208 double cog,
double sog);
210 bool UpdateAutopilot();
211 bool DeactivateRoute(
bool b_arrival =
false);
212 bool IsAnyRouteActive(
void) {
return (pActiveRoute != NULL); }
213 bool GetArrival() {
return m_bArrival; }
215 Route *GetpActiveRoute() {
return pActiveRoute; }
216 RoutePoint *GetpActiveRouteSegmentBeginPoint() {
217 return pActiveRouteSegmentBeginPoint;
220 RoutePoint *GetpActivePoint() {
return pActivePoint; }
221 double GetCurrentRngToActivePoint() {
return CurrentRngToActivePoint; }
222 double GetCurrentBrgToActivePoint() {
return CurrentBrgToActivePoint; }
223 double GetCurrentRngToActiveNormalArrival() {
224 return CurrentRangeToActiveNormalCrossing;
226 double GetCurrentXTEToActivePoint() {
return CurrentXTEToActivePoint; }
227 void ZeroCurrentXTEToActivePoint();
228 double GetCurrentSegmentCourse() {
return CurrentSegmentCourse; }
229 int GetXTEDir() {
return XTEDir; }
231 void SetColorScheme(ColorScheme cs,
double displayDPmm);
232 wxPen *GetRoutePen(
void) {
return m_pRoutePen; }
233 wxPen *GetTrackPen(
void) {
return m_pTrackPen; }
234 wxPen *GetSelectedRoutePen(
void) {
return m_pSelectedRoutePen; }
235 wxPen *GetActiveRoutePen(
void) {
return m_pActiveRoutePen; }
236 wxPen *GetActiveRoutePointPen(
void) {
return m_pActiveRoutePointPen; }
237 wxPen *GetRoutePointPen(
void) {
return m_pRoutePointPen; }
238 wxBrush *GetRouteBrush(
void) {
return m_pRouteBrush; }
239 wxBrush *GetSelectedRouteBrush(
void) {
return m_pSelectedRouteBrush; }
240 wxBrush *GetActiveRouteBrush(
void) {
return m_pActiveRouteBrush; }
241 wxBrush *GetActiveRoutePointBrush(
void) {
return m_pActiveRoutePointBrush; }
242 wxBrush *GetRoutePointBrush(
void) {
return m_pRoutePointBrush; }
244 wxString GetRouteReverseMessage(
void);
245 wxString GetRouteResequenceMessage(
void);
246 struct RoutemanDlgCtx &GetDlgContext() {
return m_route_dlg_ctx; }
247 NMEA0183 GetNMEA0183() {
return m_NMEA0183; }
249 std::vector<DriverHandle> GetOutpuDriverArray() {
return m_output_drivers; }
270 double RouteBrgToActivePoint;
271 double CurrentSegmentBeginLat;
272 double CurrentSegmentBeginLon;
273 double CurrentRngToActivePoint;
274 double CurrentBrgToActivePoint;
275 double CurrentXTEToActivePoint;
276 double CourseToRouteSegment;
277 double CurrentRangeToActiveNormalCrossing;
280 double CurrentSegmentCourse;
285 wxPen *m_pSelectedRoutePen;
286 wxPen *m_pActiveRoutePen;
287 wxPen *m_pActiveRoutePointPen;
288 wxPen *m_pRoutePointPen;
289 wxBrush *m_pRouteBrush;
290 wxBrush *m_pSelectedRouteBrush;
291 wxBrush *m_pActiveRouteBrush;
292 wxBrush *m_pActiveRoutePointBrush;
293 wxBrush *m_pRoutePointBrush;
297 double m_arrival_min;
304 std::vector<DriverHandle> m_output_drivers;
305 bool m_have_n0183_out;
306 bool m_have_n2000_out;
321 wxBitmap *GetIconBitmap(
const wxString &icon_key)
const;
322 bool GetIconPrescaled(
const wxString &icon_key)
const;
323 int GetIconIndex(
const wxBitmap *pbm)
const;
324 int GetIconImageListIndex(
const wxBitmap *pbm)
const;
332 int GetNumIcons(
void) {
return m_pIconArray->Count(); }
334 RoutePoint *FindWaypointByGuid(
const std::string &guid);
335 RoutePoint *GetNearbyWaypoint(
double lat,
double lon,
double radius_meters);
336 RoutePoint *GetOtherNearbyWaypoint(
double lat,
double lon,
337 double radius_meters,
338 const wxString &guid);
340 bool SharedWptsExist();
341 void DeleteAllWaypoints(
bool b_delete_used);
342 RoutePoint *FindRoutePointByGUID(
const wxString &guid);
343 void DestroyWaypoint(
RoutePoint *pRp,
bool b_update_changeset =
true);
344 void ClearRoutePointFonts(
void);
346 bool DoesIconExist(
const wxString &icon_key)
const;
347 wxBitmap GetIconBitmapForList(
int index,
int height)
const;
348 wxString *GetIconDescription(
int index)
const;
349 wxString *GetIconKey(
int index)
const;
350 wxString GetIconDescription(wxString icon_key)
const;
352 wxImageList *Getpmarkicon_image_list(
int nominal_height);
368 const RoutePointList *GetWaypointList(
void) {
return m_pWayPointList; }
371 wxImage CreateDimImage(wxImage &image,
double factor);
373 RoutePointList *m_pWayPointList;
374 wxBitmap *CreateDimBitmap(wxBitmap *pBitmap,
double factor);
376 wxImageList *pmarkicon_image_list;
378 int m_markicon_image_list_base_count;
379 ArrayOfMarkIcon *m_pIconArray;
382 double m_iconListScale;
384 SortedArrayOfMarkIcon *m_pLegacyIconArray;
385 SortedArrayOfMarkIcon *m_pExtendedIconArray;
387 int m_bitmapSizeForList;
388 int m_iconListHeight;
390 GlobalColourFunc m_get_global_colour;