155 ChartCanvas(wxFrame *frame,
int canvasIndex, wxWindow *nmea_log);
158 void SetupGlCanvas();
161 void OnKeyDown(wxKeyEvent &event);
162 void OnKeyUp(wxKeyEvent &event);
163 void OnKeyChar(wxKeyEvent &event);
164 void OnPaint(wxPaintEvent &event);
166 void Scroll(
int dx,
int dy);
167 void ResetGridFont() { m_pgridFont =
nullptr; }
169 void OnToolLeftClick(wxCommandEvent &event);
171 bool MouseEventOverlayWindows(wxMouseEvent &event);
172 bool MouseEventChartBar(wxMouseEvent &event);
173 bool MouseEventMUIBar(wxMouseEvent &event);
174 bool MouseEventToolbar(wxMouseEvent &event);
175 bool MouseEventIENCBar(wxMouseEvent &event);
177 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
178 bool MouseEventProcessObjects(wxMouseEvent &event);
195 void SetCanvasCursor(wxMouseEvent &event);
196 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
197 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
198#ifdef HAVE_WX_GESTURE_EVENTS
199 void OnZoom(wxZoomGestureEvent &event);
200 void OnLongPress(wxLongPressEvent &event);
201 void OnPressAndTap(wxPressAndTapEvent &event);
203 void OnLeftDown(wxMouseEvent &evt);
204 void OnLeftUp(wxMouseEvent &evt);
206 void OnRightUp(wxMouseEvent &event);
207 void OnRightDown(wxMouseEvent &event);
209 void OnDoubleLeftClick(wxMouseEvent &event);
211 void OnWheel(wxMouseEvent &event);
212 void OnMotion(wxMouseEvent &event);
215 void PopupMenuHandler(wxCommandEvent &event);
216 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
218 bool SetUserOwnship();
220 double GetCanvasRangeMeters();
221 void SetCanvasRangeMeters(
double range);
223 void EnablePaint(
bool b_enable);
224 virtual bool SetCursor(
const wxCursor &c);
225 virtual void Refresh(
bool eraseBackground =
true,
226 const wxRect *rect = (
const wxRect *)NULL);
227 virtual void Update();
229 void LostMouseCapture(wxMouseCaptureLostEvent &event);
231 void CancelMouseRoute();
252 bool SetVPScale(
double sc,
bool b_refresh =
true);
253 bool SetVPProjection(
int projection);
262 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
278 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
279 double rotation,
int projection = 0,
bool b_adjust =
true,
280 bool b_refresh =
true);
281 void ReloadVP(
bool b_adjust =
true);
282 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
284 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
285 void SetGroupIndex(
int index,
bool autoswitch =
false);
286 bool CheckGroup(
int igroup);
287 void canvasRefreshGroupIndex(
void);
288 void canvasChartsRefresh(
int dbi_hint);
290 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
292 void UpdateCanvasS52PLIBConfig();
294 void TriggerDeferredFocus();
295 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
296 void OnRouteFinishTimerEvent(wxTimerEvent &event);
298 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
299 void SetupCanvasQuiltMode(
void);
302 bool SetVPRotation(
double angle);
303 double GetVPRotation(
void) {
return GetVP().
rotation; }
304 double GetVPSkew(
void) {
return GetVP().
skew; }
305 double GetVPTilt(
void) {
return GetVP().
tilt; }
307 void ClearbFollow(
void);
308 void SetbFollow(
void);
309 void TogglebFollow(
void);
310 bool GetbFollow() {
return m_bFollow; }
313 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
400 void WarpPointerDeferred(
int x,
int y);
404 void ToggleCPAWarn();
406 bool IsMeasureActive() {
return m_bMeasure_Active; }
407 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
410 int GetUpMode() {
return m_upMode; }
411 bool GetLookahead() {
return m_bLookAhead; }
414 void SetQuiltMode(
bool b_quilt);
415 bool GetQuiltMode(
void);
416 std::vector<int> GetQuiltIndexArray(
void);
417 bool IsQuiltDelta(
void);
418 void SetQuiltChartHiLiteIndex(
int dbIndex);
419 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
420 void ClearQuiltChartHiLiteIndexArray();
421 int GetQuiltReferenceChartIndex(
void);
422 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
423 void ConfigureChartBar();
425 int GetNextContextMenuId();
427 TCWin *getTCWin() {
return pCwin; }
429 bool StartTimedMovement(
bool stoptimer =
true);
430 void DoTimedMovement();
446 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
447 void DoTimedMovementVP();
448 void StopMovementVP();
450 void StartTimedMovementTarget();
451 void DoTimedMovementTarget();
452 void StopMovementTarget();
454 void SetColorScheme(ColorScheme cs);
455 ColorScheme GetColorScheme() {
return m_cs; }
457 void CanvasApplyLocale();
458 void RebuildCursors();
461 int GetCanvasWidth() {
return m_canvas_width; }
462 int GetCanvasHeight() {
return m_canvas_height; }
481 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
482 ViewPort *GetpVP() {
return &VPoint; }
486 Piano *GetPiano() {
return m_Piano; }
487 int GetPianoHeight();
489 bool isRouteEditing(
void) {
490 return m_bRouteEditing && m_pRoutePointEditTarget;
492 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
494 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
495 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
497 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
498 bool GetbTCUpdate() {
return m_bTCupdate; }
499 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
500 bool GetbShowCurrent() {
return m_bShowCurrent; }
501 void SetbShowTide(
bool f) { m_bShowTide = f; }
502 bool GetbShowTide() {
return m_bShowTide; }
503 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
504 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
508 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
509 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
510 void GetCursorLatLon(
double *lat,
double *lon);
514 void StopAutoPan(
void);
534 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
535 bool stoptimer =
true);
550 void RotateCanvas(
double dir);
551 void DoRotateCanvas(
double rotation);
552 void DoTiltCanvas(
double tilt);
554 void ShowAISTargetList(
void);
556 void ShowGoToPosition(
void);
557 void HideGlobalToolbar();
558 void ShowGlobalToolbar();
560 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
561 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
562 bool GetShowGrid() {
return m_bDisplayGrid; }
563 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
564 bool GetShowOutlines() {
return m_bShowOutlines; }
565 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
566 bool GetShowChartbar() {
return true; }
567 wxRect GetMUIBarRect();
568 void SetMUIBarPosition();
569 void DestroyMuiBar();
572 void ToggleChartOutlines(
void);
573 void ToggleCanvasQuiltMode(
void);
575 wxString GetScaleText() {
return m_scaleText; }
576 double GetScaleValue() {
return m_scaleValue; }
577 bool GetShowAIS() {
return m_bShowAIS; }
578 void SetShowAIS(
bool show);
579 bool GetAttenAIS() {
return m_bShowAISScaled; }
580 void SetAttenAIS(
bool show);
581 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
582 bool GetShowFocusBar() {
return m_show_focus_bar; }
583 MUIBar *GetMUIBar() {
return m_muiBar; }
584 void SetAlertString(wxString str) { m_alertString = str; }
585 wxString GetAlertString() {
return m_alertString; }
586 bool GetShowENCText() {
return m_encShowText; }
587 void SetShowENCText(
bool show);
589 bool GetShowENCDepth() {
return m_encShowDepth; }
590 void SetShowENCDepth(
bool show);
592 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
593 void SetShowENCLightDesc(
bool show);
595 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
596 void SetShowENCBuoyLabels(
bool show);
598 bool GetShowENCLights() {
return m_encShowLights; }
599 void SetShowENCLights(
bool show);
604 bool GetShowENCAnchor() {
return m_encShowAnchor; }
605 void SetShowENCAnchor(
bool show);
607 bool GetShowENCDataQual() {
return m_encShowDataQual; }
608 void SetShowENCDataQual(
bool show);
610 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
612 void ShowTides(
bool bShow);
613 void ShowCurrents(
bool bShow);
614 void SetUpMode(
int mode);
615 void ToggleLookahead();
616 void SetShowGPS(
bool show);
617 void UpdateFollowButtonState(
void);
619 bool IsTileOverlayIndexInYesShow(
int index);
620 bool IsTileOverlayIndexInNoShow(
int index);
621 void AddTileOverlayIndexToNoShow(
int index);
623 Route *m_pMouseRoute;
624 bool m_bMeasure_Active;
628 wxString FindValidUploadPort();
629 wxString m_active_upload_port;
637 int GetQuiltChartCount();
638 void InvalidateAllQuiltPatchs(
void);
639 void SetQuiltRefChart(
int dbIndex);
640 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
642 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
643 std::vector<int> &GetQuiltFullScreendbIndexArray();
644 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
645 int GetQuiltRefChartdbIndex(
void);
646 void InvalidateQuilt(
void);
647 double GetQuiltMaxErrorFactor();
648 bool IsChartQuiltableRef(
int db_index);
650 int GetCanvasChartNativeScale();
651 int FindClosestCanvasChartdbIndex(
int scale);
652 void UpdateCanvasOnGroupChange(
void);
654 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
655 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
656 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
657 void ShowTrackPropertiesDialog(
Track *selected);
658 void DrawTCWindow(
int x,
int y,
void *pIDX);
660 void UpdateGPSCompassStatusBox(
bool b_force_new);
663 wxColour GetFogColor() {
return m_fog_color; }
665 void ShowChartInfoWindow(
int x,
int dbIndex);
666 void HideChartInfoWindow(
void);
667 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
668 const std::vector<int> &index_vector);
670 void StartMeasureRoute();
671 void CancelMeasureRoute();
673 bool DoCanvasUpdate(
void);
674 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
675 void SelectQuiltRefChart(
int selected_index);
676 double GetBestVPScale(
ChartBase *pchart);
677 void selectCanvasChartDisplay(
int type,
int family);
678 void RemoveChartFromQuilt(
int dbIndex);
680 void HandlePianoClick(
int selected_index,
681 const std::vector<int> &selected_dbIndex_array);
682 void HandlePianoRClick(
int x,
int y,
int selected_index,
683 const std::vector<int> &selected_dbIndex_array);
684 void HandlePianoRollover(
int selected_index,
685 const std::vector<int> &selected_dbIndex_array,
686 int n_charts,
int scale);
687 void ClearPianoRollover();
688 void UpdateCanvasControlBar(
void);
689 void FormatPianoKeys(
void);
690 void PianoPopupMenu(
int x,
int y,
int selected_index,
691 const std::vector<int> &selected_dbIndex_array);
692 void OnPianoMenuDisableChart(wxCommandEvent &event);
693 void OnPianoMenuEnableChart(wxCommandEvent &event);
695 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
696 bool DoCanvasCOGSet(
void);
697 void ApplyGlobalSettings();
698 void SetShowGPSCompassWindow(
bool bshow);
699 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
700 void FreezePiano() { m_pianoFrozen =
true; }
701 void ThawPiano() { m_pianoFrozen =
false; }
702 void StartChartDragInertia();
703 void SetupGridFont();
707 wxCursor *pCursorPencil;
708 wxCursor *pCursorArrow;
709 wxCursor *pCursorCross;
710 wxCursor *pPlugIn_Cursor;
712 wxBitmap *pscratch_bm;
713 bool m_brepaint_piano;
750 bool m_bShowNavobjects;
755#ifdef HAVE_WX_GESTURE_EVENTS
756 double m_oldVPSScale;
759 wxPoint m_zoomStartPoint;
762 void DrawBlinkObjects(
void);
764 void StartRoute(
void);
765 void FinishRoute(
void);
771 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
773 bool m_FinishRouteOnKillFocus;
774 bool m_bMeasure_DistCircle;
775 bool m_bAppendingRoute;
777 Route *m_pMeasureRoute;
780 int GetMinAvailableGshhgQuality() {
781 return pWorldBackgroundChart->GetMinAvailableQuality();
783 int GetMaxAvailableGshhgQuality() {
784 return pWorldBackgroundChart->GetMaxAvailableQuality();
786 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
787 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
788 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
790 void SetAISCanvasDisplayStyle(
int StyleIndx);
791 void TouchAISToolActive(
void);
792 void UpdateAISTBTool(
void);
794 void SelectChartFromStack(
int index,
bool bDir =
false,
795 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
796 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
797 void SelectdbChart(
int dbindex);
799 void DoCanvasStackDelta(
int direction);
801 void ProcessNewGUIScale();
803 bool m_b_paint_enable;
805 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
806 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
808 std::vector<int> m_tile_noshow_index_array;
809 std::vector<int> m_tile_yesshow_index_array;
810 std::vector<int> m_quilt_noshow_index_array;
812 std::vector<int> GetQuiltNoshowIindexArray() {
813 return m_quilt_noshow_index_array;
825 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
842 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
844 int AdjustQuiltRefChart();
846 bool UpdateS52State();
848 void CallPopupMenu(
int x,
int y);
850 bool IsTempMenuBarEnabled();
851 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
854 void PositionConsole(
void);
855 wxWindow *m_nmea_log;
857 wxColour PredColor();
858 wxColour ShipColor();
860 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
861 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
862 wxPoint &GpsOffsetPixels,
863 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
864 float &scale_factor_y);
866 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
867 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
868 wxPoint2DDouble lGPSPoint);
876 wxString m_scaleText;
878 bool m_bShowScaleInStatusBar;
881 wxPoint LastShipPoint;
882 wxPoint LastPredPoint;
883 bool m_bDrawingRoute;
884 bool m_bRouteEditing;
886 bool m_bRoutePoinDragging;
888 bool m_bMayToggleMenuBar;
893 bool m_bChartDragging;
894 Route *m_pSelectedRoute;
895 Track *m_pSelectedTrack;
896 wxArrayPtrVoid *m_pEditRouteArray;
901 wxCursor *pCursorLeft;
902 wxCursor *pCursorRight;
904 wxCursor *pCursorDown;
906 wxCursor *pCursorUpLeft;
907 wxCursor *pCursorUpRight;
908 wxCursor *pCursorDownLeft;
909 wxCursor *pCursorDownRight;
913 wxBitmap *pThumbDIBShow;
914 wxBitmap *pThumbShowing;
916 bool bShowingCurrent;
925 double m_canvas_scale_factor;
928 double m_display_size_mm;
930 double m_absolute_min_scale_ppm;
932 bool singleClickEventIsValid;
933 wxMouseEvent singleClickEvent;
935 std::vector<s57Sector_t> extendedSectorLegs;
936 wxFont m_overzoomFont;
937 int m_overzoomTextWidth;
938 int m_overzoomTextHeight;
941 void OnActivate(wxActivateEvent &event);
942 void OnSize(wxSizeEvent &event);
943 void MouseTimedEvent(wxTimerEvent &event);
944 void MouseEvent(wxMouseEvent &event);
945 void ShipDraw(
ocpnDC &dc);
946 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
947 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
948 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
950 void RotateTimerEvent(wxTimerEvent &event);
951 void PanTimerEvent(wxTimerEvent &event);
952 void MovementTimerEvent(wxTimerEvent &);
953 void MovementStopTimerEvent(wxTimerEvent &);
954 void OnCursorTrackTimerEvent(wxTimerEvent &event);
956 void MovementVPTimerEvent(wxTimerEvent &event);
958 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
959 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
960 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
961 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
962 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
963 void DrawAnchorWatchPoints(
ocpnDC &dc);
964 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
966 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
967 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
968 void RebuildTideSelectList(LLBBox &BBox);
969 void RebuildCurrentSelectList(LLBBox &BBox);
973 void RenderRouteLegs(
ocpnDC &dc);
974 void RenderVisibleSectorLights(
ocpnDC &dc);
976 void AlertDraw(
ocpnDC &dc);
978 void GridDraw(
ocpnDC &dc);
979 void ScaleBarDraw(
ocpnDC &dc);
981 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
982 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
985 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
986 const wxString &str, ColorScheme cs);
987 void CreateDepthUnitEmbossMaps(ColorScheme cs);
988 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
990 void CreateOZEmbossMapData(ColorScheme cs);
992 void SetOverzoomFont();
999 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1000 void HandleNotificationMouseClick();
1006 int m_canvas_height;
1024 wxTimer *pMovementStopTimer;
1026 wxTimer *pCurTrackTimer;
1028 wxTimer *pRotDefTimer;
1030 wxTimer *m_DoubleClickTimer;
1031 wxTimer m_routeFinishTimer;
1033 wxTimer m_RolloverPopupTimer;
1035 wxTimer m_VPMovementTimer;
1037 int m_wheelzoom_stop_oneshot;
1038 int m_last_wheel_dir;
1039 wxStopWatch m_wheelstopwatch;
1040 double m_zoom_target;
1042 int m_curtrack_timer_msec;
1043 int m_rollover_popup_timer_msec;
1048 wxBitmap *pss_overlay_bmp;
1049 wxMask *pss_overlay_mask;
1051 wxRect ship_draw_rect;
1052 wxRect ship_draw_last_rect;
1053 wxRect ais_draw_rect;
1054 wxRect alert_draw_rect;
1056 wxBitmap *proute_bm;
1057 wxMemoryDC m_dc_route;
1081 double m_true_scale_ppm;
1083 ownship_state_t m_ownship_state;
1087 wxBitmap m_bmTideDay;
1088 wxBitmap m_bmTideDusk;
1089 wxBitmap m_bmTideNight;
1090 wxBitmap m_bmCurrentDay;
1091 wxBitmap m_bmCurrentDusk;
1092 wxBitmap m_bmCurrentNight;
1093 wxBitmap m_cTideBitmap;
1094 wxBitmap m_cCurrentBitmap;
1102 wxImage m_os_image_red_day;
1103 wxImage m_os_image_red_dusk;
1104 wxImage m_os_image_red_night;
1105 wxImage m_os_image_grey_day;
1106 wxImage m_os_image_grey_dusk;
1107 wxImage m_os_image_grey_night;
1108 wxImage m_os_image_yellow_day;
1109 wxImage m_os_image_yellow_dusk;
1110 wxImage m_os_image_yellow_night;
1112 wxImage *m_pos_image_red;
1113 wxImage *m_pos_image_grey;
1114 wxImage *m_pos_image_yellow;
1116 wxImage *m_pos_image_user;
1117 wxImage *m_pos_image_user_grey;
1118 wxImage *m_pos_image_user_yellow;
1120 wxImage *m_pos_image_user_day;
1121 wxImage *m_pos_image_user_dusk;
1122 wxImage *m_pos_image_user_night;
1123 wxImage *m_pos_image_user_grey_day;
1124 wxImage *m_pos_image_user_grey_dusk;
1125 wxImage *m_pos_image_user_grey_night;
1126 wxImage *m_pos_image_user_yellow_day;
1127 wxImage *m_pos_image_user_yellow_dusk;
1128 wxImage *m_pos_image_user_yellow_night;
1130 wxImage m_ship_pix_image;
1132 bool m_cur_ship_pix_isgrey;
1133 ColorScheme m_ship_cs;
1136 wxBitmap *m_prot_bm;
1144 double m_wheel_lat, m_wheel_lon;
1145 int m_wheel_x, m_wheel_y;
1148 wxBitmap m_working_bm;
1149 wxBitmap m_cached_chart_bm;
1154 bool m_bzooming, m_bzooming_to_cursor;
1163 int m_panx, m_pany, m_modkeys;
1165 bool m_bmouse_key_mod;
1166 double m_zoom_factor, m_rotation_speed;
1174 wxDateTime m_last_movement_time;
1176 int m_AISRollover_MMSI;
1177 bool m_bsectors_shown;
1179 double m_displayed_scale_factor;
1181 wxColour m_fog_color;
1182 bool m_disable_edge_pan;
1183 wxFont *m_pgridFont;
1185 bool m_dragoffsetSet;
1189 double m_vLat, m_vLon;
1192 bool m_bpersistent_quilt;
1194 wxMenu *m_piano_ctx_menu;
1195 int menu_selected_dbIndex, menu_selected_index;
1200 wxRect m_mainlast_tb_rect;
1201 int m_restore_dbindex;
1202 int m_restore_group;
1205 wxSize m_muiBarHOSize;
1207 bool m_bShowOutlines;
1208 bool m_bDisplayGrid;
1209 bool m_bShowDepthUnits;
1211 bool m_bShowAISScaled;
1214 long m_s52StateHash;
1216 bool m_encShowDepth;
1217 bool m_encShowLightDesc;
1218 bool m_encShowBuoyLabels;
1219 int m_encDisplayCategory;
1220 bool m_encShowLights;
1221 bool m_encShowAnchor;
1222 bool m_encShowDataQual;
1224 wxTimer m_deferredFocusTimer;
1225 float m_focus_indicator_pix;
1229 double m_OSoffsetx, m_OSoffsety;
1230 bool m_MouseDragging;
1232 wxString m_alertString;
1233 wxRect m_scaleBarRect;
1234 bool m_bShowCompassWin;
1237 double m_sector_glat, m_sector_glon;
1238 std::vector<s57Sector_t> m_sectorlegsVisible;
1239 bool m_bShowVisibleSectors;
1241 double m_displayScale;
1242 bool m_show_focus_bar;
1244 double m_panx_target_final;
1245 double m_pany_target_final;
1246 double m_panx_target_now;
1247 double m_pany_target_now;
1249 double m_start_lat, m_start_lon;
1250 double m_target_lat, m_target_lon;
1251 double m_run_lat, m_run_lon;
1252 bool m_timed_move_vp_active;
1256 double meters_to_shift = 0;
1257 double dir_to_shift = 0;
1260 wxTimer m_chart_drag_inertia_timer;
1261 void OnChartDragInertiaTimer(wxTimerEvent &event);
1263 uint64_t m_last_drag_time;
1264 int m_chart_drag_total_x;
1265 int m_chart_drag_total_y;
1266 double m_chart_drag_total_time;
1267 double m_chart_drag_velocity_x;
1268 double m_chart_drag_velocity_y;
1269 wxLongLong m_chart_drag_inertia_time;
1270 wxLongLong m_chart_drag_inertia_start_time;
1271 bool m_chart_drag_inertia_active;
1272 double m_last_elapsed;
1273 std::vector<int> m_drag_vec_x;
1274 std::vector<int> m_drag_vec_y;
1275 std::vector<double> m_drag_vec_t;
1276 int m_inertia_last_drag_x;
1277 int m_inertia_last_drag_y;
1280 wxTimer m_easeTimer;
1281 wxLongLong m_animationStart;
1282 wxLongLong m_animationDuration;
1283 double m_startLat, m_startLon, m_startScale;
1284 double m_endLat, m_endLon, m_endScale;
1285 bool m_animationActive;
1286 void OnJumpEaseTimer(wxTimerEvent &event);
1287 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1292 DECLARE_EVENT_TABLE()