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; }
543 void SetbEnableBasemapTile(
bool f) { m_bEnableBasemapTile = f; }
544 bool GetbEnableBasemapTile() {
return m_bEnableBasemapTile; }
546 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
547 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
548 void GetCursorLatLon(
double *lat,
double *lon);
552 void StopAutoPan(
void);
553 bool IsOwnshipOnScreen();
554 void DisableQuiltAdjustOnZoom(
bool disable) {
555 m_disable_adjust_on_zoom = disable;
576 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
577 bool stoptimer =
true);
593 void RotateCanvas(
double dir);
594 void DoRotateCanvas(
double rotation);
595 void DoTiltCanvas(
double tilt);
597 void ShowAISTargetList(
void);
599 void ShowGoToPosition(
void);
600 void HideGlobalToolbar();
601 void ShowGlobalToolbar();
603 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
604 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
605 bool GetShowGrid() {
return m_bDisplayGrid; }
606 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
607 bool GetShowOutlines() {
return m_bShowOutlines; }
608 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
609 bool GetShowChartbar() {
return true; }
610 wxRect GetMUIBarRect();
611 void SetMUIBarPosition();
612 void DestroyMuiBar();
615 void ToggleChartOutlines(
void);
616 void ToggleCanvasQuiltMode(
void);
618 wxString GetScaleText() {
return m_scaleText; }
619 bool GetShowAIS() {
return m_bShowAIS; }
620 void SetShowAIS(
bool show);
621 bool GetAttenAIS() {
return m_bShowAISScaled; }
622 void SetAttenAIS(
bool show);
623 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
624 bool GetShowFocusBar() {
return m_show_focus_bar; }
625 MUIBar *GetMUIBar() {
return m_muiBar; }
626 void SetAlertString(wxString str) { m_alertString = str; }
627 wxString GetAlertString() {
return m_alertString; }
628 bool GetShowENCText() {
return m_encShowText; }
629 void SetShowENCText(
bool show);
631 bool GetShowENCDepth() {
return m_encShowDepth; }
632 void SetShowENCDepth(
bool show);
634 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
635 void SetShowENCLightDesc(
bool show);
637 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
638 void SetShowENCBuoyLabels(
bool show);
640 bool GetShowENCLights() {
return m_encShowLights; }
641 void SetShowENCLights(
bool show);
645 bool GetShowENCAnchor() {
return m_encShowAnchor; }
646 void SetShowENCAnchor(
bool show);
648 bool GetShowENCDataQual() {
return m_encShowDataQual; }
649 void SetShowENCDataQual(
bool show);
651 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
653 void ShowTides(
bool bShow);
654 void ShowCurrents(
bool bShow);
655 void SetUpMode(
int mode);
656 void ToggleLookahead();
657 void SetShowGPS(
bool show);
658 void UpdateFollowButtonState(
void);
660 bool IsTileOverlayIndexInYesShow(
int index);
661 bool IsTileOverlayIndexInNoShow(
int index);
662 void AddTileOverlayIndexToNoShow(
int index);
664 Route *m_pMouseRoute;
665 bool m_bMeasure_Active;
669 wxString FindValidUploadPort();
670 wxString m_active_upload_port;
678 int GetQuiltChartCount();
679 void InvalidateAllQuiltPatchs(
void);
680 void SetQuiltRefChart(
int dbIndex);
681 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
683 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
684 std::vector<int> &GetQuiltFullScreendbIndexArray();
685 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
686 int GetQuiltRefChartdbIndex(
void);
687 void InvalidateQuilt(
void);
688 double GetQuiltMaxErrorFactor();
689 bool IsChartQuiltableRef(
int db_index);
691 int GetCanvasChartNativeScale();
692 int FindClosestCanvasChartdbIndex(
int scale);
693 void UpdateCanvasOnGroupChange(
void);
695 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
696 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
697 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
698 void ShowTrackPropertiesDialog(
Track *selected);
723 void UpdateGPSCompassStatusBox(
bool b_force_new);
726 wxColour GetFogColor() {
return m_fog_color; }
728 void ShowChartInfoWindow(
int x,
int dbIndex);
729 void HideChartInfoWindow(
void);
730 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
731 const std::vector<int> &index_vector);
733 void StartMeasureRoute();
734 void CancelMeasureRoute();
736 bool DoCanvasUpdate(
void);
737 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
738 void SelectQuiltRefChart(
int selected_index);
739 double GetBestVPScale(
ChartBase *pchart);
740 void selectCanvasChartDisplay(
int type,
int family);
741 void RemoveChartFromQuilt(
int dbIndex);
743 void HandlePianoClick(
int selected_index,
744 const std::vector<int> &selected_dbIndex_array);
745 void HandlePianoRClick(
int x,
int y,
int selected_index,
746 const std::vector<int> &selected_dbIndex_array);
747 void HandlePianoRollover(
int selected_index,
748 const std::vector<int> &selected_dbIndex_array,
749 int n_charts,
int scale);
750 void ClearPianoRollover();
751 void UpdateCanvasControlBar(
void);
752 void FormatPianoKeys(
void);
753 void PianoPopupMenu(
int x,
int y,
int selected_index,
754 const std::vector<int> &selected_dbIndex_array);
755 void OnPianoMenuDisableChart(wxCommandEvent &event);
756 void OnPianoMenuEnableChart(wxCommandEvent &event);
758 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
759 bool DoCanvasCOGSet(
void);
760 void ApplyGlobalSettings();
761 void SetShowGPSCompassWindow(
bool bshow);
762 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
763 void FreezePiano() { m_pianoFrozen =
true; }
764 void ThawPiano() { m_pianoFrozen =
false; }
765 void StartChartDragInertia();
766 void SetupGridFont();
770 wxCursor *pCursorPencil;
771 wxCursor *pCursorArrow;
772 wxCursor *pCursorCross;
773 wxCursor *pPlugIn_Cursor;
775 bool m_brepaint_piano;
812 bool m_bShowNavobjects;
817#ifdef HAVE_WX_GESTURE_EVENTS
818 double m_oldVPSScale;
821 wxPoint m_zoomStartPoint;
824 void DrawBlinkObjects(
void);
826 void StartRoute(
void);
827 wxString FinishRoute(
void);
833 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
835 bool m_FinishRouteOnKillFocus;
836 bool m_bMeasure_DistCircle;
837 bool m_bAppendingRoute;
839 Route *m_pMeasureRoute;
840 wxWindow *parent_frame;
842 int GetMinAvailableGshhgQuality() {
843 return pWorldBackgroundChart->GetMinAvailableQuality();
845 int GetMaxAvailableGshhgQuality() {
846 return pWorldBackgroundChart->GetMaxAvailableQuality();
848 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
849 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
850 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
852 void SetAISCanvasDisplayStyle(
int StyleIndx);
853 void TouchAISToolActive(
void);
854 void UpdateAISTBTool(
void);
856 void SelectChartFromStack(
int index,
bool bDir =
false,
857 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
858 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
859 void SelectdbChart(
int dbindex);
861 void DoCanvasStackDelta(
int direction);
863 void ProcessNewGUIScale();
865 bool m_b_paint_enable;
867 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
868 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
870 std::vector<int> m_tile_noshow_index_array;
871 std::vector<int> m_tile_yesshow_index_array;
872 std::vector<int> m_quilt_noshow_index_array;
874 std::vector<int> GetQuiltNoshowIindexArray() {
875 return m_quilt_noshow_index_array;
887 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
892 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
916 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
918 int AdjustQuiltRefChart();
919 bool UpdateS52State();
920 void CallPopupMenu(
int x,
int y);
921 bool IsTempMenuBarEnabled();
922 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
923 void OnMenuTimer(wxTimerEvent &event);
928 wxBitmap *pscratch_bm;
930 void PositionConsole(
void);
931 wxWindow *m_nmea_log;
933 wxColour PredColor();
934 wxColour ShipColor();
936 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
937 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
938 wxPoint &GpsOffsetPixels,
939 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
940 float &scale_factor_y);
942 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
943 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
944 wxPoint2DDouble lGPSPoint);
952 wxString m_scaleText;
954 bool m_bShowScaleInStatusBar;
956 bool m_bEnableBasemapTile;
958 wxPoint LastShipPoint;
959 wxPoint LastPredPoint;
960 bool m_bDrawingRoute;
961 bool m_bRouteEditing;
963 bool m_bRoutePoinDragging;
965 bool m_bMayToggleMenuBar;
970 bool m_bChartDragging;
973 Route *m_pSelectedRoute;
974 Track *m_pSelectedTrack;
975 wxArrayPtrVoid *m_pEditRouteArray;
980 wxCursor *pCursorLeft;
981 wxCursor *pCursorRight;
983 wxCursor *pCursorDown;
985 wxCursor *pCursorUpLeft;
986 wxCursor *pCursorUpRight;
987 wxCursor *pCursorDownLeft;
988 wxCursor *pCursorDownRight;
992 wxBitmap *pThumbDIBShow;
993 wxBitmap *pThumbShowing;
995 bool bShowingCurrent;
1004 double m_canvas_scale_factor;
1006 double m_pix_per_mm;
1007 double m_display_size_mm;
1009 double m_absolute_min_scale_ppm;
1011 bool singleClickEventIsValid;
1012 wxMouseEvent singleClickEvent;
1014 std::vector<s57Sector_t> extendedSectorLegs;
1015 wxFont m_overzoomFont;
1016 int m_overzoomTextWidth;
1017 int m_overzoomTextHeight;
1020 void OnActivate(wxActivateEvent &event);
1021 void OnSize(wxSizeEvent &event);
1022 void MouseTimedEvent(wxTimerEvent &event);
1023 void MouseEvent(wxMouseEvent &event);
1024 void ShipDraw(
ocpnDC &dc);
1025 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
1026 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
1027 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
1029 void RotateTimerEvent(wxTimerEvent &event);
1030 void PanTimerEvent(wxTimerEvent &event);
1031 void MovementTimerEvent(wxTimerEvent &);
1032 void MovementStopTimerEvent(wxTimerEvent &);
1033 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1035 void MovementVPTimerEvent(wxTimerEvent &event);
1037 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1038 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1039 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1040 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1041 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1042 void DrawAnchorWatchPoints(
ocpnDC &dc);
1043 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
1045 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
1046 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
1047 void RebuildTideSelectList(LLBBox &BBox);
1048 void RebuildCurrentSelectList(LLBBox &BBox);
1049 IDX_entry *FindBestCurrentObject(
double lat,
double lon);
1053 void RenderRouteLegs(
ocpnDC &dc);
1054 void RenderVisibleSectorLights(
ocpnDC &dc);
1056 void AlertDraw(
ocpnDC &dc);
1058 void GridDraw(
ocpnDC &dc);
1059 void ScaleBarDraw(
ocpnDC &dc);
1061 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
1062 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
1065 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
1066 const wxString &str, ColorScheme cs);
1067 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1068 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1070 void CreateOZEmbossMapData(ColorScheme cs);
1072 void SetOverzoomFont();
1079 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1080 void HandleNotificationMouseClick();
1086 int m_canvas_height;
1094 wxPoint m_last_touch_down_pos;
1105 wxTimer *pMovementStopTimer;
1107 wxTimer *pCurTrackTimer;
1109 wxTimer *pRotDefTimer;
1111 wxTimer *m_DoubleClickTimer;
1112 wxTimer m_routeFinishTimer;
1114 wxTimer m_RolloverPopupTimer;
1116 wxTimer m_VPMovementTimer;
1118 int m_wheelzoom_stop_oneshot;
1119 int m_last_wheel_dir;
1120 wxStopWatch m_wheelstopwatch;
1121 double m_zoom_target;
1123 int m_curtrack_timer_msec;
1124 int m_rollover_popup_timer_msec;
1129 wxBitmap *pss_overlay_bmp;
1130 wxMask *pss_overlay_mask;
1132 wxRect ship_draw_rect;
1133 wxRect ship_draw_last_rect;
1134 wxRect ais_draw_rect;
1135 wxRect alert_draw_rect;
1137 wxBitmap *proute_bm;
1138 wxMemoryDC m_dc_route;
1162 double m_true_scale_ppm;
1164 ownship_state_t m_ownship_state;
1168 wxBitmap m_bmTideDay;
1169 wxBitmap m_bmTideDusk;
1170 wxBitmap m_bmTideNight;
1171 wxBitmap m_bmCurrentDay;
1172 wxBitmap m_bmCurrentDusk;
1173 wxBitmap m_bmCurrentNight;
1174 wxBitmap m_cTideBitmap;
1175 wxBitmap m_cCurrentBitmap;
1183 wxImage m_os_image_red_day;
1184 wxImage m_os_image_red_dusk;
1185 wxImage m_os_image_red_night;
1186 wxImage m_os_image_grey_day;
1187 wxImage m_os_image_grey_dusk;
1188 wxImage m_os_image_grey_night;
1189 wxImage m_os_image_yellow_day;
1190 wxImage m_os_image_yellow_dusk;
1191 wxImage m_os_image_yellow_night;
1193 wxImage *m_pos_image_red;
1194 wxImage *m_pos_image_grey;
1195 wxImage *m_pos_image_yellow;
1197 wxImage *m_pos_image_user;
1198 wxImage *m_pos_image_user_grey;
1199 wxImage *m_pos_image_user_yellow;
1201 wxImage *m_pos_image_user_day;
1202 wxImage *m_pos_image_user_dusk;
1203 wxImage *m_pos_image_user_night;
1204 wxImage *m_pos_image_user_grey_day;
1205 wxImage *m_pos_image_user_grey_dusk;
1206 wxImage *m_pos_image_user_grey_night;
1207 wxImage *m_pos_image_user_yellow_day;
1208 wxImage *m_pos_image_user_yellow_dusk;
1209 wxImage *m_pos_image_user_yellow_night;
1211 wxImage m_ship_pix_image;
1213 bool m_cur_ship_pix_isgrey;
1214 ColorScheme m_ship_cs;
1217 wxBitmap *m_prot_bm;
1225 double m_wheel_lat, m_wheel_lon;
1226 int m_wheel_x, m_wheel_y;
1229 wxBitmap m_working_bm;
1230 wxBitmap m_cached_chart_bm;
1235 bool m_bzooming, m_bzooming_to_cursor;
1244 int m_panx, m_pany, m_modkeys;
1246 bool m_bmouse_key_mod;
1247 double m_zoom_factor, m_rotation_speed;
1255 wxDateTime m_last_movement_time;
1257 int m_AISRollover_MMSI;
1258 bool m_bsectors_shown;
1260 double m_displayed_scale_factor;
1262 wxColour m_fog_color;
1263 bool m_disable_edge_pan;
1264 wxFont *m_pgridFont;
1266 bool m_dragoffsetSet;
1270 double m_vLat, m_vLon;
1273 bool m_bpersistent_quilt;
1275 wxMenu *m_piano_ctx_menu;
1276 int menu_selected_dbIndex, menu_selected_index;
1284 bool m_mouseWasInCompass;
1286 wxRect m_mainlast_tb_rect;
1287 int m_restore_dbindex;
1288 int m_restore_group;
1291 wxSize m_muiBarHOSize;
1293 bool m_bShowOutlines;
1294 bool m_bDisplayGrid;
1295 bool m_bShowDepthUnits;
1297 bool m_bShowAISScaled;
1300 long m_s52StateHash;
1302 bool m_encShowDepth;
1303 bool m_encShowLightDesc;
1304 bool m_encShowBuoyLabels;
1305 int m_encDisplayCategory;
1306 bool m_encShowLights;
1307 bool m_encShowAnchor;
1308 bool m_encShowDataQual;
1310 wxTimer m_deferredFocusTimer;
1311 float m_focus_indicator_pix;
1315 double m_OSoffsetx, m_OSoffsety;
1316 bool m_MouseDragging;
1318 wxString m_alertString;
1319 wxRect m_scaleBarRect;
1320 bool m_bShowCompassWin;
1323 double m_sector_glat, m_sector_glon;
1324 std::vector<s57Sector_t> m_sectorlegsVisible;
1325 bool m_bShowVisibleSectors;
1327 double m_displayScale;
1328 bool m_show_focus_bar;
1330 double m_panx_target_final;
1331 double m_pany_target_final;
1332 double m_panx_target_now;
1333 double m_pany_target_now;
1335 double m_start_lat, m_start_lon;
1336 double m_target_lat, m_target_lon;
1337 double m_run_lat, m_run_lon;
1338 bool m_timed_move_vp_active;
1342 double meters_to_shift = 0;
1343 double dir_to_shift = 0;
1346 wxTimer m_chart_drag_inertia_timer;
1347 void OnChartDragInertiaTimer(wxTimerEvent &event);
1349 uint64_t m_last_drag_time;
1350 int m_chart_drag_total_x;
1351 int m_chart_drag_total_y;
1352 double m_chart_drag_total_time;
1353 double m_chart_drag_velocity_x;
1354 double m_chart_drag_velocity_y;
1355 wxLongLong m_chart_drag_inertia_time;
1356 wxLongLong m_chart_drag_inertia_start_time;
1357 bool m_chart_drag_inertia_active;
1358 double m_last_elapsed;
1359 std::vector<int> m_drag_vec_x;
1360 std::vector<int> m_drag_vec_y;
1361 std::vector<double> m_drag_vec_t;
1362 int m_inertia_last_drag_x;
1363 int m_inertia_last_drag_y;
1366 wxTimer m_easeTimer;
1367 wxLongLong m_animationStart;
1368 wxLongLong m_animationDuration;
1369 double m_startLat, m_startLon, m_startScale;
1370 double m_endLat, m_endLon, m_endScale;
1371 bool m_animationActive;
1372 void OnJumpEaseTimer(wxTimerEvent &event);
1373 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1374 bool m_disable_adjust_on_zoom;
1380 wxStopWatch m_sw_left_down;
1381 wxStopWatch m_sw_left_up;
1382 long m_sw_down_time;
1384 wxTimer m_tap_timer;
1385 wxPoint m_lastTapPos;
1387 void OnTapTimer(wxTimerEvent &event);
1389 uint64_t m_DragTriggerStartTime;
1391 DECLARE_EVENT_TABLE()