161 ChartCanvas(wxFrame *frame,
int canvasIndex, wxWindow *nmea_log);
164 void SetupGlCanvas();
167 void OnKeyDown(wxKeyEvent &event);
168 void OnKeyUp(wxKeyEvent &event);
169 void OnKeyChar(wxKeyEvent &event);
170 void OnPaint(wxPaintEvent &event);
172 void Scroll(
int dx,
int dy);
173 void ResetGridFont() { m_pgridFont =
nullptr; }
175 void OnToolLeftClick(wxCommandEvent &event);
177 bool MouseEventOverlayWindows(wxMouseEvent &event);
178 bool MouseEventChartBar(wxMouseEvent &event);
179 bool MouseEventMUIBar(wxMouseEvent &event);
180 bool MouseEventToolbar(wxMouseEvent &event);
181 bool MouseEventIENCBar(wxMouseEvent &event);
183 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
184 bool MouseEventProcessObjects(wxMouseEvent &event);
201 void SetCanvasCursor(wxMouseEvent &event);
202 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
203 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
204#ifdef HAVE_WX_GESTURE_EVENTS
205 void OnZoom(wxZoomGestureEvent &event);
206 void OnLongPress(wxLongPressEvent &event);
207 void OnPressAndTap(wxPressAndTapEvent &event);
209 void OnLeftDown(wxMouseEvent &evt);
210 void OnLeftUp(wxMouseEvent &evt);
212 void OnRightUp(wxMouseEvent &event);
213 void OnRightDown(wxMouseEvent &event);
215 void OnDoubleLeftClick(wxMouseEvent &event);
217 void OnWheel(wxMouseEvent &event);
218 void OnMotion(wxMouseEvent &event);
221 void PopupMenuHandler(wxCommandEvent &event);
222 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
224 bool SetUserOwnship();
226 double GetCanvasRangeMeters();
227 void SetCanvasRangeMeters(
double range);
229 void EnablePaint(
bool b_enable);
230 bool SetCursor(
const wxCursor &c)
override;
231 void Refresh(
bool eraseBackground =
true,
232 const wxRect *rect =
nullptr)
override;
233 void Update()
override;
235 void LostMouseCapture(wxMouseCaptureLostEvent &event);
237 void CancelMouseRoute();
258 bool SetVPScale(
double sc,
bool b_refresh =
true);
259 bool SetVPProjection(
int projection);
268 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
284 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
285 double rotation,
int projection = 0,
bool b_adjust =
true,
286 bool b_refresh =
true);
287 void ReloadVP(
bool b_adjust =
true);
288 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
290 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
291 void SetGroupIndex(
int index,
bool autoswitch =
false);
292 bool CheckGroup(
int igroup);
293 void canvasRefreshGroupIndex(
void);
294 void canvasChartsRefresh(
int dbi_hint);
296 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
298 void UpdateCanvasS52PLIBConfig();
300 void TriggerDeferredFocus();
301 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
302 void OnRouteFinishTimerEvent(wxTimerEvent &event);
304 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
305 void SetupCanvasQuiltMode(
void);
308 bool SetVPRotation(
double angle);
309 double GetVPRotation(
void) {
return GetVP().
rotation; }
310 double GetVPSkew(
void) {
return GetVP().
skew; }
311 double GetVPTilt(
void) {
return GetVP().
tilt; }
313 void ClearbFollow(
void);
314 void SetbFollow(
void);
315 void TogglebFollow(
void);
316 bool GetbFollow() {
return m_bFollow; }
319 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
320 void SetAbsoluteMinScale(
double min_scale);
321 std::shared_ptr<HostApi121::PiPointContext> GetCanvasContextAtPoint(
int x,
409 void WarpPointerDeferred(
int x,
int y);
413 void ToggleCPAWarn();
415 bool IsMeasureActive() {
return m_bMeasure_Active; }
416 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
419 int GetUpMode() {
return m_upMode; }
420 bool GetLookahead() {
return m_bLookAhead; }
423 void SetQuiltMode(
bool b_quilt);
424 bool GetQuiltMode(
void);
425 std::vector<int> GetQuiltIndexArray(
void);
426 bool IsQuiltDelta(
void);
427 void SetQuiltChartHiLiteIndex(
int dbIndex);
428 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
429 void ClearQuiltChartHiLiteIndexArray();
430 int GetQuiltReferenceChartIndex(
void);
431 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
432 void ConfigureChartBar();
434 int GetNextContextMenuId();
436 TCWin *getTCWin() {
return pCwin; }
438 bool StartTimedMovement(
bool stoptimer =
true);
439 void DoTimedMovement();
455 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
456 void DoTimedMovementVP();
457 void StopMovementVP();
459 void StartTimedMovementTarget();
460 void DoTimedMovementTarget();
461 void StopMovementTarget();
463 void SetColorScheme(ColorScheme cs);
464 ColorScheme GetColorScheme() {
return m_cs; }
466 void CanvasApplyLocale();
467 void RebuildCursors();
470 int GetCanvasWidth() {
return m_canvas_width; }
471 int GetCanvasHeight() {
return m_canvas_height; }
490 double GetCanvasTrueScale() {
return m_true_scale_ppm; }
491 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
492 ViewPort *GetpVP() {
return &VPoint; }
496 Piano *GetPiano() {
return m_Piano; }
497 int GetPianoHeight();
499 bool isRouteEditing(
void) {
500 return m_bRouteEditing && m_pRoutePointEditTarget;
502 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
504 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
505 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
507 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
508 bool GetbTCUpdate() {
return m_bTCupdate; }
509 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
510 bool GetbShowCurrent() {
return m_bShowCurrent; }
511 void SetbShowTide(
bool f) { m_bShowTide = f; }
512 bool GetbShowTide() {
return m_bShowTide; }
513 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
514 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
518 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
519 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
520 void GetCursorLatLon(
double *lat,
double *lon);
524 void StopAutoPan(
void);
525 bool IsOwnshipOnScreen();
526 void DisableQuiltAdjustOnZoom(
bool disable) {
527 m_disable_adjust_on_zoom = disable;
548 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
549 bool stoptimer =
true);
565 void RotateCanvas(
double dir);
566 void DoRotateCanvas(
double rotation);
567 void DoTiltCanvas(
double tilt);
569 void ShowAISTargetList(
void);
571 void ShowGoToPosition(
void);
572 void HideGlobalToolbar();
573 void ShowGlobalToolbar();
575 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
576 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
577 bool GetShowGrid() {
return m_bDisplayGrid; }
578 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
579 bool GetShowOutlines() {
return m_bShowOutlines; }
580 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
581 bool GetShowChartbar() {
return true; }
582 wxRect GetMUIBarRect();
583 void SetMUIBarPosition();
584 void DestroyMuiBar();
587 void ToggleChartOutlines(
void);
588 void ToggleCanvasQuiltMode(
void);
590 wxString GetScaleText() {
return m_scaleText; }
591 double GetScaleValue() {
return m_scaleValue; }
592 bool GetShowAIS() {
return m_bShowAIS; }
593 void SetShowAIS(
bool show);
594 bool GetAttenAIS() {
return m_bShowAISScaled; }
595 void SetAttenAIS(
bool show);
596 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
597 bool GetShowFocusBar() {
return m_show_focus_bar; }
598 MUIBar *GetMUIBar() {
return m_muiBar; }
599 void SetAlertString(wxString str) { m_alertString = str; }
600 wxString GetAlertString() {
return m_alertString; }
601 bool GetShowENCText() {
return m_encShowText; }
602 void SetShowENCText(
bool show);
604 bool GetShowENCDepth() {
return m_encShowDepth; }
605 void SetShowENCDepth(
bool show);
607 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
608 void SetShowENCLightDesc(
bool show);
610 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
611 void SetShowENCBuoyLabels(
bool show);
613 bool GetShowENCLights() {
return m_encShowLights; }
614 void SetShowENCLights(
bool show);
619 bool GetShowENCAnchor() {
return m_encShowAnchor; }
620 void SetShowENCAnchor(
bool show);
622 bool GetShowENCDataQual() {
return m_encShowDataQual; }
623 void SetShowENCDataQual(
bool show);
625 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
627 void ShowTides(
bool bShow);
628 void ShowCurrents(
bool bShow);
629 void SetUpMode(
int mode);
630 void ToggleLookahead();
631 void SetShowGPS(
bool show);
632 void UpdateFollowButtonState(
void);
634 bool IsTileOverlayIndexInYesShow(
int index);
635 bool IsTileOverlayIndexInNoShow(
int index);
636 void AddTileOverlayIndexToNoShow(
int index);
638 Route *m_pMouseRoute;
639 bool m_bMeasure_Active;
643 wxString FindValidUploadPort();
644 wxString m_active_upload_port;
652 int GetQuiltChartCount();
653 void InvalidateAllQuiltPatchs(
void);
654 void SetQuiltRefChart(
int dbIndex);
655 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
657 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
658 std::vector<int> &GetQuiltFullScreendbIndexArray();
659 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
660 int GetQuiltRefChartdbIndex(
void);
661 void InvalidateQuilt(
void);
662 double GetQuiltMaxErrorFactor();
663 bool IsChartQuiltableRef(
int db_index);
665 int GetCanvasChartNativeScale();
666 int FindClosestCanvasChartdbIndex(
int scale);
667 void UpdateCanvasOnGroupChange(
void);
669 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
670 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
671 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
672 void ShowTrackPropertiesDialog(
Track *selected);
697 void UpdateGPSCompassStatusBox(
bool b_force_new);
700 wxColour GetFogColor() {
return m_fog_color; }
702 void ShowChartInfoWindow(
int x,
int dbIndex);
703 void HideChartInfoWindow(
void);
704 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
705 const std::vector<int> &index_vector);
707 void StartMeasureRoute();
708 void CancelMeasureRoute();
710 bool DoCanvasUpdate(
void);
711 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
712 void SelectQuiltRefChart(
int selected_index);
713 double GetBestVPScale(
ChartBase *pchart);
714 void selectCanvasChartDisplay(
int type,
int family);
715 void RemoveChartFromQuilt(
int dbIndex);
717 void HandlePianoClick(
int selected_index,
718 const std::vector<int> &selected_dbIndex_array);
719 void HandlePianoRClick(
int x,
int y,
int selected_index,
720 const std::vector<int> &selected_dbIndex_array);
721 void HandlePianoRollover(
int selected_index,
722 const std::vector<int> &selected_dbIndex_array,
723 int n_charts,
int scale);
724 void ClearPianoRollover();
725 void UpdateCanvasControlBar(
void);
726 void FormatPianoKeys(
void);
727 void PianoPopupMenu(
int x,
int y,
int selected_index,
728 const std::vector<int> &selected_dbIndex_array);
729 void OnPianoMenuDisableChart(wxCommandEvent &event);
730 void OnPianoMenuEnableChart(wxCommandEvent &event);
732 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
733 bool DoCanvasCOGSet(
void);
734 void ApplyGlobalSettings();
735 void SetShowGPSCompassWindow(
bool bshow);
736 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
737 void FreezePiano() { m_pianoFrozen =
true; }
738 void ThawPiano() { m_pianoFrozen =
false; }
739 void StartChartDragInertia();
740 void SetupGridFont();
744 wxCursor *pCursorPencil;
745 wxCursor *pCursorArrow;
746 wxCursor *pCursorCross;
747 wxCursor *pPlugIn_Cursor;
749 wxBitmap *pscratch_bm;
750 bool m_brepaint_piano;
787 bool m_bShowNavobjects;
792#ifdef HAVE_WX_GESTURE_EVENTS
793 double m_oldVPSScale;
796 wxPoint m_zoomStartPoint;
799 void DrawBlinkObjects(
void);
801 void StartRoute(
void);
802 wxString FinishRoute(
void);
808 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
810 bool m_FinishRouteOnKillFocus;
811 bool m_bMeasure_DistCircle;
812 bool m_bAppendingRoute;
814 Route *m_pMeasureRoute;
817 int GetMinAvailableGshhgQuality() {
818 return pWorldBackgroundChart->GetMinAvailableQuality();
820 int GetMaxAvailableGshhgQuality() {
821 return pWorldBackgroundChart->GetMaxAvailableQuality();
823 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
824 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
825 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
827 void SetAISCanvasDisplayStyle(
int StyleIndx);
828 void TouchAISToolActive(
void);
829 void UpdateAISTBTool(
void);
831 void SelectChartFromStack(
int index,
bool bDir =
false,
832 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
833 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
834 void SelectdbChart(
int dbindex);
836 void DoCanvasStackDelta(
int direction);
838 void ProcessNewGUIScale();
840 bool m_b_paint_enable;
842 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
843 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
845 std::vector<int> m_tile_noshow_index_array;
846 std::vector<int> m_tile_yesshow_index_array;
847 std::vector<int> m_quilt_noshow_index_array;
849 std::vector<int> GetQuiltNoshowIindexArray() {
850 return m_quilt_noshow_index_array;
862 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
867 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
891 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
893 int AdjustQuiltRefChart();
894 bool UpdateS52State();
895 void CallPopupMenu(
int x,
int y);
896 bool IsTempMenuBarEnabled();
897 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
898 void OnMenuTimer(wxTimerEvent &event);
904 void PositionConsole(
void);
905 wxWindow *m_nmea_log;
907 wxColour PredColor();
908 wxColour ShipColor();
910 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
911 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
912 wxPoint &GpsOffsetPixels,
913 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
914 float &scale_factor_y);
916 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
917 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
918 wxPoint2DDouble lGPSPoint);
926 wxString m_scaleText;
928 bool m_bShowScaleInStatusBar;
931 wxPoint LastShipPoint;
932 wxPoint LastPredPoint;
933 bool m_bDrawingRoute;
934 bool m_bRouteEditing;
936 bool m_bRoutePoinDragging;
938 bool m_bMayToggleMenuBar;
943 bool m_bChartDragging;
944 Route *m_pSelectedRoute;
945 Track *m_pSelectedTrack;
946 wxArrayPtrVoid *m_pEditRouteArray;
951 wxCursor *pCursorLeft;
952 wxCursor *pCursorRight;
954 wxCursor *pCursorDown;
956 wxCursor *pCursorUpLeft;
957 wxCursor *pCursorUpRight;
958 wxCursor *pCursorDownLeft;
959 wxCursor *pCursorDownRight;
963 wxBitmap *pThumbDIBShow;
964 wxBitmap *pThumbShowing;
966 bool bShowingCurrent;
975 double m_canvas_scale_factor;
978 double m_display_size_mm;
980 double m_absolute_min_scale_ppm;
982 bool singleClickEventIsValid;
983 wxMouseEvent singleClickEvent;
985 std::vector<s57Sector_t> extendedSectorLegs;
986 wxFont m_overzoomFont;
987 int m_overzoomTextWidth;
988 int m_overzoomTextHeight;
991 void OnActivate(wxActivateEvent &event);
992 void OnSize(wxSizeEvent &event);
993 void MouseTimedEvent(wxTimerEvent &event);
994 void MouseEvent(wxMouseEvent &event);
995 void ShipDraw(
ocpnDC &dc);
996 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
997 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
998 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
1000 void RotateTimerEvent(wxTimerEvent &event);
1001 void PanTimerEvent(wxTimerEvent &event);
1002 void MovementTimerEvent(wxTimerEvent &);
1003 void MovementStopTimerEvent(wxTimerEvent &);
1004 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1006 void MovementVPTimerEvent(wxTimerEvent &event);
1008 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1009 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1010 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1011 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1012 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1013 void DrawAnchorWatchPoints(
ocpnDC &dc);
1014 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
1016 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
1017 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
1018 void RebuildTideSelectList(LLBBox &BBox);
1019 void RebuildCurrentSelectList(LLBBox &BBox);
1020 IDX_entry *FindBestCurrentObject(
double lat,
double lon);
1024 void RenderRouteLegs(
ocpnDC &dc);
1025 void RenderVisibleSectorLights(
ocpnDC &dc);
1027 void AlertDraw(
ocpnDC &dc);
1029 void GridDraw(
ocpnDC &dc);
1030 void ScaleBarDraw(
ocpnDC &dc);
1032 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
1033 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
1036 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
1037 const wxString &str, ColorScheme cs);
1038 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1039 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1041 void CreateOZEmbossMapData(ColorScheme cs);
1043 void SetOverzoomFont();
1050 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1051 void HandleNotificationMouseClick();
1057 int m_canvas_height;
1065 wxPoint m_last_touch_down_pos;
1076 wxTimer *pMovementStopTimer;
1078 wxTimer *pCurTrackTimer;
1080 wxTimer *pRotDefTimer;
1082 wxTimer *m_DoubleClickTimer;
1083 wxTimer m_routeFinishTimer;
1085 wxTimer m_RolloverPopupTimer;
1087 wxTimer m_VPMovementTimer;
1089 int m_wheelzoom_stop_oneshot;
1090 int m_last_wheel_dir;
1091 wxStopWatch m_wheelstopwatch;
1092 double m_zoom_target;
1094 int m_curtrack_timer_msec;
1095 int m_rollover_popup_timer_msec;
1100 wxBitmap *pss_overlay_bmp;
1101 wxMask *pss_overlay_mask;
1103 wxRect ship_draw_rect;
1104 wxRect ship_draw_last_rect;
1105 wxRect ais_draw_rect;
1106 wxRect alert_draw_rect;
1108 wxBitmap *proute_bm;
1109 wxMemoryDC m_dc_route;
1133 double m_true_scale_ppm;
1135 ownship_state_t m_ownship_state;
1139 wxBitmap m_bmTideDay;
1140 wxBitmap m_bmTideDusk;
1141 wxBitmap m_bmTideNight;
1142 wxBitmap m_bmCurrentDay;
1143 wxBitmap m_bmCurrentDusk;
1144 wxBitmap m_bmCurrentNight;
1145 wxBitmap m_cTideBitmap;
1146 wxBitmap m_cCurrentBitmap;
1154 wxImage m_os_image_red_day;
1155 wxImage m_os_image_red_dusk;
1156 wxImage m_os_image_red_night;
1157 wxImage m_os_image_grey_day;
1158 wxImage m_os_image_grey_dusk;
1159 wxImage m_os_image_grey_night;
1160 wxImage m_os_image_yellow_day;
1161 wxImage m_os_image_yellow_dusk;
1162 wxImage m_os_image_yellow_night;
1164 wxImage *m_pos_image_red;
1165 wxImage *m_pos_image_grey;
1166 wxImage *m_pos_image_yellow;
1168 wxImage *m_pos_image_user;
1169 wxImage *m_pos_image_user_grey;
1170 wxImage *m_pos_image_user_yellow;
1172 wxImage *m_pos_image_user_day;
1173 wxImage *m_pos_image_user_dusk;
1174 wxImage *m_pos_image_user_night;
1175 wxImage *m_pos_image_user_grey_day;
1176 wxImage *m_pos_image_user_grey_dusk;
1177 wxImage *m_pos_image_user_grey_night;
1178 wxImage *m_pos_image_user_yellow_day;
1179 wxImage *m_pos_image_user_yellow_dusk;
1180 wxImage *m_pos_image_user_yellow_night;
1182 wxImage m_ship_pix_image;
1184 bool m_cur_ship_pix_isgrey;
1185 ColorScheme m_ship_cs;
1188 wxBitmap *m_prot_bm;
1196 double m_wheel_lat, m_wheel_lon;
1197 int m_wheel_x, m_wheel_y;
1200 wxBitmap m_working_bm;
1201 wxBitmap m_cached_chart_bm;
1206 bool m_bzooming, m_bzooming_to_cursor;
1215 int m_panx, m_pany, m_modkeys;
1217 bool m_bmouse_key_mod;
1218 double m_zoom_factor, m_rotation_speed;
1226 wxDateTime m_last_movement_time;
1228 int m_AISRollover_MMSI;
1229 bool m_bsectors_shown;
1231 double m_displayed_scale_factor;
1233 wxColour m_fog_color;
1234 bool m_disable_edge_pan;
1235 wxFont *m_pgridFont;
1237 bool m_dragoffsetSet;
1241 double m_vLat, m_vLon;
1244 bool m_bpersistent_quilt;
1246 wxMenu *m_piano_ctx_menu;
1247 int menu_selected_dbIndex, menu_selected_index;
1255 bool m_mouseWasInCompass;
1257 wxRect m_mainlast_tb_rect;
1258 int m_restore_dbindex;
1259 int m_restore_group;
1262 wxSize m_muiBarHOSize;
1264 bool m_bShowOutlines;
1265 bool m_bDisplayGrid;
1266 bool m_bShowDepthUnits;
1268 bool m_bShowAISScaled;
1271 long m_s52StateHash;
1273 bool m_encShowDepth;
1274 bool m_encShowLightDesc;
1275 bool m_encShowBuoyLabels;
1276 int m_encDisplayCategory;
1277 bool m_encShowLights;
1278 bool m_encShowAnchor;
1279 bool m_encShowDataQual;
1281 wxTimer m_deferredFocusTimer;
1282 float m_focus_indicator_pix;
1286 double m_OSoffsetx, m_OSoffsety;
1287 bool m_MouseDragging;
1289 wxString m_alertString;
1290 wxRect m_scaleBarRect;
1291 bool m_bShowCompassWin;
1294 double m_sector_glat, m_sector_glon;
1295 std::vector<s57Sector_t> m_sectorlegsVisible;
1296 bool m_bShowVisibleSectors;
1298 double m_displayScale;
1299 bool m_show_focus_bar;
1301 double m_panx_target_final;
1302 double m_pany_target_final;
1303 double m_panx_target_now;
1304 double m_pany_target_now;
1306 double m_start_lat, m_start_lon;
1307 double m_target_lat, m_target_lon;
1308 double m_run_lat, m_run_lon;
1309 bool m_timed_move_vp_active;
1313 double meters_to_shift = 0;
1314 double dir_to_shift = 0;
1317 wxTimer m_chart_drag_inertia_timer;
1318 void OnChartDragInertiaTimer(wxTimerEvent &event);
1320 uint64_t m_last_drag_time;
1321 int m_chart_drag_total_x;
1322 int m_chart_drag_total_y;
1323 double m_chart_drag_total_time;
1324 double m_chart_drag_velocity_x;
1325 double m_chart_drag_velocity_y;
1326 wxLongLong m_chart_drag_inertia_time;
1327 wxLongLong m_chart_drag_inertia_start_time;
1328 bool m_chart_drag_inertia_active;
1329 double m_last_elapsed;
1330 std::vector<int> m_drag_vec_x;
1331 std::vector<int> m_drag_vec_y;
1332 std::vector<double> m_drag_vec_t;
1333 int m_inertia_last_drag_x;
1334 int m_inertia_last_drag_y;
1337 wxTimer m_easeTimer;
1338 wxLongLong m_animationStart;
1339 wxLongLong m_animationDuration;
1340 double m_startLat, m_startLon, m_startScale;
1341 double m_endLat, m_endLon, m_endScale;
1342 bool m_animationActive;
1343 void OnJumpEaseTimer(wxTimerEvent &event);
1344 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1345 bool m_disable_adjust_on_zoom;
1351 wxStopWatch m_sw_left_down;
1352 wxStopWatch m_sw_left_up;
1353 long m_sw_down_time;
1355 wxTimer m_tap_timer;
1356 wxPoint m_lastTapPos;
1358 void OnTapTimer(wxTimerEvent &event);
1360 uint64_t m_DragTriggerStartTime;
1362 DECLARE_EVENT_TABLE()