177 ChartCanvas(wxFrame *frame,
int canvasIndex, wxWindow *nmea_log);
180 virtual void ReloadVP(
bool b_adjust =
true)
override;
185 bool Show(
bool show =
true)
override {
return wxWindow::Show(show); }
186 double GetCanvasRangeMeters()
override;
188 void SetCanvasRangeMeters(
double range)
override;
189 wxBitmap *GetScratchBitmap()
const override {
return pscratch_bm; }
190 void ResetGridFont()
override { m_pgridFont =
nullptr; }
191 void ResetGlGridFont()
override;
192 void EnablePaint(
bool b_enable)
override;
193 bool CanAccelerateGlPanning()
override;
194 void SetupGlCompression()
override;
196 void TriggerDeferredFocus()
override;
197 void Refresh(
bool eraseBackground =
true,
198 const wxRect *rect =
nullptr)
override;
199 wxWindow *GetWindow()
override {
return this; }
200 double GetScaleValue()
override {
return m_scaleValue; }
202 void SetupGlCanvas();
205 void OnKeyDown(wxKeyEvent &event);
206 void OnKeyUp(wxKeyEvent &event);
207 void OnKeyChar(wxKeyEvent &event);
208 void OnPaint(wxPaintEvent &event);
209 void OnToolLeftClick(wxCommandEvent &event);
211 void Scroll(
int dx,
int dy);
213 bool MouseEventOverlayWindows(wxMouseEvent &event);
214 bool MouseEventChartBar(wxMouseEvent &event);
215 bool MouseEventMUIBar(wxMouseEvent &event);
216 bool MouseEventToolbar(wxMouseEvent &event);
217 bool MouseEventIENCBar(wxMouseEvent &event);
219 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
220 bool MouseEventProcessObjects(wxMouseEvent &event);
237 void SetCanvasCursor(wxMouseEvent &event);
238 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
239 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
240#ifdef HAVE_WX_GESTURE_EVENTS
241 void OnZoom(wxZoomGestureEvent &event);
242 void OnLongPress(wxLongPressEvent &event);
243 void OnPressAndTap(wxPressAndTapEvent &event);
245 void OnLeftDown(wxMouseEvent &evt);
246 void OnLeftUp(wxMouseEvent &evt);
248 void OnRightUp(wxMouseEvent &event);
249 void OnRightDown(wxMouseEvent &event);
251 void OnDoubleLeftClick(wxMouseEvent &event);
253 void OnWheel(wxMouseEvent &event);
254 void OnMotion(wxMouseEvent &event);
257 void PopupMenuHandler(wxCommandEvent &event);
258 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
260 bool SetUserOwnship();
262 bool SetCursor(
const wxCursor &c)
override;
263 void Update()
override;
265 void LostMouseCapture(wxMouseCaptureLostEvent &event);
267 void CancelMouseRoute();
288 bool SetVPScale(
double sc,
bool b_refresh =
true);
289 bool SetVPProjection(
int projection);
298 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
314 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
315 double rotation,
int projection = 0,
bool b_adjust =
true,
316 bool b_refresh =
true);
317 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
319 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
320 void SetGroupIndex(
int index,
bool autoswitch =
false);
321 bool CheckGroup(
int igroup);
322 void canvasRefreshGroupIndex(
void);
323 void canvasChartsRefresh(
int dbi_hint);
325 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
327 void UpdateCanvasS52PLIBConfig();
329 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
330 void OnRouteFinishTimerEvent(wxTimerEvent &event);
332 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
333 void SetupCanvasQuiltMode(
void);
336 bool SetVPRotation(
double angle);
337 double GetVPRotation(
void) {
return GetVP().
rotation; }
338 double GetVPSkew(
void) {
return GetVP().
skew; }
339 double GetVPTilt(
void) {
return GetVP().
tilt; }
341 void ClearbFollow(
void);
342 void SetbFollow(
void);
343 void TogglebFollow(
void);
344 bool GetbFollow() {
return m_bFollow; }
347 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
348 void SetAbsoluteMinScale(
double min_scale);
349 std::shared_ptr<HostApi121::PiPointContext> GetCanvasContextAtPoint(
int x,
437 void WarpPointerDeferred(
int x,
int y);
441 void ToggleCPAWarn();
443 bool IsMeasureActive() {
return m_bMeasure_Active; }
444 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
447 int GetUpMode() {
return m_upMode; }
448 bool GetLookahead() {
return m_bLookAhead; }
451 void SetQuiltMode(
bool b_quilt);
452 bool GetQuiltMode(
void);
453 std::vector<int> GetQuiltIndexArray(
void);
454 bool IsQuiltDelta(
void);
455 void SetQuiltChartHiLiteIndex(
int dbIndex);
456 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
457 void ClearQuiltChartHiLiteIndexArray();
458 int GetQuiltReferenceChartIndex(
void);
459 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
460 void ConfigureChartBar();
462 int GetNextContextMenuId();
464 TCWin *getTCWin() {
return pCwin; }
466 bool StartTimedMovement(
bool stoptimer =
true);
467 void DoTimedMovement();
483 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
484 void DoTimedMovementVP();
485 void StopMovementVP();
487 void StartTimedMovementTarget();
488 void DoTimedMovementTarget();
489 void StopMovementTarget();
491 void SetColorScheme(ColorScheme cs);
492 ColorScheme GetColorScheme() {
return m_cs; }
494 void CanvasApplyLocale();
495 void RebuildCursors();
498 int GetCanvasWidth() {
return m_canvas_width; }
499 int GetCanvasHeight() {
return m_canvas_height; }
516 double GetCanvasTrueScale() {
return m_true_scale_ppm; }
517 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
518 ViewPort *GetpVP() {
return &VPoint; }
522 Piano *GetPiano() {
return m_Piano; }
523 int GetPianoHeight();
525 bool isRouteEditing(
void) {
526 return m_bRouteEditing && m_pRoutePointEditTarget;
528 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
530 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
531 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
533 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
534 bool GetbTCUpdate() {
return m_bTCupdate; }
535 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
536 bool GetbShowCurrent() {
return m_bShowCurrent; }
537 void SetbShowTide(
bool f) { m_bShowTide = f; }
538 bool GetbShowTide() {
return m_bShowTide; }
539 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
540 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
544 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
545 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
546 void GetCursorLatLon(
double *lat,
double *lon);
550 void StopAutoPan(
void);
551 bool IsOwnshipOnScreen();
552 void DisableQuiltAdjustOnZoom(
bool disable) {
553 m_disable_adjust_on_zoom = disable;
574 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
575 bool stoptimer =
true);
591 void RotateCanvas(
double dir);
592 void DoRotateCanvas(
double rotation);
593 void DoTiltCanvas(
double tilt);
595 void ShowAISTargetList(
void);
597 void ShowGoToPosition(
void);
598 void HideGlobalToolbar();
599 void ShowGlobalToolbar();
601 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
602 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
603 bool GetShowGrid() {
return m_bDisplayGrid; }
604 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
605 bool GetShowOutlines() {
return m_bShowOutlines; }
606 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
607 bool GetShowChartbar() {
return true; }
608 wxRect GetMUIBarRect();
609 void SetMUIBarPosition();
610 void DestroyMuiBar();
613 void ToggleChartOutlines(
void);
614 void ToggleCanvasQuiltMode(
void);
616 wxString GetScaleText() {
return m_scaleText; }
617 bool GetShowAIS() {
return m_bShowAIS; }
618 void SetShowAIS(
bool show);
619 bool GetAttenAIS() {
return m_bShowAISScaled; }
620 void SetAttenAIS(
bool show);
621 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
622 bool GetShowFocusBar() {
return m_show_focus_bar; }
623 MUIBar *GetMUIBar() {
return m_muiBar; }
624 void SetAlertString(wxString str) { m_alertString = str; }
625 wxString GetAlertString() {
return m_alertString; }
626 bool GetShowENCText() {
return m_encShowText; }
627 void SetShowENCText(
bool show);
629 bool GetShowENCDepth() {
return m_encShowDepth; }
630 void SetShowENCDepth(
bool show);
632 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
633 void SetShowENCLightDesc(
bool show);
635 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
636 void SetShowENCBuoyLabels(
bool show);
638 bool GetShowENCLights() {
return m_encShowLights; }
639 void SetShowENCLights(
bool show);
643 bool GetShowENCAnchor() {
return m_encShowAnchor; }
644 void SetShowENCAnchor(
bool show);
646 bool GetShowENCDataQual() {
return m_encShowDataQual; }
647 void SetShowENCDataQual(
bool show);
649 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
651 void ShowTides(
bool bShow);
652 void ShowCurrents(
bool bShow);
653 void SetUpMode(
int mode);
654 void ToggleLookahead();
655 void SetShowGPS(
bool show);
656 void UpdateFollowButtonState(
void);
658 bool IsTileOverlayIndexInYesShow(
int index);
659 bool IsTileOverlayIndexInNoShow(
int index);
660 void AddTileOverlayIndexToNoShow(
int index);
662 Route *m_pMouseRoute;
663 bool m_bMeasure_Active;
667 wxString FindValidUploadPort();
668 wxString m_active_upload_port;
676 int GetQuiltChartCount();
677 void InvalidateAllQuiltPatchs(
void);
678 void SetQuiltRefChart(
int dbIndex);
679 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
681 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
682 std::vector<int> &GetQuiltFullScreendbIndexArray();
683 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
684 int GetQuiltRefChartdbIndex(
void);
685 void InvalidateQuilt(
void);
686 double GetQuiltMaxErrorFactor();
687 bool IsChartQuiltableRef(
int db_index);
689 int GetCanvasChartNativeScale();
690 int FindClosestCanvasChartdbIndex(
int scale);
691 void UpdateCanvasOnGroupChange(
void);
693 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
694 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
695 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
696 void ShowTrackPropertiesDialog(
Track *selected);
721 void UpdateGPSCompassStatusBox(
bool b_force_new);
724 wxColour GetFogColor() {
return m_fog_color; }
726 void ShowChartInfoWindow(
int x,
int dbIndex);
727 void HideChartInfoWindow(
void);
728 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
729 const std::vector<int> &index_vector);
731 void StartMeasureRoute();
732 void CancelMeasureRoute();
734 bool DoCanvasUpdate(
void);
735 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
736 void SelectQuiltRefChart(
int selected_index);
737 double GetBestVPScale(
ChartBase *pchart);
738 void selectCanvasChartDisplay(
int type,
int family);
739 void RemoveChartFromQuilt(
int dbIndex);
741 void HandlePianoClick(
int selected_index,
742 const std::vector<int> &selected_dbIndex_array);
743 void HandlePianoRClick(
int x,
int y,
int selected_index,
744 const std::vector<int> &selected_dbIndex_array);
745 void HandlePianoRollover(
int selected_index,
746 const std::vector<int> &selected_dbIndex_array,
747 int n_charts,
int scale);
748 void ClearPianoRollover();
749 void UpdateCanvasControlBar(
void);
750 void FormatPianoKeys(
void);
751 void PianoPopupMenu(
int x,
int y,
int selected_index,
752 const std::vector<int> &selected_dbIndex_array);
753 void OnPianoMenuDisableChart(wxCommandEvent &event);
754 void OnPianoMenuEnableChart(wxCommandEvent &event);
756 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
757 bool DoCanvasCOGSet(
void);
758 void ApplyGlobalSettings();
759 void SetShowGPSCompassWindow(
bool bshow);
760 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
761 void FreezePiano() { m_pianoFrozen =
true; }
762 void ThawPiano() { m_pianoFrozen =
false; }
763 void StartChartDragInertia();
764 void SetupGridFont();
768 wxCursor *pCursorPencil;
769 wxCursor *pCursorArrow;
770 wxCursor *pCursorCross;
771 wxCursor *pPlugIn_Cursor;
773 bool m_brepaint_piano;
810 bool m_bShowNavobjects;
815#ifdef HAVE_WX_GESTURE_EVENTS
816 double m_oldVPSScale;
819 wxPoint m_zoomStartPoint;
822 void DrawBlinkObjects(
void);
824 void StartRoute(
void);
825 wxString FinishRoute(
void);
831 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
833 bool m_FinishRouteOnKillFocus;
834 bool m_bMeasure_DistCircle;
835 bool m_bAppendingRoute;
837 Route *m_pMeasureRoute;
838 wxWindow *parent_frame;
840 int GetMinAvailableGshhgQuality() {
841 return pWorldBackgroundChart->GetMinAvailableQuality();
843 int GetMaxAvailableGshhgQuality() {
844 return pWorldBackgroundChart->GetMaxAvailableQuality();
846 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
847 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
848 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
850 void SetAISCanvasDisplayStyle(
int StyleIndx);
851 void TouchAISToolActive(
void);
852 void UpdateAISTBTool(
void);
854 void SelectChartFromStack(
int index,
bool bDir =
false,
855 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
856 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
857 void SelectdbChart(
int dbindex);
859 void DoCanvasStackDelta(
int direction);
861 void ProcessNewGUIScale();
863 bool m_b_paint_enable;
865 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
866 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
868 std::vector<int> m_tile_noshow_index_array;
869 std::vector<int> m_tile_yesshow_index_array;
870 std::vector<int> m_quilt_noshow_index_array;
872 std::vector<int> GetQuiltNoshowIindexArray() {
873 return m_quilt_noshow_index_array;
885 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
890 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
914 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
916 int AdjustQuiltRefChart();
917 bool UpdateS52State();
918 void CallPopupMenu(
int x,
int y);
919 bool IsTempMenuBarEnabled();
920 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
921 void OnMenuTimer(wxTimerEvent &event);
926 wxBitmap *pscratch_bm;
928 void PositionConsole(
void);
929 wxWindow *m_nmea_log;
931 wxColour PredColor();
932 wxColour ShipColor();
934 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
935 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
936 wxPoint &GpsOffsetPixels,
937 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
938 float &scale_factor_y);
940 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
941 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
942 wxPoint2DDouble lGPSPoint);
950 wxString m_scaleText;
952 bool m_bShowScaleInStatusBar;
955 wxPoint LastShipPoint;
956 wxPoint LastPredPoint;
957 bool m_bDrawingRoute;
958 bool m_bRouteEditing;
960 bool m_bRoutePoinDragging;
962 bool m_bMayToggleMenuBar;
967 bool m_bChartDragging;
968 Route *m_pSelectedRoute;
969 Track *m_pSelectedTrack;
970 wxArrayPtrVoid *m_pEditRouteArray;
975 wxCursor *pCursorLeft;
976 wxCursor *pCursorRight;
978 wxCursor *pCursorDown;
980 wxCursor *pCursorUpLeft;
981 wxCursor *pCursorUpRight;
982 wxCursor *pCursorDownLeft;
983 wxCursor *pCursorDownRight;
987 wxBitmap *pThumbDIBShow;
988 wxBitmap *pThumbShowing;
990 bool bShowingCurrent;
999 double m_canvas_scale_factor;
1001 double m_pix_per_mm;
1002 double m_display_size_mm;
1004 double m_absolute_min_scale_ppm;
1006 bool singleClickEventIsValid;
1007 wxMouseEvent singleClickEvent;
1009 std::vector<s57Sector_t> extendedSectorLegs;
1010 wxFont m_overzoomFont;
1011 int m_overzoomTextWidth;
1012 int m_overzoomTextHeight;
1015 void OnActivate(wxActivateEvent &event);
1016 void OnSize(wxSizeEvent &event);
1017 void MouseTimedEvent(wxTimerEvent &event);
1018 void MouseEvent(wxMouseEvent &event);
1019 void ShipDraw(
ocpnDC &dc);
1020 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
1021 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
1022 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
1024 void RotateTimerEvent(wxTimerEvent &event);
1025 void PanTimerEvent(wxTimerEvent &event);
1026 void MovementTimerEvent(wxTimerEvent &);
1027 void MovementStopTimerEvent(wxTimerEvent &);
1028 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1030 void MovementVPTimerEvent(wxTimerEvent &event);
1032 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1033 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1034 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1035 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1036 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1037 void DrawAnchorWatchPoints(
ocpnDC &dc);
1038 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
1040 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
1041 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
1042 void RebuildTideSelectList(LLBBox &BBox);
1043 void RebuildCurrentSelectList(LLBBox &BBox);
1044 IDX_entry *FindBestCurrentObject(
double lat,
double lon);
1048 void RenderRouteLegs(
ocpnDC &dc);
1049 void RenderVisibleSectorLights(
ocpnDC &dc);
1051 void AlertDraw(
ocpnDC &dc);
1053 void GridDraw(
ocpnDC &dc);
1054 void ScaleBarDraw(
ocpnDC &dc);
1056 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
1057 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
1060 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
1061 const wxString &str, ColorScheme cs);
1062 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1063 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1065 void CreateOZEmbossMapData(ColorScheme cs);
1067 void SetOverzoomFont();
1074 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1075 void HandleNotificationMouseClick();
1081 int m_canvas_height;
1089 wxPoint m_last_touch_down_pos;
1090 bool m_ignore_next_leftup;
1101 wxTimer *pMovementStopTimer;
1103 wxTimer *pCurTrackTimer;
1105 wxTimer *pRotDefTimer;
1107 wxTimer *m_DoubleClickTimer;
1108 wxTimer m_routeFinishTimer;
1110 wxTimer m_RolloverPopupTimer;
1112 wxTimer m_VPMovementTimer;
1114 int m_wheelzoom_stop_oneshot;
1115 int m_last_wheel_dir;
1116 wxStopWatch m_wheelstopwatch;
1117 double m_zoom_target;
1119 int m_curtrack_timer_msec;
1120 int m_rollover_popup_timer_msec;
1125 wxBitmap *pss_overlay_bmp;
1126 wxMask *pss_overlay_mask;
1128 wxRect ship_draw_rect;
1129 wxRect ship_draw_last_rect;
1130 wxRect ais_draw_rect;
1131 wxRect alert_draw_rect;
1133 wxBitmap *proute_bm;
1134 wxMemoryDC m_dc_route;
1158 double m_true_scale_ppm;
1160 ownship_state_t m_ownship_state;
1164 wxBitmap m_bmTideDay;
1165 wxBitmap m_bmTideDusk;
1166 wxBitmap m_bmTideNight;
1167 wxBitmap m_bmCurrentDay;
1168 wxBitmap m_bmCurrentDusk;
1169 wxBitmap m_bmCurrentNight;
1170 wxBitmap m_cTideBitmap;
1171 wxBitmap m_cCurrentBitmap;
1179 wxImage m_os_image_red_day;
1180 wxImage m_os_image_red_dusk;
1181 wxImage m_os_image_red_night;
1182 wxImage m_os_image_grey_day;
1183 wxImage m_os_image_grey_dusk;
1184 wxImage m_os_image_grey_night;
1185 wxImage m_os_image_yellow_day;
1186 wxImage m_os_image_yellow_dusk;
1187 wxImage m_os_image_yellow_night;
1189 wxImage *m_pos_image_red;
1190 wxImage *m_pos_image_grey;
1191 wxImage *m_pos_image_yellow;
1193 wxImage *m_pos_image_user;
1194 wxImage *m_pos_image_user_grey;
1195 wxImage *m_pos_image_user_yellow;
1197 wxImage *m_pos_image_user_day;
1198 wxImage *m_pos_image_user_dusk;
1199 wxImage *m_pos_image_user_night;
1200 wxImage *m_pos_image_user_grey_day;
1201 wxImage *m_pos_image_user_grey_dusk;
1202 wxImage *m_pos_image_user_grey_night;
1203 wxImage *m_pos_image_user_yellow_day;
1204 wxImage *m_pos_image_user_yellow_dusk;
1205 wxImage *m_pos_image_user_yellow_night;
1207 wxImage m_ship_pix_image;
1209 bool m_cur_ship_pix_isgrey;
1210 ColorScheme m_ship_cs;
1213 wxBitmap *m_prot_bm;
1221 double m_wheel_lat, m_wheel_lon;
1222 int m_wheel_x, m_wheel_y;
1225 wxBitmap m_working_bm;
1226 wxBitmap m_cached_chart_bm;
1231 bool m_bzooming, m_bzooming_to_cursor;
1240 int m_panx, m_pany, m_modkeys;
1242 bool m_bmouse_key_mod;
1243 double m_zoom_factor, m_rotation_speed;
1251 wxDateTime m_last_movement_time;
1253 int m_AISRollover_MMSI;
1254 bool m_bsectors_shown;
1256 double m_displayed_scale_factor;
1258 wxColour m_fog_color;
1259 bool m_disable_edge_pan;
1260 wxFont *m_pgridFont;
1262 bool m_dragoffsetSet;
1266 double m_vLat, m_vLon;
1269 bool m_bpersistent_quilt;
1271 wxMenu *m_piano_ctx_menu;
1272 int menu_selected_dbIndex, menu_selected_index;
1280 bool m_mouseWasInCompass;
1282 wxRect m_mainlast_tb_rect;
1283 int m_restore_dbindex;
1284 int m_restore_group;
1287 wxSize m_muiBarHOSize;
1289 bool m_bShowOutlines;
1290 bool m_bDisplayGrid;
1291 bool m_bShowDepthUnits;
1293 bool m_bShowAISScaled;
1296 long m_s52StateHash;
1298 bool m_encShowDepth;
1299 bool m_encShowLightDesc;
1300 bool m_encShowBuoyLabels;
1301 int m_encDisplayCategory;
1302 bool m_encShowLights;
1303 bool m_encShowAnchor;
1304 bool m_encShowDataQual;
1306 wxTimer m_deferredFocusTimer;
1307 float m_focus_indicator_pix;
1311 double m_OSoffsetx, m_OSoffsety;
1312 bool m_MouseDragging;
1314 wxString m_alertString;
1315 wxRect m_scaleBarRect;
1316 bool m_bShowCompassWin;
1319 double m_sector_glat, m_sector_glon;
1320 std::vector<s57Sector_t> m_sectorlegsVisible;
1321 bool m_bShowVisibleSectors;
1323 double m_displayScale;
1324 bool m_show_focus_bar;
1326 double m_panx_target_final;
1327 double m_pany_target_final;
1328 double m_panx_target_now;
1329 double m_pany_target_now;
1331 double m_start_lat, m_start_lon;
1332 double m_target_lat, m_target_lon;
1333 double m_run_lat, m_run_lon;
1334 bool m_timed_move_vp_active;
1338 double meters_to_shift = 0;
1339 double dir_to_shift = 0;
1342 wxTimer m_chart_drag_inertia_timer;
1343 void OnChartDragInertiaTimer(wxTimerEvent &event);
1345 uint64_t m_last_drag_time;
1346 int m_chart_drag_total_x;
1347 int m_chart_drag_total_y;
1348 double m_chart_drag_total_time;
1349 double m_chart_drag_velocity_x;
1350 double m_chart_drag_velocity_y;
1351 wxLongLong m_chart_drag_inertia_time;
1352 wxLongLong m_chart_drag_inertia_start_time;
1353 bool m_chart_drag_inertia_active;
1354 double m_last_elapsed;
1355 std::vector<int> m_drag_vec_x;
1356 std::vector<int> m_drag_vec_y;
1357 std::vector<double> m_drag_vec_t;
1358 int m_inertia_last_drag_x;
1359 int m_inertia_last_drag_y;
1362 wxTimer m_easeTimer;
1363 wxLongLong m_animationStart;
1364 wxLongLong m_animationDuration;
1365 double m_startLat, m_startLon, m_startScale;
1366 double m_endLat, m_endLon, m_endScale;
1367 bool m_animationActive;
1368 void OnJumpEaseTimer(wxTimerEvent &event);
1369 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1370 bool m_disable_adjust_on_zoom;
1376 wxStopWatch m_sw_left_down;
1377 wxStopWatch m_sw_left_up;
1378 long m_sw_down_time;
1380 wxTimer m_tap_timer;
1381 wxPoint m_lastTapPos;
1383 void OnTapTimer(wxTimerEvent &event);
1385 uint64_t m_DragTriggerStartTime;
1387 DECLARE_EVENT_TABLE()