178 ChartCanvas(wxFrame *frame,
int canvasIndex, wxWindow *nmea_log);
181 virtual void ReloadVP(
bool b_adjust =
true)
override;
186 bool Show(
bool show =
true)
override {
return wxWindow::Show(show); }
187 double GetCanvasRangeMeters()
override;
189 void SetCanvasRangeMeters(
double range)
override;
190 wxBitmap *GetScratchBitmap()
const override {
return pscratch_bm; }
191 void ResetGridFont()
override { m_pgridFont =
nullptr; }
192 void ResetGlGridFont()
override;
193 void EnablePaint(
bool b_enable)
override;
194 bool CanAccelerateGlPanning()
override;
195 void SetupGlCompression()
override;
197 void TriggerDeferredFocus()
override;
198 void Refresh(
bool eraseBackground =
true,
199 const wxRect *rect =
nullptr)
override;
200 wxWindow *GetWindow()
override {
return this; }
201 double GetScaleValue()
override {
return m_scaleValue; }
203 void SetupGlCanvas();
206 void OnKeyDown(wxKeyEvent &event);
207 void OnKeyUp(wxKeyEvent &event);
208 void OnKeyChar(wxKeyEvent &event);
209 void OnPaint(wxPaintEvent &event);
210 void OnToolLeftClick(wxCommandEvent &event);
212 void Scroll(
int dx,
int dy);
214 bool MouseEventOverlayWindows(wxMouseEvent &event);
215 bool MouseEventChartBar(wxMouseEvent &event);
216 bool MouseEventMUIBar(wxMouseEvent &event);
217 bool MouseEventToolbar(wxMouseEvent &event);
218 bool MouseEventIENCBar(wxMouseEvent &event);
220 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
221 bool MouseEventProcessObjects(wxMouseEvent &event);
238 void SetCanvasCursor(wxMouseEvent &event);
239 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
240 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
241#ifdef HAVE_WX_GESTURE_EVENTS
242 void OnZoom(wxZoomGestureEvent &event);
243 void OnLongPress(wxLongPressEvent &event);
244 void OnPressAndTap(wxPressAndTapEvent &event);
246 void OnLeftDown(wxMouseEvent &evt);
247 void OnLeftUp(wxMouseEvent &evt);
249 void OnRightUp(wxMouseEvent &event);
250 void OnRightDown(wxMouseEvent &event);
252 void OnDoubleLeftClick(wxMouseEvent &event);
254 void OnWheel(wxMouseEvent &event);
255 void OnMotion(wxMouseEvent &event);
258 void PopupMenuHandler(wxCommandEvent &event);
259 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
261 bool SetUserOwnship();
263 bool SetCursor(
const wxCursor &c)
override;
264 void Update()
override;
266 void LostMouseCapture(wxMouseCaptureLostEvent &event);
268 void CancelMouseRoute();
289 bool SetVPScale(
double sc,
bool b_refresh =
true);
290 bool SetVPProjection(
int projection);
299 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
315 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
316 double rotation,
int projection = 0,
bool b_adjust =
true,
317 bool b_refresh =
true);
318 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
320 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
321 void SetGroupIndex(
int index,
bool autoswitch =
false);
322 bool CheckGroup(
int igroup);
323 void canvasRefreshGroupIndex(
void);
324 void canvasChartsRefresh(
int dbi_hint);
326 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
328 void UpdateCanvasS52PLIBConfig();
330 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
331 void OnRouteFinishTimerEvent(wxTimerEvent &event);
333 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
334 void SetupCanvasQuiltMode(
void);
337 bool SetVPRotation(
double angle);
338 double GetVPRotation(
void) {
return GetVP().
rotation; }
339 double GetVPSkew(
void) {
return GetVP().
skew; }
340 double GetVPTilt(
void) {
return GetVP().
tilt; }
342 void ClearbFollow(
void);
343 void SetbFollow(
void);
344 void TogglebFollow(
void);
345 bool GetbFollow() {
return m_bFollow; }
348 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
349 void SetAbsoluteMinScale(
double min_scale);
350 std::shared_ptr<HostApi121::PiPointContext> GetCanvasContextAtPoint(
int x,
438 void WarpPointerDeferred(
int x,
int y);
442 void ToggleCPAWarn();
444 bool IsMeasureActive() {
return m_bMeasure_Active; }
445 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
448 int GetUpMode() {
return m_upMode; }
449 bool GetLookahead() {
return m_bLookAhead; }
452 void SetQuiltMode(
bool b_quilt);
453 bool GetQuiltMode(
void);
454 std::vector<int> GetQuiltIndexArray(
void);
455 bool IsQuiltDelta(
void);
456 void SetQuiltChartHiLiteIndex(
int dbIndex);
457 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
458 void ClearQuiltChartHiLiteIndexArray();
459 int GetQuiltReferenceChartIndex(
void);
460 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
461 void ConfigureChartBar();
463 int GetNextContextMenuId();
465 TCWin *getTCWin() {
return pCwin; }
467 bool StartTimedMovement(
bool stoptimer =
true);
468 void DoTimedMovement();
484 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
485 void DoTimedMovementVP();
486 void StopMovementVP();
488 void StartTimedMovementTarget();
489 void DoTimedMovementTarget();
490 void StopMovementTarget();
492 void SetColorScheme(ColorScheme cs);
493 ColorScheme GetColorScheme() {
return m_cs; }
495 void CanvasApplyLocale();
496 void RebuildCursors();
499 int GetCanvasWidth() {
return m_canvas_width; }
500 int GetCanvasHeight() {
return m_canvas_height; }
517 double GetCanvasTrueScale() {
return m_true_scale_ppm; }
518 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
519 ViewPort *GetpVP() {
return &VPoint; }
523 Piano *GetPiano() {
return m_Piano; }
524 int GetPianoHeight();
526 bool isRouteEditing(
void) {
527 return m_bRouteEditing && m_pRoutePointEditTarget;
529 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
531 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
532 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
534 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
535 bool GetbTCUpdate() {
return m_bTCupdate; }
536 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
537 bool GetbShowCurrent() {
return m_bShowCurrent; }
538 void SetbShowTide(
bool f) { m_bShowTide = f; }
539 bool GetbShowTide() {
return m_bShowTide; }
540 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
541 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
544 void SetbEnableBasemapTile(
bool f) { m_bEnableBasemapTile = f; }
545 bool GetbEnableBasemapTile() {
return m_bEnableBasemapTile; }
547 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
548 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
549 void GetCursorLatLon(
double *lat,
double *lon);
553 void StopAutoPan(
void);
554 bool IsOwnshipOnScreen();
555 void DisableQuiltAdjustOnZoom(
bool disable) {
556 m_disable_adjust_on_zoom = disable;
577 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
578 bool stoptimer =
true);
594 void RotateCanvas(
double dir);
595 void DoRotateCanvas(
double rotation);
596 void DoTiltCanvas(
double tilt);
598 void ShowAISTargetList(
void);
600 void ShowGoToPosition(
void);
601 void HideGlobalToolbar();
602 void ShowGlobalToolbar();
604 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
605 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
606 bool GetShowGrid() {
return m_bDisplayGrid; }
607 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
608 bool GetShowOutlines() {
return m_bShowOutlines; }
609 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
610 bool GetShowChartbar() {
return true; }
611 wxRect GetMUIBarRect();
612 void SetMUIBarPosition();
613 void DestroyMuiBar();
616 void ToggleChartOutlines(
void);
617 void ToggleCanvasQuiltMode(
void);
619 wxString GetScaleText() {
return m_scaleText; }
620 bool GetShowAIS() {
return m_bShowAIS; }
621 void SetShowAIS(
bool show);
622 bool GetAttenAIS() {
return m_bShowAISScaled; }
623 void SetAttenAIS(
bool show);
624 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
625 bool GetShowFocusBar() {
return m_show_focus_bar; }
626 MUIBar *GetMUIBar() {
return m_muiBar; }
627 void SetAlertString(wxString str) { m_alertString = str; }
628 wxString GetAlertString() {
return m_alertString; }
629 bool GetShowENCText() {
return m_encShowText; }
630 void SetShowENCText(
bool show);
632 bool GetShowENCDepth() {
return m_encShowDepth; }
633 void SetShowENCDepth(
bool show);
635 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
636 void SetShowENCLightDesc(
bool show);
638 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
639 void SetShowENCBuoyLabels(
bool show);
641 bool GetShowENCLights() {
return m_encShowLights; }
642 void SetShowENCLights(
bool show);
646 bool GetShowENCAnchor() {
return m_encShowAnchor; }
647 void SetShowENCAnchor(
bool show);
649 bool GetShowENCDataQual() {
return m_encShowDataQual; }
650 void SetShowENCDataQual(
bool show);
652 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
654 void ShowTides(
bool bShow);
655 void ShowCurrents(
bool bShow);
656 void SetUpMode(
int mode);
657 void ToggleLookahead();
658 void SetShowGPS(
bool show);
659 void UpdateFollowButtonState(
void);
661 bool IsTileOverlayIndexInYesShow(
int index);
662 bool IsTileOverlayIndexInNoShow(
int index);
663 void AddTileOverlayIndexToNoShow(
int index);
665 Route *m_pMouseRoute;
666 bool m_bMeasure_Active;
670 wxString FindValidUploadPort();
671 wxString m_active_upload_port;
679 int GetQuiltChartCount();
680 void InvalidateAllQuiltPatchs(
void);
681 void SetQuiltRefChart(
int dbIndex);
682 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
684 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
685 std::vector<int> &GetQuiltFullScreendbIndexArray();
686 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
687 int GetQuiltRefChartdbIndex(
void);
688 void InvalidateQuilt(
void);
689 double GetQuiltMaxErrorFactor();
690 bool IsChartQuiltableRef(
int db_index);
692 int GetCanvasChartNativeScale();
693 int FindClosestCanvasChartdbIndex(
int scale);
694 void UpdateCanvasOnGroupChange(
void);
696 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
697 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
698 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
699 void ShowTrackPropertiesDialog(
Track *selected);
724 void UpdateGPSCompassStatusBox(
bool b_force_new);
727 wxColour GetFogColor() {
return m_fog_color; }
729 void ShowChartInfoWindow(
int x,
int dbIndex);
730 void HideChartInfoWindow(
void);
731 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
732 const std::vector<int> &index_vector);
734 void StartMeasureRoute();
735 void CancelMeasureRoute();
737 bool DoCanvasUpdate(
void);
738 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
739 void SelectQuiltRefChart(
int selected_index);
740 double GetBestVPScale(
ChartBase *pchart);
741 void selectCanvasChartDisplay(
int type,
int family);
742 void RemoveChartFromQuilt(
int dbIndex);
744 void HandlePianoClick(
int selected_index,
745 const std::vector<int> &selected_dbIndex_array);
746 void HandlePianoRClick(
int x,
int y,
int selected_index,
747 const std::vector<int> &selected_dbIndex_array);
748 void HandlePianoRollover(
int selected_index,
749 const std::vector<int> &selected_dbIndex_array,
750 int n_charts,
int scale);
751 void ClearPianoRollover();
752 void UpdateCanvasControlBar(
void);
753 void FormatPianoKeys(
void);
754 void PianoPopupMenu(
int x,
int y,
int selected_index,
755 const std::vector<int> &selected_dbIndex_array);
756 void OnPianoMenuDisableChart(wxCommandEvent &event);
757 void OnPianoMenuEnableChart(wxCommandEvent &event);
759 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
760 bool DoCanvasCOGSet(
void);
761 void ApplyGlobalSettings();
762 void SetShowGPSCompassWindow(
bool bshow);
763 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
764 void FreezePiano() { m_pianoFrozen =
true; }
765 void ThawPiano() { m_pianoFrozen =
false; }
766 void StartChartDragInertia();
767 void SetupGridFont();
771 wxCursor *pCursorPencil;
772 wxCursor *pCursorArrow;
773 wxCursor *pCursorCross;
774 wxCursor *pPlugIn_Cursor;
776 bool m_brepaint_piano;
813 bool m_bShowNavobjects;
818#ifdef HAVE_WX_GESTURE_EVENTS
819 double m_oldVPSScale;
822 wxPoint m_zoomStartPoint;
825 void DrawBlinkObjects(
void);
827 void StartRoute(
void);
828 wxString FinishRoute(
void);
834 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
836 bool m_FinishRouteOnKillFocus;
837 bool m_bMeasure_DistCircle;
838 bool m_bAppendingRoute;
840 Route *m_pMeasureRoute;
841 wxWindow *parent_frame;
843 int GetMinAvailableGshhgQuality() {
844 return pWorldBackgroundChart->GetMinAvailableQuality();
846 int GetMaxAvailableGshhgQuality() {
847 return pWorldBackgroundChart->GetMaxAvailableQuality();
849 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
850 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
851 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
853 void SetAISCanvasDisplayStyle(
int StyleIndx);
854 void TouchAISToolActive(
void);
855 void UpdateAISTBTool(
void);
857 void SelectChartFromStack(
int index,
bool bDir =
false,
858 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
859 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
860 void SelectdbChart(
int dbindex);
862 void DoCanvasStackDelta(
int direction);
864 void ProcessNewGUIScale();
866 bool m_b_paint_enable;
868 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
869 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
871 std::vector<int> m_tile_noshow_index_array;
872 std::vector<int> m_tile_yesshow_index_array;
873 std::vector<int> m_quilt_noshow_index_array;
875 std::vector<int> GetQuiltNoshowIindexArray() {
876 return m_quilt_noshow_index_array;
888 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
893 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
917 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
919 int AdjustQuiltRefChart();
920 bool UpdateS52State();
921 void CallPopupMenu(
int x,
int y);
922 bool IsTempMenuBarEnabled();
923 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
924 void OnMenuTimer(wxTimerEvent &event);
929 wxBitmap *pscratch_bm;
931 void PositionConsole(
void);
932 wxWindow *m_nmea_log;
934 wxColour PredColor();
935 wxColour ShipColor();
937 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
938 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
939 wxPoint &GpsOffsetPixels,
940 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
941 float &scale_factor_y);
943 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
944 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
945 wxPoint2DDouble lGPSPoint);
953 wxString m_scaleText;
955 bool m_bShowScaleInStatusBar;
957 bool m_bEnableBasemapTile;
959 wxPoint LastShipPoint;
960 wxPoint LastPredPoint;
961 bool m_bDrawingRoute;
962 bool m_bRouteEditing;
964 bool m_bRoutePoinDragging;
966 bool m_bMayToggleMenuBar;
969 bool m_isReplayingClickEvent =
false;
974 bool m_bChartDragging;
977 Route *m_pSelectedRoute;
978 Track *m_pSelectedTrack;
979 wxArrayPtrVoid *m_pEditRouteArray;
984 wxCursor *pCursorLeft;
985 wxCursor *pCursorRight;
987 wxCursor *pCursorDown;
989 wxCursor *pCursorUpLeft;
990 wxCursor *pCursorUpRight;
991 wxCursor *pCursorDownLeft;
992 wxCursor *pCursorDownRight;
996 wxBitmap *pThumbDIBShow;
997 wxBitmap *pThumbShowing;
999 bool bShowingCurrent;
1008 double m_canvas_scale_factor;
1010 double m_pix_per_mm;
1011 double m_display_size_mm;
1013 double m_absolute_min_scale_ppm;
1015 bool singleClickEventIsValid;
1016 wxMouseEvent singleClickEvent;
1018 std::vector<s57Sector_t> extendedSectorLegs;
1019 wxFont m_overzoomFont;
1020 int m_overzoomTextWidth;
1021 int m_overzoomTextHeight;
1024 void OnActivate(wxActivateEvent &event);
1025 void OnSize(wxSizeEvent &event);
1026 void MouseTimedEvent(wxTimerEvent &event);
1027 void MouseEvent(wxMouseEvent &event);
1028 void ShipDraw(
ocpnDC &dc);
1029 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
1030 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
1031 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
1033 void RotateTimerEvent(wxTimerEvent &event);
1034 void PanTimerEvent(wxTimerEvent &event);
1035 void MovementTimerEvent(wxTimerEvent &);
1036 void MovementStopTimerEvent(wxTimerEvent &);
1037 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1039 void MovementVPTimerEvent(wxTimerEvent &event);
1041 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1042 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1043 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1044 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1045 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1046 void DrawAnchorWatchPoints(
ocpnDC &dc);
1047 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
1049 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
1050 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
1051 void RebuildTideSelectList(LLBBox &BBox);
1052 void RebuildCurrentSelectList(LLBBox &BBox);
1053 IDX_entry *FindBestCurrentObject(
double lat,
double lon);
1057 void RenderRouteLegs(
ocpnDC &dc);
1058 void RenderVisibleSectorLights(
ocpnDC &dc);
1060 void AlertDraw(
ocpnDC &dc);
1062 void GridDraw(
ocpnDC &dc);
1063 void ScaleBarDraw(
ocpnDC &dc);
1065 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
1066 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
1069 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
1070 const wxString &str, ColorScheme cs);
1071 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1072 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1074 void CreateOZEmbossMapData(ColorScheme cs);
1076 void SetOverzoomFont();
1083 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1084 void HandleNotificationMouseClick();
1090 int m_canvas_height;
1098 wxPoint m_last_touch_down_pos;
1109 wxTimer *pMovementStopTimer;
1111 wxTimer *pCurTrackTimer;
1113 wxTimer *pRotDefTimer;
1115 wxTimer *m_DoubleClickTimer;
1116 wxTimer m_routeFinishTimer;
1118 wxTimer m_RolloverPopupTimer;
1120 wxTimer m_VPMovementTimer;
1122 int m_wheelzoom_stop_oneshot;
1123 int m_last_wheel_dir;
1124 wxStopWatch m_wheelstopwatch;
1125 double m_zoom_target;
1127 int m_curtrack_timer_msec;
1128 int m_rollover_popup_timer_msec;
1133 wxBitmap *pss_overlay_bmp;
1134 wxMask *pss_overlay_mask;
1136 wxRect ship_draw_rect;
1137 wxRect ship_draw_last_rect;
1138 wxRect ais_draw_rect;
1139 wxRect alert_draw_rect;
1141 wxBitmap *proute_bm;
1142 wxMemoryDC m_dc_route;
1166 double m_true_scale_ppm;
1168 ownship_state_t m_ownship_state;
1172 wxBitmap m_bmTideDay;
1173 wxBitmap m_bmTideDusk;
1174 wxBitmap m_bmTideNight;
1175 wxBitmap m_bmCurrentDay;
1176 wxBitmap m_bmCurrentDusk;
1177 wxBitmap m_bmCurrentNight;
1178 wxBitmap m_cTideBitmap;
1179 wxBitmap m_cCurrentBitmap;
1187 wxImage m_os_image_red_day;
1188 wxImage m_os_image_red_dusk;
1189 wxImage m_os_image_red_night;
1190 wxImage m_os_image_grey_day;
1191 wxImage m_os_image_grey_dusk;
1192 wxImage m_os_image_grey_night;
1193 wxImage m_os_image_yellow_day;
1194 wxImage m_os_image_yellow_dusk;
1195 wxImage m_os_image_yellow_night;
1197 wxImage *m_pos_image_red;
1198 wxImage *m_pos_image_grey;
1199 wxImage *m_pos_image_yellow;
1201 wxImage *m_pos_image_user;
1202 wxImage *m_pos_image_user_grey;
1203 wxImage *m_pos_image_user_yellow;
1205 wxImage *m_pos_image_user_day;
1206 wxImage *m_pos_image_user_dusk;
1207 wxImage *m_pos_image_user_night;
1208 wxImage *m_pos_image_user_grey_day;
1209 wxImage *m_pos_image_user_grey_dusk;
1210 wxImage *m_pos_image_user_grey_night;
1211 wxImage *m_pos_image_user_yellow_day;
1212 wxImage *m_pos_image_user_yellow_dusk;
1213 wxImage *m_pos_image_user_yellow_night;
1215 wxImage m_ship_pix_image;
1217 bool m_cur_ship_pix_isgrey;
1218 ColorScheme m_ship_cs;
1221 wxBitmap *m_prot_bm;
1229 double m_wheel_lat, m_wheel_lon;
1230 int m_wheel_x, m_wheel_y;
1233 wxBitmap m_working_bm;
1234 wxBitmap m_cached_chart_bm;
1239 bool m_bzooming, m_bzooming_to_cursor;
1248 int m_panx, m_pany, m_modkeys;
1250 bool m_bmouse_key_mod;
1251 double m_zoom_factor, m_rotation_speed;
1259 wxDateTime m_last_movement_time;
1261 int m_AISRollover_MMSI;
1262 bool m_bsectors_shown;
1264 double m_displayed_scale_factor;
1266 wxColour m_fog_color;
1267 bool m_disable_edge_pan;
1268 wxFont *m_pgridFont;
1270 bool m_dragoffsetSet;
1274 double m_vLat, m_vLon;
1277 bool m_bpersistent_quilt;
1279 wxMenu *m_piano_ctx_menu;
1280 int menu_selected_dbIndex, menu_selected_index;
1288 bool m_mouseWasInCompass;
1290 wxRect m_mainlast_tb_rect;
1291 int m_restore_dbindex;
1292 int m_restore_group;
1295 wxSize m_muiBarHOSize;
1297 bool m_bShowOutlines;
1298 bool m_bDisplayGrid;
1299 bool m_bShowDepthUnits;
1301 bool m_bShowAISScaled;
1304 long m_s52StateHash;
1306 bool m_encShowDepth;
1307 bool m_encShowLightDesc;
1308 bool m_encShowBuoyLabels;
1309 int m_encDisplayCategory;
1310 bool m_encShowLights;
1311 bool m_encShowAnchor;
1312 bool m_encShowDataQual;
1314 wxTimer m_deferredFocusTimer;
1315 float m_focus_indicator_pix;
1319 double m_OSoffsetx, m_OSoffsety;
1320 bool m_MouseDragging;
1322 wxString m_alertString;
1323 wxRect m_scaleBarRect;
1324 bool m_bShowCompassWin;
1327 double m_sector_glat, m_sector_glon;
1328 std::vector<s57Sector_t> m_sectorlegsVisible;
1329 bool m_bShowVisibleSectors;
1331 double m_displayScale;
1332 bool m_show_focus_bar;
1334 double m_panx_target_final;
1335 double m_pany_target_final;
1336 double m_panx_target_now;
1337 double m_pany_target_now;
1339 double m_start_lat, m_start_lon;
1340 double m_target_lat, m_target_lon;
1341 double m_run_lat, m_run_lon;
1342 bool m_timed_move_vp_active;
1346 double meters_to_shift = 0;
1347 double dir_to_shift = 0;
1350 wxTimer m_chart_drag_inertia_timer;
1351 void OnChartDragInertiaTimer(wxTimerEvent &event);
1353 uint64_t m_last_drag_time;
1354 int m_chart_drag_total_x;
1355 int m_chart_drag_total_y;
1356 double m_chart_drag_total_time;
1357 double m_chart_drag_velocity_x;
1358 double m_chart_drag_velocity_y;
1359 wxLongLong m_chart_drag_inertia_time;
1360 wxLongLong m_chart_drag_inertia_start_time;
1361 bool m_chart_drag_inertia_active;
1362 double m_last_elapsed;
1363 std::vector<int> m_drag_vec_x;
1364 std::vector<int> m_drag_vec_y;
1365 std::vector<double> m_drag_vec_t;
1366 int m_inertia_last_drag_x;
1367 int m_inertia_last_drag_y;
1370 wxTimer m_easeTimer;
1371 wxLongLong m_animationStart;
1372 wxLongLong m_animationDuration;
1373 double m_startLat, m_startLon, m_startScale;
1374 double m_endLat, m_endLon, m_endScale;
1375 bool m_animationActive;
1376 void OnJumpEaseTimer(wxTimerEvent &event);
1377 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1378 bool m_disable_adjust_on_zoom;
1382 ObservableListener evt_notificationlist_change_listener;
1384 wxStopWatch m_sw_left_down;
1385 wxStopWatch m_sw_left_up;
1386 long m_sw_down_time;
1388 wxTimer m_tap_timer;
1389 wxPoint m_lastTapPos;
1391 void OnTapTimer(wxTimerEvent &event);
1393 uint64_t m_DragTriggerStartTime;
1395 DECLARE_EVENT_TABLE()