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<PI_PointContext> GetCanvasContextAtPoint(
int x,
int y);
408 void WarpPointerDeferred(
int x,
int y);
412 void ToggleCPAWarn();
414 bool IsMeasureActive() {
return m_bMeasure_Active; }
415 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
418 int GetUpMode() {
return m_upMode; }
419 bool GetLookahead() {
return m_bLookAhead; }
422 void SetQuiltMode(
bool b_quilt);
423 bool GetQuiltMode(
void);
424 std::vector<int> GetQuiltIndexArray(
void);
425 bool IsQuiltDelta(
void);
426 void SetQuiltChartHiLiteIndex(
int dbIndex);
427 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
428 void ClearQuiltChartHiLiteIndexArray();
429 int GetQuiltReferenceChartIndex(
void);
430 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
431 void ConfigureChartBar();
433 int GetNextContextMenuId();
435 TCWin *getTCWin() {
return pCwin; }
437 bool StartTimedMovement(
bool stoptimer =
true);
438 void DoTimedMovement();
454 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
455 void DoTimedMovementVP();
456 void StopMovementVP();
458 void StartTimedMovementTarget();
459 void DoTimedMovementTarget();
460 void StopMovementTarget();
462 void SetColorScheme(ColorScheme cs);
463 ColorScheme GetColorScheme() {
return m_cs; }
465 void CanvasApplyLocale();
466 void RebuildCursors();
469 int GetCanvasWidth() {
return m_canvas_width; }
470 int GetCanvasHeight() {
return m_canvas_height; }
489 double GetCanvasTrueScale() {
return m_true_scale_ppm; }
490 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
491 ViewPort *GetpVP() {
return &VPoint; }
495 Piano *GetPiano() {
return m_Piano; }
496 int GetPianoHeight();
498 bool isRouteEditing(
void) {
499 return m_bRouteEditing && m_pRoutePointEditTarget;
501 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
503 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
504 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
506 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
507 bool GetbTCUpdate() {
return m_bTCupdate; }
508 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
509 bool GetbShowCurrent() {
return m_bShowCurrent; }
510 void SetbShowTide(
bool f) { m_bShowTide = f; }
511 bool GetbShowTide() {
return m_bShowTide; }
512 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
513 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
517 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
518 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
519 void GetCursorLatLon(
double *lat,
double *lon);
523 void StopAutoPan(
void);
524 bool IsOwnshipOnScreen();
525 void DisableQuiltAdjustOnZoom(
bool disable) {
526 m_disable_adjust_on_zoom = disable;
547 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
548 bool stoptimer =
true);
564 void RotateCanvas(
double dir);
565 void DoRotateCanvas(
double rotation);
566 void DoTiltCanvas(
double tilt);
568 void ShowAISTargetList(
void);
570 void ShowGoToPosition(
void);
571 void HideGlobalToolbar();
572 void ShowGlobalToolbar();
574 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
575 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
576 bool GetShowGrid() {
return m_bDisplayGrid; }
577 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
578 bool GetShowOutlines() {
return m_bShowOutlines; }
579 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
580 bool GetShowChartbar() {
return true; }
581 wxRect GetMUIBarRect();
582 void SetMUIBarPosition();
583 void DestroyMuiBar();
586 void ToggleChartOutlines(
void);
587 void ToggleCanvasQuiltMode(
void);
589 wxString GetScaleText() {
return m_scaleText; }
590 double GetScaleValue() {
return m_scaleValue; }
591 bool GetShowAIS() {
return m_bShowAIS; }
592 void SetShowAIS(
bool show);
593 bool GetAttenAIS() {
return m_bShowAISScaled; }
594 void SetAttenAIS(
bool show);
595 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
596 bool GetShowFocusBar() {
return m_show_focus_bar; }
597 MUIBar *GetMUIBar() {
return m_muiBar; }
598 void SetAlertString(wxString str) { m_alertString = str; }
599 wxString GetAlertString() {
return m_alertString; }
600 bool GetShowENCText() {
return m_encShowText; }
601 void SetShowENCText(
bool show);
603 bool GetShowENCDepth() {
return m_encShowDepth; }
604 void SetShowENCDepth(
bool show);
606 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
607 void SetShowENCLightDesc(
bool show);
609 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
610 void SetShowENCBuoyLabels(
bool show);
612 bool GetShowENCLights() {
return m_encShowLights; }
613 void SetShowENCLights(
bool show);
618 bool GetShowENCAnchor() {
return m_encShowAnchor; }
619 void SetShowENCAnchor(
bool show);
621 bool GetShowENCDataQual() {
return m_encShowDataQual; }
622 void SetShowENCDataQual(
bool show);
624 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
626 void ShowTides(
bool bShow);
627 void ShowCurrents(
bool bShow);
628 void SetUpMode(
int mode);
629 void ToggleLookahead();
630 void SetShowGPS(
bool show);
631 void UpdateFollowButtonState(
void);
633 bool IsTileOverlayIndexInYesShow(
int index);
634 bool IsTileOverlayIndexInNoShow(
int index);
635 void AddTileOverlayIndexToNoShow(
int index);
637 Route *m_pMouseRoute;
638 bool m_bMeasure_Active;
642 wxString FindValidUploadPort();
643 wxString m_active_upload_port;
651 int GetQuiltChartCount();
652 void InvalidateAllQuiltPatchs(
void);
653 void SetQuiltRefChart(
int dbIndex);
654 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
656 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
657 std::vector<int> &GetQuiltFullScreendbIndexArray();
658 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
659 int GetQuiltRefChartdbIndex(
void);
660 void InvalidateQuilt(
void);
661 double GetQuiltMaxErrorFactor();
662 bool IsChartQuiltableRef(
int db_index);
664 int GetCanvasChartNativeScale();
665 int FindClosestCanvasChartdbIndex(
int scale);
666 void UpdateCanvasOnGroupChange(
void);
668 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
669 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
670 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
671 void ShowTrackPropertiesDialog(
Track *selected);
696 void UpdateGPSCompassStatusBox(
bool b_force_new);
699 wxColour GetFogColor() {
return m_fog_color; }
701 void ShowChartInfoWindow(
int x,
int dbIndex);
702 void HideChartInfoWindow(
void);
703 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
704 const std::vector<int> &index_vector);
706 void StartMeasureRoute();
707 void CancelMeasureRoute();
709 bool DoCanvasUpdate(
void);
710 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
711 void SelectQuiltRefChart(
int selected_index);
712 double GetBestVPScale(
ChartBase *pchart);
713 void selectCanvasChartDisplay(
int type,
int family);
714 void RemoveChartFromQuilt(
int dbIndex);
716 void HandlePianoClick(
int selected_index,
717 const std::vector<int> &selected_dbIndex_array);
718 void HandlePianoRClick(
int x,
int y,
int selected_index,
719 const std::vector<int> &selected_dbIndex_array);
720 void HandlePianoRollover(
int selected_index,
721 const std::vector<int> &selected_dbIndex_array,
722 int n_charts,
int scale);
723 void ClearPianoRollover();
724 void UpdateCanvasControlBar(
void);
725 void FormatPianoKeys(
void);
726 void PianoPopupMenu(
int x,
int y,
int selected_index,
727 const std::vector<int> &selected_dbIndex_array);
728 void OnPianoMenuDisableChart(wxCommandEvent &event);
729 void OnPianoMenuEnableChart(wxCommandEvent &event);
731 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
732 bool DoCanvasCOGSet(
void);
733 void ApplyGlobalSettings();
734 void SetShowGPSCompassWindow(
bool bshow);
735 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
736 void FreezePiano() { m_pianoFrozen =
true; }
737 void ThawPiano() { m_pianoFrozen =
false; }
738 void StartChartDragInertia();
739 void SetupGridFont();
743 wxCursor *pCursorPencil;
744 wxCursor *pCursorArrow;
745 wxCursor *pCursorCross;
746 wxCursor *pPlugIn_Cursor;
748 wxBitmap *pscratch_bm;
749 bool m_brepaint_piano;
786 bool m_bShowNavobjects;
791#ifdef HAVE_WX_GESTURE_EVENTS
792 double m_oldVPSScale;
795 wxPoint m_zoomStartPoint;
798 void DrawBlinkObjects(
void);
800 void StartRoute(
void);
801 wxString FinishRoute(
void);
807 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
809 bool m_FinishRouteOnKillFocus;
810 bool m_bMeasure_DistCircle;
811 bool m_bAppendingRoute;
813 Route *m_pMeasureRoute;
816 int GetMinAvailableGshhgQuality() {
817 return pWorldBackgroundChart->GetMinAvailableQuality();
819 int GetMaxAvailableGshhgQuality() {
820 return pWorldBackgroundChart->GetMaxAvailableQuality();
822 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
823 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
824 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
826 void SetAISCanvasDisplayStyle(
int StyleIndx);
827 void TouchAISToolActive(
void);
828 void UpdateAISTBTool(
void);
830 void SelectChartFromStack(
int index,
bool bDir =
false,
831 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
832 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
833 void SelectdbChart(
int dbindex);
835 void DoCanvasStackDelta(
int direction);
837 void ProcessNewGUIScale();
839 bool m_b_paint_enable;
841 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
842 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
844 std::vector<int> m_tile_noshow_index_array;
845 std::vector<int> m_tile_yesshow_index_array;
846 std::vector<int> m_quilt_noshow_index_array;
848 std::vector<int> GetQuiltNoshowIindexArray() {
849 return m_quilt_noshow_index_array;
861 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
866 RoutePoint *GetFoundRoutepoint() {
return m_pFoundRoutePoint; }
890 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
892 int AdjustQuiltRefChart();
893 bool UpdateS52State();
894 void CallPopupMenu(
int x,
int y);
895 bool IsTempMenuBarEnabled();
896 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
897 void OnMenuTimer(wxTimerEvent &event);
903 void PositionConsole(
void);
904 wxWindow *m_nmea_log;
906 wxColour PredColor();
907 wxColour ShipColor();
909 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
910 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
911 wxPoint &GpsOffsetPixels,
912 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
913 float &scale_factor_y);
915 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
916 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
917 wxPoint2DDouble lGPSPoint);
925 wxString m_scaleText;
927 bool m_bShowScaleInStatusBar;
930 wxPoint LastShipPoint;
931 wxPoint LastPredPoint;
932 bool m_bDrawingRoute;
933 bool m_bRouteEditing;
935 bool m_bRoutePoinDragging;
937 bool m_bMayToggleMenuBar;
942 bool m_bChartDragging;
943 Route *m_pSelectedRoute;
944 Track *m_pSelectedTrack;
945 wxArrayPtrVoid *m_pEditRouteArray;
950 wxCursor *pCursorLeft;
951 wxCursor *pCursorRight;
953 wxCursor *pCursorDown;
955 wxCursor *pCursorUpLeft;
956 wxCursor *pCursorUpRight;
957 wxCursor *pCursorDownLeft;
958 wxCursor *pCursorDownRight;
962 wxBitmap *pThumbDIBShow;
963 wxBitmap *pThumbShowing;
965 bool bShowingCurrent;
974 double m_canvas_scale_factor;
977 double m_display_size_mm;
979 double m_absolute_min_scale_ppm;
981 bool singleClickEventIsValid;
982 wxMouseEvent singleClickEvent;
984 std::vector<s57Sector_t> extendedSectorLegs;
985 wxFont m_overzoomFont;
986 int m_overzoomTextWidth;
987 int m_overzoomTextHeight;
990 void OnActivate(wxActivateEvent &event);
991 void OnSize(wxSizeEvent &event);
992 void MouseTimedEvent(wxTimerEvent &event);
993 void MouseEvent(wxMouseEvent &event);
994 void ShipDraw(
ocpnDC &dc);
995 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
996 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
997 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
999 void RotateTimerEvent(wxTimerEvent &event);
1000 void PanTimerEvent(wxTimerEvent &event);
1001 void MovementTimerEvent(wxTimerEvent &);
1002 void MovementStopTimerEvent(wxTimerEvent &);
1003 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1005 void MovementVPTimerEvent(wxTimerEvent &event);
1007 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1008 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1009 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1010 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1011 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
1012 void DrawAnchorWatchPoints(
ocpnDC &dc);
1013 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
1015 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
1016 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
1017 void RebuildTideSelectList(LLBBox &BBox);
1018 void RebuildCurrentSelectList(LLBBox &BBox);
1022 void RenderRouteLegs(
ocpnDC &dc);
1023 void RenderVisibleSectorLights(
ocpnDC &dc);
1025 void AlertDraw(
ocpnDC &dc);
1027 void GridDraw(
ocpnDC &dc);
1028 void ScaleBarDraw(
ocpnDC &dc);
1030 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
1031 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
1034 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
1035 const wxString &str, ColorScheme cs);
1036 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1037 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
1039 void CreateOZEmbossMapData(ColorScheme cs);
1041 void SetOverzoomFont();
1048 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
1049 void HandleNotificationMouseClick();
1055 int m_canvas_height;
1073 wxTimer *pMovementStopTimer;
1075 wxTimer *pCurTrackTimer;
1077 wxTimer *pRotDefTimer;
1079 wxTimer *m_DoubleClickTimer;
1080 wxTimer m_routeFinishTimer;
1082 wxTimer m_RolloverPopupTimer;
1084 wxTimer m_VPMovementTimer;
1086 int m_wheelzoom_stop_oneshot;
1087 int m_last_wheel_dir;
1088 wxStopWatch m_wheelstopwatch;
1089 double m_zoom_target;
1091 int m_curtrack_timer_msec;
1092 int m_rollover_popup_timer_msec;
1097 wxBitmap *pss_overlay_bmp;
1098 wxMask *pss_overlay_mask;
1100 wxRect ship_draw_rect;
1101 wxRect ship_draw_last_rect;
1102 wxRect ais_draw_rect;
1103 wxRect alert_draw_rect;
1105 wxBitmap *proute_bm;
1106 wxMemoryDC m_dc_route;
1130 double m_true_scale_ppm;
1132 ownship_state_t m_ownship_state;
1136 wxBitmap m_bmTideDay;
1137 wxBitmap m_bmTideDusk;
1138 wxBitmap m_bmTideNight;
1139 wxBitmap m_bmCurrentDay;
1140 wxBitmap m_bmCurrentDusk;
1141 wxBitmap m_bmCurrentNight;
1142 wxBitmap m_cTideBitmap;
1143 wxBitmap m_cCurrentBitmap;
1151 wxImage m_os_image_red_day;
1152 wxImage m_os_image_red_dusk;
1153 wxImage m_os_image_red_night;
1154 wxImage m_os_image_grey_day;
1155 wxImage m_os_image_grey_dusk;
1156 wxImage m_os_image_grey_night;
1157 wxImage m_os_image_yellow_day;
1158 wxImage m_os_image_yellow_dusk;
1159 wxImage m_os_image_yellow_night;
1161 wxImage *m_pos_image_red;
1162 wxImage *m_pos_image_grey;
1163 wxImage *m_pos_image_yellow;
1165 wxImage *m_pos_image_user;
1166 wxImage *m_pos_image_user_grey;
1167 wxImage *m_pos_image_user_yellow;
1169 wxImage *m_pos_image_user_day;
1170 wxImage *m_pos_image_user_dusk;
1171 wxImage *m_pos_image_user_night;
1172 wxImage *m_pos_image_user_grey_day;
1173 wxImage *m_pos_image_user_grey_dusk;
1174 wxImage *m_pos_image_user_grey_night;
1175 wxImage *m_pos_image_user_yellow_day;
1176 wxImage *m_pos_image_user_yellow_dusk;
1177 wxImage *m_pos_image_user_yellow_night;
1179 wxImage m_ship_pix_image;
1181 bool m_cur_ship_pix_isgrey;
1182 ColorScheme m_ship_cs;
1185 wxBitmap *m_prot_bm;
1193 double m_wheel_lat, m_wheel_lon;
1194 int m_wheel_x, m_wheel_y;
1197 wxBitmap m_working_bm;
1198 wxBitmap m_cached_chart_bm;
1203 bool m_bzooming, m_bzooming_to_cursor;
1212 int m_panx, m_pany, m_modkeys;
1214 bool m_bmouse_key_mod;
1215 double m_zoom_factor, m_rotation_speed;
1223 wxDateTime m_last_movement_time;
1225 int m_AISRollover_MMSI;
1226 bool m_bsectors_shown;
1228 double m_displayed_scale_factor;
1230 wxColour m_fog_color;
1231 bool m_disable_edge_pan;
1232 wxFont *m_pgridFont;
1234 bool m_dragoffsetSet;
1238 double m_vLat, m_vLon;
1241 bool m_bpersistent_quilt;
1243 wxMenu *m_piano_ctx_menu;
1244 int menu_selected_dbIndex, menu_selected_index;
1252 bool m_mouseWasInCompass;
1254 wxRect m_mainlast_tb_rect;
1255 int m_restore_dbindex;
1256 int m_restore_group;
1259 wxSize m_muiBarHOSize;
1261 bool m_bShowOutlines;
1262 bool m_bDisplayGrid;
1263 bool m_bShowDepthUnits;
1265 bool m_bShowAISScaled;
1268 long m_s52StateHash;
1270 bool m_encShowDepth;
1271 bool m_encShowLightDesc;
1272 bool m_encShowBuoyLabels;
1273 int m_encDisplayCategory;
1274 bool m_encShowLights;
1275 bool m_encShowAnchor;
1276 bool m_encShowDataQual;
1278 wxTimer m_deferredFocusTimer;
1279 float m_focus_indicator_pix;
1283 double m_OSoffsetx, m_OSoffsety;
1284 bool m_MouseDragging;
1286 wxString m_alertString;
1287 wxRect m_scaleBarRect;
1288 bool m_bShowCompassWin;
1291 double m_sector_glat, m_sector_glon;
1292 std::vector<s57Sector_t> m_sectorlegsVisible;
1293 bool m_bShowVisibleSectors;
1295 double m_displayScale;
1296 bool m_show_focus_bar;
1298 double m_panx_target_final;
1299 double m_pany_target_final;
1300 double m_panx_target_now;
1301 double m_pany_target_now;
1303 double m_start_lat, m_start_lon;
1304 double m_target_lat, m_target_lon;
1305 double m_run_lat, m_run_lon;
1306 bool m_timed_move_vp_active;
1310 double meters_to_shift = 0;
1311 double dir_to_shift = 0;
1314 wxTimer m_chart_drag_inertia_timer;
1315 void OnChartDragInertiaTimer(wxTimerEvent &event);
1317 uint64_t m_last_drag_time;
1318 int m_chart_drag_total_x;
1319 int m_chart_drag_total_y;
1320 double m_chart_drag_total_time;
1321 double m_chart_drag_velocity_x;
1322 double m_chart_drag_velocity_y;
1323 wxLongLong m_chart_drag_inertia_time;
1324 wxLongLong m_chart_drag_inertia_start_time;
1325 bool m_chart_drag_inertia_active;
1326 double m_last_elapsed;
1327 std::vector<int> m_drag_vec_x;
1328 std::vector<int> m_drag_vec_y;
1329 std::vector<double> m_drag_vec_t;
1330 int m_inertia_last_drag_x;
1331 int m_inertia_last_drag_y;
1334 wxTimer m_easeTimer;
1335 wxLongLong m_animationStart;
1336 wxLongLong m_animationDuration;
1337 double m_startLat, m_startLon, m_startScale;
1338 double m_endLat, m_endLon, m_endScale;
1339 bool m_animationActive;
1340 void OnJumpEaseTimer(wxTimerEvent &event);
1341 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1342 bool m_disable_adjust_on_zoom;
1347 DECLARE_EVENT_TABLE()