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 bool SetCursor(
const wxCursor &c)
override;
225 void Refresh(
bool eraseBackground =
true,
226 const wxRect *rect =
nullptr)
override;
227 void Update()
override;
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; }
314 void SetAbsoluteMinScale(
double min_scale);
315 std::shared_ptr<PI_PointContext> GetCanvasContextAtPoint(
int x,
int y);
402 void WarpPointerDeferred(
int x,
int y);
406 void ToggleCPAWarn();
408 bool IsMeasureActive() {
return m_bMeasure_Active; }
409 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
412 int GetUpMode() {
return m_upMode; }
413 bool GetLookahead() {
return m_bLookAhead; }
416 void SetQuiltMode(
bool b_quilt);
417 bool GetQuiltMode(
void);
418 std::vector<int> GetQuiltIndexArray(
void);
419 bool IsQuiltDelta(
void);
420 void SetQuiltChartHiLiteIndex(
int dbIndex);
421 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
422 void ClearQuiltChartHiLiteIndexArray();
423 int GetQuiltReferenceChartIndex(
void);
424 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
425 void ConfigureChartBar();
427 int GetNextContextMenuId();
429 TCWin *getTCWin() {
return pCwin; }
431 bool StartTimedMovement(
bool stoptimer =
true);
432 void DoTimedMovement();
448 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
449 void DoTimedMovementVP();
450 void StopMovementVP();
452 void StartTimedMovementTarget();
453 void DoTimedMovementTarget();
454 void StopMovementTarget();
456 void SetColorScheme(ColorScheme cs);
457 ColorScheme GetColorScheme() {
return m_cs; }
459 void CanvasApplyLocale();
460 void RebuildCursors();
463 int GetCanvasWidth() {
return m_canvas_width; }
464 int GetCanvasHeight() {
return m_canvas_height; }
483 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
484 ViewPort *GetpVP() {
return &VPoint; }
488 Piano *GetPiano() {
return m_Piano; }
489 int GetPianoHeight();
491 bool isRouteEditing(
void) {
492 return m_bRouteEditing && m_pRoutePointEditTarget;
494 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
496 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
497 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
499 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
500 bool GetbTCUpdate() {
return m_bTCupdate; }
501 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
502 bool GetbShowCurrent() {
return m_bShowCurrent; }
503 void SetbShowTide(
bool f) { m_bShowTide = f; }
504 bool GetbShowTide() {
return m_bShowTide; }
505 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
506 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
510 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
511 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
512 void GetCursorLatLon(
double *lat,
double *lon);
516 void StopAutoPan(
void);
517 bool IsOwnshipOnScreen();
537 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
538 bool stoptimer =
true);
553 void RotateCanvas(
double dir);
554 void DoRotateCanvas(
double rotation);
555 void DoTiltCanvas(
double tilt);
557 void ShowAISTargetList(
void);
559 void ShowGoToPosition(
void);
560 void HideGlobalToolbar();
561 void ShowGlobalToolbar();
563 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
564 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
565 bool GetShowGrid() {
return m_bDisplayGrid; }
566 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
567 bool GetShowOutlines() {
return m_bShowOutlines; }
568 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
569 bool GetShowChartbar() {
return true; }
570 wxRect GetMUIBarRect();
571 void SetMUIBarPosition();
572 void DestroyMuiBar();
575 void ToggleChartOutlines(
void);
576 void ToggleCanvasQuiltMode(
void);
578 wxString GetScaleText() {
return m_scaleText; }
579 double GetScaleValue() {
return m_scaleValue; }
580 bool GetShowAIS() {
return m_bShowAIS; }
581 void SetShowAIS(
bool show);
582 bool GetAttenAIS() {
return m_bShowAISScaled; }
583 void SetAttenAIS(
bool show);
584 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
585 bool GetShowFocusBar() {
return m_show_focus_bar; }
586 MUIBar *GetMUIBar() {
return m_muiBar; }
587 void SetAlertString(wxString str) { m_alertString = str; }
588 wxString GetAlertString() {
return m_alertString; }
589 bool GetShowENCText() {
return m_encShowText; }
590 void SetShowENCText(
bool show);
592 bool GetShowENCDepth() {
return m_encShowDepth; }
593 void SetShowENCDepth(
bool show);
595 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
596 void SetShowENCLightDesc(
bool show);
598 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
599 void SetShowENCBuoyLabels(
bool show);
601 bool GetShowENCLights() {
return m_encShowLights; }
602 void SetShowENCLights(
bool show);
607 bool GetShowENCAnchor() {
return m_encShowAnchor; }
608 void SetShowENCAnchor(
bool show);
610 bool GetShowENCDataQual() {
return m_encShowDataQual; }
611 void SetShowENCDataQual(
bool show);
613 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
615 void ShowTides(
bool bShow);
616 void ShowCurrents(
bool bShow);
617 void SetUpMode(
int mode);
618 void ToggleLookahead();
619 void SetShowGPS(
bool show);
620 void UpdateFollowButtonState(
void);
622 bool IsTileOverlayIndexInYesShow(
int index);
623 bool IsTileOverlayIndexInNoShow(
int index);
624 void AddTileOverlayIndexToNoShow(
int index);
626 Route *m_pMouseRoute;
627 bool m_bMeasure_Active;
631 wxString FindValidUploadPort();
632 wxString m_active_upload_port;
640 int GetQuiltChartCount();
641 void InvalidateAllQuiltPatchs(
void);
642 void SetQuiltRefChart(
int dbIndex);
643 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
645 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
646 std::vector<int> &GetQuiltFullScreendbIndexArray();
647 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
648 int GetQuiltRefChartdbIndex(
void);
649 void InvalidateQuilt(
void);
650 double GetQuiltMaxErrorFactor();
651 bool IsChartQuiltableRef(
int db_index);
653 int GetCanvasChartNativeScale();
654 int FindClosestCanvasChartdbIndex(
int scale);
655 void UpdateCanvasOnGroupChange(
void);
657 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
658 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
659 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
660 void ShowTrackPropertiesDialog(
Track *selected);
685 void UpdateGPSCompassStatusBox(
bool b_force_new);
688 wxColour GetFogColor() {
return m_fog_color; }
690 void ShowChartInfoWindow(
int x,
int dbIndex);
691 void HideChartInfoWindow(
void);
692 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
693 const std::vector<int> &index_vector);
695 void StartMeasureRoute();
696 void CancelMeasureRoute();
698 bool DoCanvasUpdate(
void);
699 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
700 void SelectQuiltRefChart(
int selected_index);
701 double GetBestVPScale(
ChartBase *pchart);
702 void selectCanvasChartDisplay(
int type,
int family);
703 void RemoveChartFromQuilt(
int dbIndex);
705 void HandlePianoClick(
int selected_index,
706 const std::vector<int> &selected_dbIndex_array);
707 void HandlePianoRClick(
int x,
int y,
int selected_index,
708 const std::vector<int> &selected_dbIndex_array);
709 void HandlePianoRollover(
int selected_index,
710 const std::vector<int> &selected_dbIndex_array,
711 int n_charts,
int scale);
712 void ClearPianoRollover();
713 void UpdateCanvasControlBar(
void);
714 void FormatPianoKeys(
void);
715 void PianoPopupMenu(
int x,
int y,
int selected_index,
716 const std::vector<int> &selected_dbIndex_array);
717 void OnPianoMenuDisableChart(wxCommandEvent &event);
718 void OnPianoMenuEnableChart(wxCommandEvent &event);
720 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
721 bool DoCanvasCOGSet(
void);
722 void ApplyGlobalSettings();
723 void SetShowGPSCompassWindow(
bool bshow);
724 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
725 void FreezePiano() { m_pianoFrozen =
true; }
726 void ThawPiano() { m_pianoFrozen =
false; }
727 void StartChartDragInertia();
728 void SetupGridFont();
732 wxCursor *pCursorPencil;
733 wxCursor *pCursorArrow;
734 wxCursor *pCursorCross;
735 wxCursor *pPlugIn_Cursor;
737 wxBitmap *pscratch_bm;
738 bool m_brepaint_piano;
775 bool m_bShowNavobjects;
780#ifdef HAVE_WX_GESTURE_EVENTS
781 double m_oldVPSScale;
784 wxPoint m_zoomStartPoint;
787 void DrawBlinkObjects(
void);
789 void StartRoute(
void);
790 wxString FinishRoute(
void);
796 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
798 bool m_FinishRouteOnKillFocus;
799 bool m_bMeasure_DistCircle;
800 bool m_bAppendingRoute;
802 Route *m_pMeasureRoute;
805 int GetMinAvailableGshhgQuality() {
806 return pWorldBackgroundChart->GetMinAvailableQuality();
808 int GetMaxAvailableGshhgQuality() {
809 return pWorldBackgroundChart->GetMaxAvailableQuality();
811 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
812 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
813 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
815 void SetAISCanvasDisplayStyle(
int StyleIndx);
816 void TouchAISToolActive(
void);
817 void UpdateAISTBTool(
void);
819 void SelectChartFromStack(
int index,
bool bDir =
false,
820 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
821 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
822 void SelectdbChart(
int dbindex);
824 void DoCanvasStackDelta(
int direction);
826 void ProcessNewGUIScale();
828 bool m_b_paint_enable;
830 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
831 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
833 std::vector<int> m_tile_noshow_index_array;
834 std::vector<int> m_tile_yesshow_index_array;
835 std::vector<int> m_quilt_noshow_index_array;
837 std::vector<int> GetQuiltNoshowIindexArray() {
838 return m_quilt_noshow_index_array;
850 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
855 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
877 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
879 int AdjustQuiltRefChart();
880 bool UpdateS52State();
881 void CallPopupMenu(
int x,
int y);
882 bool IsTempMenuBarEnabled();
883 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
886 void PositionConsole(
void);
887 wxWindow *m_nmea_log;
889 wxColour PredColor();
890 wxColour ShipColor();
892 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
893 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
894 wxPoint &GpsOffsetPixels,
895 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
896 float &scale_factor_y);
898 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
899 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
900 wxPoint2DDouble lGPSPoint);
908 wxString m_scaleText;
910 bool m_bShowScaleInStatusBar;
913 wxPoint LastShipPoint;
914 wxPoint LastPredPoint;
915 bool m_bDrawingRoute;
916 bool m_bRouteEditing;
918 bool m_bRoutePoinDragging;
920 bool m_bMayToggleMenuBar;
925 bool m_bChartDragging;
926 Route *m_pSelectedRoute;
927 Track *m_pSelectedTrack;
928 wxArrayPtrVoid *m_pEditRouteArray;
933 wxCursor *pCursorLeft;
934 wxCursor *pCursorRight;
936 wxCursor *pCursorDown;
938 wxCursor *pCursorUpLeft;
939 wxCursor *pCursorUpRight;
940 wxCursor *pCursorDownLeft;
941 wxCursor *pCursorDownRight;
945 wxBitmap *pThumbDIBShow;
946 wxBitmap *pThumbShowing;
948 bool bShowingCurrent;
957 double m_canvas_scale_factor;
960 double m_display_size_mm;
962 double m_absolute_min_scale_ppm;
964 bool singleClickEventIsValid;
965 wxMouseEvent singleClickEvent;
967 std::vector<s57Sector_t> extendedSectorLegs;
968 wxFont m_overzoomFont;
969 int m_overzoomTextWidth;
970 int m_overzoomTextHeight;
973 void OnActivate(wxActivateEvent &event);
974 void OnSize(wxSizeEvent &event);
975 void MouseTimedEvent(wxTimerEvent &event);
976 void MouseEvent(wxMouseEvent &event);
977 void ShipDraw(
ocpnDC &dc);
978 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
979 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
980 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
982 void RotateTimerEvent(wxTimerEvent &event);
983 void PanTimerEvent(wxTimerEvent &event);
984 void MovementTimerEvent(wxTimerEvent &);
985 void MovementStopTimerEvent(wxTimerEvent &);
986 void OnCursorTrackTimerEvent(wxTimerEvent &event);
988 void MovementVPTimerEvent(wxTimerEvent &event);
990 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
991 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
992 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
993 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
994 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
995 void DrawAnchorWatchPoints(
ocpnDC &dc);
996 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
998 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
999 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
1000 void RebuildTideSelectList(LLBBox &BBox);
1001 void RebuildCurrentSelectList(LLBBox &BBox);
1005 void RenderRouteLegs(
ocpnDC &dc);
1006 void RenderVisibleSectorLights(
ocpnDC &dc);
1008 void AlertDraw(
ocpnDC &dc);
1010 void GridDraw(
ocpnDC &dc);
1011 void ScaleBarDraw(
ocpnDC &dc);
1013 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
1014 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
1017 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
1018 const wxString &str, ColorScheme cs);
1019 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1020 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1022 void CreateOZEmbossMapData(ColorScheme cs);
1024 void SetOverzoomFont();
1031 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1032 void HandleNotificationMouseClick();
1038 int m_canvas_height;
1056 wxTimer *pMovementStopTimer;
1058 wxTimer *pCurTrackTimer;
1060 wxTimer *pRotDefTimer;
1062 wxTimer *m_DoubleClickTimer;
1063 wxTimer m_routeFinishTimer;
1065 wxTimer m_RolloverPopupTimer;
1067 wxTimer m_VPMovementTimer;
1069 int m_wheelzoom_stop_oneshot;
1070 int m_last_wheel_dir;
1071 wxStopWatch m_wheelstopwatch;
1072 double m_zoom_target;
1074 int m_curtrack_timer_msec;
1075 int m_rollover_popup_timer_msec;
1080 wxBitmap *pss_overlay_bmp;
1081 wxMask *pss_overlay_mask;
1083 wxRect ship_draw_rect;
1084 wxRect ship_draw_last_rect;
1085 wxRect ais_draw_rect;
1086 wxRect alert_draw_rect;
1088 wxBitmap *proute_bm;
1089 wxMemoryDC m_dc_route;
1113 double m_true_scale_ppm;
1115 ownship_state_t m_ownship_state;
1119 wxBitmap m_bmTideDay;
1120 wxBitmap m_bmTideDusk;
1121 wxBitmap m_bmTideNight;
1122 wxBitmap m_bmCurrentDay;
1123 wxBitmap m_bmCurrentDusk;
1124 wxBitmap m_bmCurrentNight;
1125 wxBitmap m_cTideBitmap;
1126 wxBitmap m_cCurrentBitmap;
1134 wxImage m_os_image_red_day;
1135 wxImage m_os_image_red_dusk;
1136 wxImage m_os_image_red_night;
1137 wxImage m_os_image_grey_day;
1138 wxImage m_os_image_grey_dusk;
1139 wxImage m_os_image_grey_night;
1140 wxImage m_os_image_yellow_day;
1141 wxImage m_os_image_yellow_dusk;
1142 wxImage m_os_image_yellow_night;
1144 wxImage *m_pos_image_red;
1145 wxImage *m_pos_image_grey;
1146 wxImage *m_pos_image_yellow;
1148 wxImage *m_pos_image_user;
1149 wxImage *m_pos_image_user_grey;
1150 wxImage *m_pos_image_user_yellow;
1152 wxImage *m_pos_image_user_day;
1153 wxImage *m_pos_image_user_dusk;
1154 wxImage *m_pos_image_user_night;
1155 wxImage *m_pos_image_user_grey_day;
1156 wxImage *m_pos_image_user_grey_dusk;
1157 wxImage *m_pos_image_user_grey_night;
1158 wxImage *m_pos_image_user_yellow_day;
1159 wxImage *m_pos_image_user_yellow_dusk;
1160 wxImage *m_pos_image_user_yellow_night;
1162 wxImage m_ship_pix_image;
1164 bool m_cur_ship_pix_isgrey;
1165 ColorScheme m_ship_cs;
1168 wxBitmap *m_prot_bm;
1176 double m_wheel_lat, m_wheel_lon;
1177 int m_wheel_x, m_wheel_y;
1180 wxBitmap m_working_bm;
1181 wxBitmap m_cached_chart_bm;
1186 bool m_bzooming, m_bzooming_to_cursor;
1195 int m_panx, m_pany, m_modkeys;
1197 bool m_bmouse_key_mod;
1198 double m_zoom_factor, m_rotation_speed;
1206 wxDateTime m_last_movement_time;
1208 int m_AISRollover_MMSI;
1209 bool m_bsectors_shown;
1211 double m_displayed_scale_factor;
1213 wxColour m_fog_color;
1214 bool m_disable_edge_pan;
1215 wxFont *m_pgridFont;
1217 bool m_dragoffsetSet;
1221 double m_vLat, m_vLon;
1224 bool m_bpersistent_quilt;
1226 wxMenu *m_piano_ctx_menu;
1227 int menu_selected_dbIndex, menu_selected_index;
1232 wxRect m_mainlast_tb_rect;
1233 int m_restore_dbindex;
1234 int m_restore_group;
1237 wxSize m_muiBarHOSize;
1239 bool m_bShowOutlines;
1240 bool m_bDisplayGrid;
1241 bool m_bShowDepthUnits;
1243 bool m_bShowAISScaled;
1246 long m_s52StateHash;
1248 bool m_encShowDepth;
1249 bool m_encShowLightDesc;
1250 bool m_encShowBuoyLabels;
1251 int m_encDisplayCategory;
1252 bool m_encShowLights;
1253 bool m_encShowAnchor;
1254 bool m_encShowDataQual;
1256 wxTimer m_deferredFocusTimer;
1257 float m_focus_indicator_pix;
1261 double m_OSoffsetx, m_OSoffsety;
1262 bool m_MouseDragging;
1264 wxString m_alertString;
1265 wxRect m_scaleBarRect;
1266 bool m_bShowCompassWin;
1269 double m_sector_glat, m_sector_glon;
1270 std::vector<s57Sector_t> m_sectorlegsVisible;
1271 bool m_bShowVisibleSectors;
1273 double m_displayScale;
1274 bool m_show_focus_bar;
1276 double m_panx_target_final;
1277 double m_pany_target_final;
1278 double m_panx_target_now;
1279 double m_pany_target_now;
1281 double m_start_lat, m_start_lon;
1282 double m_target_lat, m_target_lon;
1283 double m_run_lat, m_run_lon;
1284 bool m_timed_move_vp_active;
1288 double meters_to_shift = 0;
1289 double dir_to_shift = 0;
1292 wxTimer m_chart_drag_inertia_timer;
1293 void OnChartDragInertiaTimer(wxTimerEvent &event);
1295 uint64_t m_last_drag_time;
1296 int m_chart_drag_total_x;
1297 int m_chart_drag_total_y;
1298 double m_chart_drag_total_time;
1299 double m_chart_drag_velocity_x;
1300 double m_chart_drag_velocity_y;
1301 wxLongLong m_chart_drag_inertia_time;
1302 wxLongLong m_chart_drag_inertia_start_time;
1303 bool m_chart_drag_inertia_active;
1304 double m_last_elapsed;
1305 std::vector<int> m_drag_vec_x;
1306 std::vector<int> m_drag_vec_y;
1307 std::vector<double> m_drag_vec_t;
1308 int m_inertia_last_drag_x;
1309 int m_inertia_last_drag_y;
1312 wxTimer m_easeTimer;
1313 wxLongLong m_animationStart;
1314 wxLongLong m_animationDuration;
1315 double m_startLat, m_startLon, m_startScale;
1316 double m_endLat, m_endLon, m_endScale;
1317 bool m_animationActive;
1318 void OnJumpEaseTimer(wxTimerEvent &event);
1319 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1324 DECLARE_EVENT_TABLE()