157 ChartCanvas(wxFrame *frame,
int canvasIndex, wxWindow *nmea_log);
160 void SetupGlCanvas();
163 void OnKeyDown(wxKeyEvent &event);
164 void OnKeyUp(wxKeyEvent &event);
165 void OnKeyChar(wxKeyEvent &event);
166 void OnPaint(wxPaintEvent &event);
168 void Scroll(
int dx,
int dy);
169 void ResetGridFont() { m_pgridFont =
nullptr; }
171 void OnToolLeftClick(wxCommandEvent &event);
173 bool MouseEventOverlayWindows(wxMouseEvent &event);
174 bool MouseEventChartBar(wxMouseEvent &event);
175 bool MouseEventMUIBar(wxMouseEvent &event);
176 bool MouseEventToolbar(wxMouseEvent &event);
177 bool MouseEventIENCBar(wxMouseEvent &event);
179 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
180 bool MouseEventProcessObjects(wxMouseEvent &event);
197 void SetCanvasCursor(wxMouseEvent &event);
198 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
199 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
200#ifdef HAVE_WX_GESTURE_EVENTS
201 void OnZoom(wxZoomGestureEvent &event);
202 void OnLongPress(wxLongPressEvent &event);
203 void OnPressAndTap(wxPressAndTapEvent &event);
205 void OnLeftDown(wxMouseEvent &evt);
206 void OnLeftUp(wxMouseEvent &evt);
208 void OnRightUp(wxMouseEvent &event);
209 void OnRightDown(wxMouseEvent &event);
211 void OnDoubleLeftClick(wxMouseEvent &event);
213 void OnWheel(wxMouseEvent &event);
214 void OnMotion(wxMouseEvent &event);
217 void PopupMenuHandler(wxCommandEvent &event);
218 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
220 bool SetUserOwnship();
222 double GetCanvasRangeMeters();
223 void SetCanvasRangeMeters(
double range);
225 void EnablePaint(
bool b_enable);
226 virtual bool SetCursor(
const wxCursor &c);
227 virtual void Refresh(
bool eraseBackground =
true,
228 const wxRect *rect = (
const wxRect *)NULL);
229 virtual void Update();
231 void LostMouseCapture(wxMouseCaptureLostEvent &event);
233 void CancelMouseRoute();
254 bool SetVPScale(
double sc,
bool b_refresh =
true);
255 bool SetVPProjection(
int projection);
264 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
280 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
281 double rotation,
int projection = 0,
bool b_adjust =
true,
282 bool b_refresh =
true);
283 void ReloadVP(
bool b_adjust =
true);
284 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
286 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
287 void SetGroupIndex(
int index,
bool autoswitch =
false);
288 bool CheckGroup(
int igroup);
289 void canvasRefreshGroupIndex(
void);
290 void canvasChartsRefresh(
int dbi_hint);
292 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
294 void UpdateCanvasS52PLIBConfig();
296 void TriggerDeferredFocus();
297 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
298 void OnRouteFinishTimerEvent(wxTimerEvent &event);
300 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
301 void SetupCanvasQuiltMode(
void);
304 bool SetVPRotation(
double angle);
305 double GetVPRotation(
void) {
return GetVP().
rotation; }
306 double GetVPSkew(
void) {
return GetVP().
skew; }
307 double GetVPTilt(
void) {
return GetVP().
tilt; }
309 void ClearbFollow(
void);
310 void SetbFollow(
void);
311 void TogglebFollow(
void);
312 bool GetbFollow() {
return m_bFollow; }
315 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
316 void SetAbsoluteMinScale(
double min_scale);
317 std::shared_ptr<PI_PointContext> GetCanvasContextAtPoint(
int x,
int y);
404 void WarpPointerDeferred(
int x,
int y);
408 void ToggleCPAWarn();
410 bool IsMeasureActive() {
return m_bMeasure_Active; }
411 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
414 int GetUpMode() {
return m_upMode; }
415 bool GetLookahead() {
return m_bLookAhead; }
418 void SetQuiltMode(
bool b_quilt);
419 bool GetQuiltMode(
void);
420 std::vector<int> GetQuiltIndexArray(
void);
421 bool IsQuiltDelta(
void);
422 void SetQuiltChartHiLiteIndex(
int dbIndex);
423 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
424 void ClearQuiltChartHiLiteIndexArray();
425 int GetQuiltReferenceChartIndex(
void);
426 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
427 void ConfigureChartBar();
429 int GetNextContextMenuId();
431 TCWin *getTCWin() {
return pCwin; }
433 bool StartTimedMovement(
bool stoptimer =
true);
434 void DoTimedMovement();
450 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
451 void DoTimedMovementVP();
452 void StopMovementVP();
454 void StartTimedMovementTarget();
455 void DoTimedMovementTarget();
456 void StopMovementTarget();
458 void SetColorScheme(ColorScheme cs);
459 ColorScheme GetColorScheme() {
return m_cs; }
461 void CanvasApplyLocale();
462 void RebuildCursors();
465 int GetCanvasWidth() {
return m_canvas_width; }
466 int GetCanvasHeight() {
return m_canvas_height; }
485 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
486 ViewPort *GetpVP() {
return &VPoint; }
490 Piano *GetPiano() {
return m_Piano; }
491 int GetPianoHeight();
493 bool isRouteEditing(
void) {
494 return m_bRouteEditing && m_pRoutePointEditTarget;
496 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
498 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
499 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
501 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
502 bool GetbTCUpdate() {
return m_bTCupdate; }
503 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
504 bool GetbShowCurrent() {
return m_bShowCurrent; }
505 void SetbShowTide(
bool f) { m_bShowTide = f; }
506 bool GetbShowTide() {
return m_bShowTide; }
507 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
508 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
512 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
513 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
514 void GetCursorLatLon(
double *lat,
double *lon);
518 void StopAutoPan(
void);
538 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
539 bool stoptimer =
true);
554 void RotateCanvas(
double dir);
555 void DoRotateCanvas(
double rotation);
556 void DoTiltCanvas(
double tilt);
558 void ShowAISTargetList(
void);
560 void ShowGoToPosition(
void);
561 void HideGlobalToolbar();
562 void ShowGlobalToolbar();
564 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
565 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
566 bool GetShowGrid() {
return m_bDisplayGrid; }
567 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
568 bool GetShowOutlines() {
return m_bShowOutlines; }
569 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
570 bool GetShowChartbar() {
return true; }
571 wxRect GetMUIBarRect();
572 void SetMUIBarPosition();
573 void DestroyMuiBar();
576 void ToggleChartOutlines(
void);
577 void ToggleCanvasQuiltMode(
void);
579 wxString GetScaleText() {
return m_scaleText; }
580 double GetScaleValue() {
return m_scaleValue; }
581 bool GetShowAIS() {
return m_bShowAIS; }
582 void SetShowAIS(
bool show);
583 bool GetAttenAIS() {
return m_bShowAISScaled; }
584 void SetAttenAIS(
bool show);
585 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
586 bool GetShowFocusBar() {
return m_show_focus_bar; }
587 MUIBar *GetMUIBar() {
return m_muiBar; }
588 void SetAlertString(wxString str) { m_alertString = str; }
589 wxString GetAlertString() {
return m_alertString; }
590 bool GetShowENCText() {
return m_encShowText; }
591 void SetShowENCText(
bool show);
593 bool GetShowENCDepth() {
return m_encShowDepth; }
594 void SetShowENCDepth(
bool show);
596 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
597 void SetShowENCLightDesc(
bool show);
599 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
600 void SetShowENCBuoyLabels(
bool show);
602 bool GetShowENCLights() {
return m_encShowLights; }
603 void SetShowENCLights(
bool show);
608 bool GetShowENCAnchor() {
return m_encShowAnchor; }
609 void SetShowENCAnchor(
bool show);
611 bool GetShowENCDataQual() {
return m_encShowDataQual; }
612 void SetShowENCDataQual(
bool show);
614 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
616 void ShowTides(
bool bShow);
617 void ShowCurrents(
bool bShow);
618 void SetUpMode(
int mode);
619 void ToggleLookahead();
620 void SetShowGPS(
bool show);
621 void UpdateFollowButtonState(
void);
623 bool IsTileOverlayIndexInYesShow(
int index);
624 bool IsTileOverlayIndexInNoShow(
int index);
625 void AddTileOverlayIndexToNoShow(
int index);
627 Route *m_pMouseRoute;
628 bool m_bMeasure_Active;
632 wxString FindValidUploadPort();
633 wxString m_active_upload_port;
641 int GetQuiltChartCount();
642 void InvalidateAllQuiltPatchs(
void);
643 void SetQuiltRefChart(
int dbIndex);
644 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
646 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
647 std::vector<int> &GetQuiltFullScreendbIndexArray();
648 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
649 int GetQuiltRefChartdbIndex(
void);
650 void InvalidateQuilt(
void);
651 double GetQuiltMaxErrorFactor();
652 bool IsChartQuiltableRef(
int db_index);
654 int GetCanvasChartNativeScale();
655 int FindClosestCanvasChartdbIndex(
int scale);
656 void UpdateCanvasOnGroupChange(
void);
658 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
659 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
660 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
661 void ShowTrackPropertiesDialog(
Track *selected);
662 void DrawTCWindow(
int x,
int y,
void *pIDX);
664 void UpdateGPSCompassStatusBox(
bool b_force_new);
667 wxColour GetFogColor() {
return m_fog_color; }
669 void ShowChartInfoWindow(
int x,
int dbIndex);
670 void HideChartInfoWindow(
void);
671 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
672 const std::vector<int> &index_vector);
674 void StartMeasureRoute();
675 void CancelMeasureRoute();
677 bool DoCanvasUpdate(
void);
678 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
679 void SelectQuiltRefChart(
int selected_index);
680 double GetBestVPScale(
ChartBase *pchart);
681 void selectCanvasChartDisplay(
int type,
int family);
682 void RemoveChartFromQuilt(
int dbIndex);
684 void HandlePianoClick(
int selected_index,
685 const std::vector<int> &selected_dbIndex_array);
686 void HandlePianoRClick(
int x,
int y,
int selected_index,
687 const std::vector<int> &selected_dbIndex_array);
688 void HandlePianoRollover(
int selected_index,
689 const std::vector<int> &selected_dbIndex_array,
690 int n_charts,
int scale);
691 void ClearPianoRollover();
692 void UpdateCanvasControlBar(
void);
693 void FormatPianoKeys(
void);
694 void PianoPopupMenu(
int x,
int y,
int selected_index,
695 const std::vector<int> &selected_dbIndex_array);
696 void OnPianoMenuDisableChart(wxCommandEvent &event);
697 void OnPianoMenuEnableChart(wxCommandEvent &event);
699 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
700 bool DoCanvasCOGSet(
void);
701 void ApplyGlobalSettings();
702 void SetShowGPSCompassWindow(
bool bshow);
703 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
704 void FreezePiano() { m_pianoFrozen =
true; }
705 void ThawPiano() { m_pianoFrozen =
false; }
706 void StartChartDragInertia();
707 void SetupGridFont();
711 wxCursor *pCursorPencil;
712 wxCursor *pCursorArrow;
713 wxCursor *pCursorCross;
714 wxCursor *pPlugIn_Cursor;
716 wxBitmap *pscratch_bm;
717 bool m_brepaint_piano;
754 bool m_bShowNavobjects;
759#ifdef HAVE_WX_GESTURE_EVENTS
760 double m_oldVPSScale;
763 wxPoint m_zoomStartPoint;
766 void DrawBlinkObjects(
void);
768 void StartRoute(
void);
769 wxString FinishRoute(
void);
775 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
777 bool m_FinishRouteOnKillFocus;
778 bool m_bMeasure_DistCircle;
779 bool m_bAppendingRoute;
781 Route *m_pMeasureRoute;
784 int GetMinAvailableGshhgQuality() {
785 return pWorldBackgroundChart->GetMinAvailableQuality();
787 int GetMaxAvailableGshhgQuality() {
788 return pWorldBackgroundChart->GetMaxAvailableQuality();
790 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
791 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
792 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
794 void SetAISCanvasDisplayStyle(
int StyleIndx);
795 void TouchAISToolActive(
void);
796 void UpdateAISTBTool(
void);
798 void SelectChartFromStack(
int index,
bool bDir =
false,
799 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
800 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
801 void SelectdbChart(
int dbindex);
803 void DoCanvasStackDelta(
int direction);
805 void ProcessNewGUIScale();
807 bool m_b_paint_enable;
809 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
810 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
812 std::vector<int> m_tile_noshow_index_array;
813 std::vector<int> m_tile_yesshow_index_array;
814 std::vector<int> m_quilt_noshow_index_array;
816 std::vector<int> GetQuiltNoshowIindexArray() {
817 return m_quilt_noshow_index_array;
829 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
834 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
856 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
858 int AdjustQuiltRefChart();
859 bool UpdateS52State();
860 void CallPopupMenu(
int x,
int y);
861 bool IsTempMenuBarEnabled();
862 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
865 void PositionConsole(
void);
866 wxWindow *m_nmea_log;
868 wxColour PredColor();
869 wxColour ShipColor();
871 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
872 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
873 wxPoint &GpsOffsetPixels,
874 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
875 float &scale_factor_y);
877 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
878 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
879 wxPoint2DDouble lGPSPoint);
887 wxString m_scaleText;
889 bool m_bShowScaleInStatusBar;
892 wxPoint LastShipPoint;
893 wxPoint LastPredPoint;
894 bool m_bDrawingRoute;
895 bool m_bRouteEditing;
897 bool m_bRoutePoinDragging;
899 bool m_bMayToggleMenuBar;
904 bool m_bChartDragging;
905 Route *m_pSelectedRoute;
906 Track *m_pSelectedTrack;
907 wxArrayPtrVoid *m_pEditRouteArray;
912 wxCursor *pCursorLeft;
913 wxCursor *pCursorRight;
915 wxCursor *pCursorDown;
917 wxCursor *pCursorUpLeft;
918 wxCursor *pCursorUpRight;
919 wxCursor *pCursorDownLeft;
920 wxCursor *pCursorDownRight;
924 wxBitmap *pThumbDIBShow;
925 wxBitmap *pThumbShowing;
927 bool bShowingCurrent;
936 double m_canvas_scale_factor;
939 double m_display_size_mm;
941 double m_absolute_min_scale_ppm;
943 bool singleClickEventIsValid;
944 wxMouseEvent singleClickEvent;
946 std::vector<s57Sector_t> extendedSectorLegs;
947 wxFont m_overzoomFont;
948 int m_overzoomTextWidth;
949 int m_overzoomTextHeight;
952 void OnActivate(wxActivateEvent &event);
953 void OnSize(wxSizeEvent &event);
954 void MouseTimedEvent(wxTimerEvent &event);
955 void MouseEvent(wxMouseEvent &event);
956 void ShipDraw(
ocpnDC &dc);
957 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
958 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
959 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
961 void RotateTimerEvent(wxTimerEvent &event);
962 void PanTimerEvent(wxTimerEvent &event);
963 void MovementTimerEvent(wxTimerEvent &);
964 void MovementStopTimerEvent(wxTimerEvent &);
965 void OnCursorTrackTimerEvent(wxTimerEvent &event);
967 void MovementVPTimerEvent(wxTimerEvent &event);
969 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
970 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
971 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
972 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
973 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
974 void DrawAnchorWatchPoints(
ocpnDC &dc);
975 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
977 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
978 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
979 void RebuildTideSelectList(LLBBox &BBox);
980 void RebuildCurrentSelectList(LLBBox &BBox);
984 void RenderRouteLegs(
ocpnDC &dc);
985 void RenderVisibleSectorLights(
ocpnDC &dc);
987 void AlertDraw(
ocpnDC &dc);
989 void GridDraw(
ocpnDC &dc);
990 void ScaleBarDraw(
ocpnDC &dc);
992 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
993 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
996 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
997 const wxString &str, ColorScheme cs);
998 void CreateDepthUnitEmbossMaps(ColorScheme cs);
999 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1001 void CreateOZEmbossMapData(ColorScheme cs);
1003 void SetOverzoomFont();
1010 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1011 void HandleNotificationMouseClick();
1017 int m_canvas_height;
1035 wxTimer *pMovementStopTimer;
1037 wxTimer *pCurTrackTimer;
1039 wxTimer *pRotDefTimer;
1041 wxTimer *m_DoubleClickTimer;
1042 wxTimer m_routeFinishTimer;
1044 wxTimer m_RolloverPopupTimer;
1046 wxTimer m_VPMovementTimer;
1048 int m_wheelzoom_stop_oneshot;
1049 int m_last_wheel_dir;
1050 wxStopWatch m_wheelstopwatch;
1051 double m_zoom_target;
1053 int m_curtrack_timer_msec;
1054 int m_rollover_popup_timer_msec;
1059 wxBitmap *pss_overlay_bmp;
1060 wxMask *pss_overlay_mask;
1062 wxRect ship_draw_rect;
1063 wxRect ship_draw_last_rect;
1064 wxRect ais_draw_rect;
1065 wxRect alert_draw_rect;
1067 wxBitmap *proute_bm;
1068 wxMemoryDC m_dc_route;
1092 double m_true_scale_ppm;
1094 ownship_state_t m_ownship_state;
1098 wxBitmap m_bmTideDay;
1099 wxBitmap m_bmTideDusk;
1100 wxBitmap m_bmTideNight;
1101 wxBitmap m_bmCurrentDay;
1102 wxBitmap m_bmCurrentDusk;
1103 wxBitmap m_bmCurrentNight;
1104 wxBitmap m_cTideBitmap;
1105 wxBitmap m_cCurrentBitmap;
1113 wxImage m_os_image_red_day;
1114 wxImage m_os_image_red_dusk;
1115 wxImage m_os_image_red_night;
1116 wxImage m_os_image_grey_day;
1117 wxImage m_os_image_grey_dusk;
1118 wxImage m_os_image_grey_night;
1119 wxImage m_os_image_yellow_day;
1120 wxImage m_os_image_yellow_dusk;
1121 wxImage m_os_image_yellow_night;
1123 wxImage *m_pos_image_red;
1124 wxImage *m_pos_image_grey;
1125 wxImage *m_pos_image_yellow;
1127 wxImage *m_pos_image_user;
1128 wxImage *m_pos_image_user_grey;
1129 wxImage *m_pos_image_user_yellow;
1131 wxImage *m_pos_image_user_day;
1132 wxImage *m_pos_image_user_dusk;
1133 wxImage *m_pos_image_user_night;
1134 wxImage *m_pos_image_user_grey_day;
1135 wxImage *m_pos_image_user_grey_dusk;
1136 wxImage *m_pos_image_user_grey_night;
1137 wxImage *m_pos_image_user_yellow_day;
1138 wxImage *m_pos_image_user_yellow_dusk;
1139 wxImage *m_pos_image_user_yellow_night;
1141 wxImage m_ship_pix_image;
1143 bool m_cur_ship_pix_isgrey;
1144 ColorScheme m_ship_cs;
1147 wxBitmap *m_prot_bm;
1155 double m_wheel_lat, m_wheel_lon;
1156 int m_wheel_x, m_wheel_y;
1159 wxBitmap m_working_bm;
1160 wxBitmap m_cached_chart_bm;
1165 bool m_bzooming, m_bzooming_to_cursor;
1174 int m_panx, m_pany, m_modkeys;
1176 bool m_bmouse_key_mod;
1177 double m_zoom_factor, m_rotation_speed;
1185 wxDateTime m_last_movement_time;
1187 int m_AISRollover_MMSI;
1188 bool m_bsectors_shown;
1190 double m_displayed_scale_factor;
1192 wxColour m_fog_color;
1193 bool m_disable_edge_pan;
1194 wxFont *m_pgridFont;
1196 bool m_dragoffsetSet;
1200 double m_vLat, m_vLon;
1203 bool m_bpersistent_quilt;
1205 wxMenu *m_piano_ctx_menu;
1206 int menu_selected_dbIndex, menu_selected_index;
1211 wxRect m_mainlast_tb_rect;
1212 int m_restore_dbindex;
1213 int m_restore_group;
1216 wxSize m_muiBarHOSize;
1218 bool m_bShowOutlines;
1219 bool m_bDisplayGrid;
1220 bool m_bShowDepthUnits;
1222 bool m_bShowAISScaled;
1225 long m_s52StateHash;
1227 bool m_encShowDepth;
1228 bool m_encShowLightDesc;
1229 bool m_encShowBuoyLabels;
1230 int m_encDisplayCategory;
1231 bool m_encShowLights;
1232 bool m_encShowAnchor;
1233 bool m_encShowDataQual;
1235 wxTimer m_deferredFocusTimer;
1236 float m_focus_indicator_pix;
1240 double m_OSoffsetx, m_OSoffsety;
1241 bool m_MouseDragging;
1243 wxString m_alertString;
1244 wxRect m_scaleBarRect;
1245 bool m_bShowCompassWin;
1248 double m_sector_glat, m_sector_glon;
1249 std::vector<s57Sector_t> m_sectorlegsVisible;
1250 bool m_bShowVisibleSectors;
1252 double m_displayScale;
1253 bool m_show_focus_bar;
1255 double m_panx_target_final;
1256 double m_pany_target_final;
1257 double m_panx_target_now;
1258 double m_pany_target_now;
1260 double m_start_lat, m_start_lon;
1261 double m_target_lat, m_target_lon;
1262 double m_run_lat, m_run_lon;
1263 bool m_timed_move_vp_active;
1267 double meters_to_shift = 0;
1268 double dir_to_shift = 0;
1271 wxTimer m_chart_drag_inertia_timer;
1272 void OnChartDragInertiaTimer(wxTimerEvent &event);
1274 uint64_t m_last_drag_time;
1275 int m_chart_drag_total_x;
1276 int m_chart_drag_total_y;
1277 double m_chart_drag_total_time;
1278 double m_chart_drag_velocity_x;
1279 double m_chart_drag_velocity_y;
1280 wxLongLong m_chart_drag_inertia_time;
1281 wxLongLong m_chart_drag_inertia_start_time;
1282 bool m_chart_drag_inertia_active;
1283 double m_last_elapsed;
1284 std::vector<int> m_drag_vec_x;
1285 std::vector<int> m_drag_vec_y;
1286 std::vector<double> m_drag_vec_t;
1287 int m_inertia_last_drag_x;
1288 int m_inertia_last_drag_y;
1291 wxTimer m_easeTimer;
1292 wxLongLong m_animationStart;
1293 wxLongLong m_animationDuration;
1294 double m_startLat, m_startLon, m_startScale;
1295 double m_endLat, m_endLon, m_endScale;
1296 bool m_animationActive;
1297 void OnJumpEaseTimer(wxTimerEvent &event);
1298 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1303 DECLARE_EVENT_TABLE()