155 ChartCanvas(wxFrame *frame,
int canvasIndex, wxWindow *nmea_log);
158 void SetupGlCanvas();
161 void OnKeyDown(wxKeyEvent &event);
162 void OnKeyUp(wxKeyEvent &event);
163 void OnKeyChar(wxKeyEvent &event);
164 void OnPaint(wxPaintEvent &event);
166 void Scroll(
int dx,
int dy);
167 void OnToolLeftClick(wxCommandEvent &event);
169 bool MouseEventOverlayWindows(wxMouseEvent &event);
170 bool MouseEventChartBar(wxMouseEvent &event);
171 bool MouseEventMUIBar(wxMouseEvent &event);
172 bool MouseEventToolbar(wxMouseEvent &event);
173 bool MouseEventIENCBar(wxMouseEvent &event);
175 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
176 bool MouseEventProcessObjects(wxMouseEvent &event);
193 void SetCanvasCursor(wxMouseEvent &event);
194 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
195 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
196#ifdef HAVE_WX_GESTURE_EVENTS
197 void OnZoom(wxZoomGestureEvent &event);
198 void OnLongPress(wxLongPressEvent &event);
199 void OnPressAndTap(wxPressAndTapEvent &event);
201 void OnLeftDown(wxMouseEvent &evt);
202 void OnLeftUp(wxMouseEvent &evt);
204 void OnRightUp(wxMouseEvent &event);
205 void OnRightDown(wxMouseEvent &event);
207 void OnDoubleLeftClick(wxMouseEvent &event);
209 void OnWheel(wxMouseEvent &event);
210 void OnMotion(wxMouseEvent &event);
213 void PopupMenuHandler(wxCommandEvent &event);
214 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
216 bool SetUserOwnship();
218 double GetCanvasRangeMeters();
219 void SetCanvasRangeMeters(
double range);
221 void EnablePaint(
bool b_enable);
222 virtual bool SetCursor(
const wxCursor &c);
223 virtual void Refresh(
bool eraseBackground =
true,
224 const wxRect *rect = (
const wxRect *)NULL);
225 virtual void Update();
227 void LostMouseCapture(wxMouseCaptureLostEvent &event);
229 void CancelMouseRoute();
250 bool SetVPScale(
double sc,
bool b_refresh =
true);
251 bool SetVPProjection(
int projection);
260 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
276 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
277 double rotation,
int projection = 0,
bool b_adjust =
true,
278 bool b_refresh =
true);
279 void ReloadVP(
bool b_adjust =
true);
280 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
282 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
283 void SetGroupIndex(
int index,
bool autoswitch =
false);
284 bool CheckGroup(
int igroup);
285 void canvasRefreshGroupIndex(
void);
286 void canvasChartsRefresh(
int dbi_hint);
288 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
290 void UpdateCanvasS52PLIBConfig();
292 void TriggerDeferredFocus();
293 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
294 void OnRouteFinishTimerEvent(wxTimerEvent &event);
296 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
297 void SetupCanvasQuiltMode(
void);
300 bool SetVPRotation(
double angle);
301 double GetVPRotation(
void) {
return GetVP().
rotation; }
302 double GetVPSkew(
void) {
return GetVP().
skew; }
303 double GetVPTilt(
void) {
return GetVP().
tilt; }
305 void ClearbFollow(
void);
306 void SetbFollow(
void);
307 void TogglebFollow(
void);
308 bool GetbFollow() {
return m_bFollow; }
311 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
398 void WarpPointerDeferred(
int x,
int y);
402 void ToggleCPAWarn();
404 bool IsMeasureActive() {
return m_bMeasure_Active; }
405 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
408 int GetUpMode() {
return m_upMode; }
409 bool GetLookahead() {
return m_bLookAhead; }
412 void SetQuiltMode(
bool b_quilt);
413 bool GetQuiltMode(
void);
414 std::vector<int> GetQuiltIndexArray(
void);
415 bool IsQuiltDelta(
void);
416 void SetQuiltChartHiLiteIndex(
int dbIndex);
417 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
418 void ClearQuiltChartHiLiteIndexArray();
419 int GetQuiltReferenceChartIndex(
void);
420 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
421 void ConfigureChartBar();
423 int GetNextContextMenuId();
425 TCWin *getTCWin() {
return pCwin; }
427 bool StartTimedMovement(
bool stoptimer =
true);
428 void DoTimedMovement();
444 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
445 void DoTimedMovementVP();
446 void StopMovementVP();
448 void StartTimedMovementTarget();
449 void DoTimedMovementTarget();
450 void StopMovementTarget();
452 void SetColorScheme(ColorScheme cs);
453 ColorScheme GetColorScheme() {
return m_cs; }
455 void CanvasApplyLocale();
456 void RebuildCursors();
459 int GetCanvasWidth() {
return m_canvas_width; }
460 int GetCanvasHeight() {
return m_canvas_height; }
479 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
480 ViewPort *GetpVP() {
return &VPoint; }
484 Piano *GetPiano() {
return m_Piano; }
485 int GetPianoHeight();
487 bool isRouteEditing(
void) {
488 return m_bRouteEditing && m_pRoutePointEditTarget;
490 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
492 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
493 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
495 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
496 bool GetbTCUpdate() {
return m_bTCupdate; }
497 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
498 bool GetbShowCurrent() {
return m_bShowCurrent; }
499 void SetbShowTide(
bool f) { m_bShowTide = f; }
500 bool GetbShowTide() {
return m_bShowTide; }
501 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
502 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
506 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
507 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
508 void GetCursorLatLon(
double *lat,
double *lon);
512 void StopAutoPan(
void);
532 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
533 bool stoptimer =
true);
548 void RotateCanvas(
double dir);
549 void DoRotateCanvas(
double rotation);
550 void DoTiltCanvas(
double tilt);
552 void ShowAISTargetList(
void);
554 void ShowGoToPosition(
void);
555 void HideGlobalToolbar();
556 void ShowGlobalToolbar();
558 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
559 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
560 bool GetShowGrid() {
return m_bDisplayGrid; }
561 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
562 bool GetShowOutlines() {
return m_bShowOutlines; }
563 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
564 bool GetShowChartbar() {
return true; }
565 wxRect GetMUIBarRect();
566 void SetMUIBarPosition();
567 void DestroyMuiBar();
570 void ToggleChartOutlines(
void);
571 void ToggleCanvasQuiltMode(
void);
573 wxString GetScaleText() {
return m_scaleText; }
574 double GetScaleValue() {
return m_scaleValue; }
575 bool GetShowAIS() {
return m_bShowAIS; }
576 void SetShowAIS(
bool show);
577 bool GetAttenAIS() {
return m_bShowAISScaled; }
578 void SetAttenAIS(
bool show);
579 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
580 bool GetShowFocusBar() {
return m_show_focus_bar; }
581 MUIBar *GetMUIBar() {
return m_muiBar; }
582 void SetAlertString(wxString str) { m_alertString = str; }
583 wxString GetAlertString() {
return m_alertString; }
584 bool GetShowENCText() {
return m_encShowText; }
585 void SetShowENCText(
bool show);
587 bool GetShowENCDepth() {
return m_encShowDepth; }
588 void SetShowENCDepth(
bool show);
590 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
591 void SetShowENCLightDesc(
bool show);
593 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
594 void SetShowENCBuoyLabels(
bool show);
596 bool GetShowENCLights() {
return m_encShowLights; }
597 void SetShowENCLights(
bool show);
602 bool GetShowENCAnchor() {
return m_encShowAnchor; }
603 void SetShowENCAnchor(
bool show);
605 bool GetShowENCDataQual() {
return m_encShowDataQual; }
606 void SetShowENCDataQual(
bool show);
608 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
610 void ShowTides(
bool bShow);
611 void ShowCurrents(
bool bShow);
612 void SetUpMode(
int mode);
613 void ToggleLookahead();
614 void SetShowGPS(
bool show);
615 void UpdateFollowButtonState(
void);
617 bool IsTileOverlayIndexInYesShow(
int index);
618 bool IsTileOverlayIndexInNoShow(
int index);
619 void AddTileOverlayIndexToNoShow(
int index);
621 Route *m_pMouseRoute;
622 bool m_bMeasure_Active;
626 wxString FindValidUploadPort();
627 wxString m_active_upload_port;
635 int GetQuiltChartCount();
636 void InvalidateAllQuiltPatchs(
void);
637 void SetQuiltRefChart(
int dbIndex);
638 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
640 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
641 std::vector<int> &GetQuiltFullScreendbIndexArray();
642 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
643 int GetQuiltRefChartdbIndex(
void);
644 void InvalidateQuilt(
void);
645 double GetQuiltMaxErrorFactor();
646 bool IsChartQuiltableRef(
int db_index);
648 int GetCanvasChartNativeScale();
649 int FindClosestCanvasChartdbIndex(
int scale);
650 void UpdateCanvasOnGroupChange(
void);
652 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
653 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
654 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
655 void ShowTrackPropertiesDialog(
Track *selected);
656 void DrawTCWindow(
int x,
int y,
void *pIDX);
658 void UpdateGPSCompassStatusBox(
bool b_force_new);
661 wxColour GetFogColor() {
return m_fog_color; }
663 void ShowChartInfoWindow(
int x,
int dbIndex);
664 void HideChartInfoWindow(
void);
665 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
666 const std::vector<int> &index_vector);
668 void StartMeasureRoute();
669 void CancelMeasureRoute();
671 bool DoCanvasUpdate(
void);
672 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
673 void SelectQuiltRefChart(
int selected_index);
674 double GetBestVPScale(
ChartBase *pchart);
675 void selectCanvasChartDisplay(
int type,
int family);
676 void RemoveChartFromQuilt(
int dbIndex);
678 void HandlePianoClick(
int selected_index,
679 const std::vector<int> &selected_dbIndex_array);
680 void HandlePianoRClick(
int x,
int y,
int selected_index,
681 const std::vector<int> &selected_dbIndex_array);
682 void HandlePianoRollover(
int selected_index,
683 const std::vector<int> &selected_dbIndex_array,
684 int n_charts,
int scale);
685 void ClearPianoRollover();
686 void UpdateCanvasControlBar(
void);
687 void FormatPianoKeys(
void);
688 void PianoPopupMenu(
int x,
int y,
int selected_index,
689 const std::vector<int> &selected_dbIndex_array);
690 void OnPianoMenuDisableChart(wxCommandEvent &event);
691 void OnPianoMenuEnableChart(wxCommandEvent &event);
693 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
694 bool DoCanvasCOGSet(
void);
695 void ApplyGlobalSettings();
696 void SetShowGPSCompassWindow(
bool bshow);
697 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
698 void FreezePiano() { m_pianoFrozen =
true; }
699 void ThawPiano() { m_pianoFrozen =
false; }
700 void StartChartDragInertia();
704 wxCursor *pCursorPencil;
705 wxCursor *pCursorArrow;
706 wxCursor *pCursorCross;
707 wxCursor *pPlugIn_Cursor;
709 wxBitmap *pscratch_bm;
710 bool m_brepaint_piano;
747 bool m_bShowNavobjects;
752#ifdef HAVE_WX_GESTURE_EVENTS
753 double m_oldVPSScale;
756 wxPoint m_zoomStartPoint;
759 void DrawBlinkObjects(
void);
761 void StartRoute(
void);
762 void FinishRoute(
void);
768 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
770 bool m_FinishRouteOnKillFocus;
771 bool m_bMeasure_DistCircle;
772 bool m_bAppendingRoute;
774 Route *m_pMeasureRoute;
777 int GetMinAvailableGshhgQuality() {
778 return pWorldBackgroundChart->GetMinAvailableQuality();
780 int GetMaxAvailableGshhgQuality() {
781 return pWorldBackgroundChart->GetMaxAvailableQuality();
783 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
784 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
785 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
787 void SetAISCanvasDisplayStyle(
int StyleIndx);
788 void TouchAISToolActive(
void);
789 void UpdateAISTBTool(
void);
791 void SelectChartFromStack(
int index,
bool bDir =
false,
792 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
793 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
794 void SelectdbChart(
int dbindex);
796 void DoCanvasStackDelta(
int direction);
798 void ProcessNewGUIScale();
800 bool m_b_paint_enable;
802 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
803 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
805 std::vector<int> m_tile_noshow_index_array;
806 std::vector<int> m_tile_yesshow_index_array;
807 std::vector<int> m_quilt_noshow_index_array;
809 std::vector<int> GetQuiltNoshowIindexArray() {
810 return m_quilt_noshow_index_array;
822 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
838 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
840 int AdjustQuiltRefChart();
842 bool UpdateS52State();
844 void CallPopupMenu(
int x,
int y);
846 bool IsTempMenuBarEnabled();
847 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
850 void PositionConsole(
void);
851 wxWindow *m_nmea_log;
853 wxColour PredColor();
854 wxColour ShipColor();
856 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
857 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
858 wxPoint &GpsOffsetPixels,
859 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
860 float &scale_factor_y);
862 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
863 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
864 wxPoint2DDouble lGPSPoint);
872 wxString m_scaleText;
874 bool m_bShowScaleInStatusBar;
877 wxPoint LastShipPoint;
878 wxPoint LastPredPoint;
879 bool m_bDrawingRoute;
880 bool m_bRouteEditing;
882 bool m_bRoutePoinDragging;
884 bool m_bMayToggleMenuBar;
889 bool m_bChartDragging;
890 Route *m_pSelectedRoute;
891 Track *m_pSelectedTrack;
892 wxArrayPtrVoid *m_pEditRouteArray;
897 wxCursor *pCursorLeft;
898 wxCursor *pCursorRight;
900 wxCursor *pCursorDown;
902 wxCursor *pCursorUpLeft;
903 wxCursor *pCursorUpRight;
904 wxCursor *pCursorDownLeft;
905 wxCursor *pCursorDownRight;
909 wxBitmap *pThumbDIBShow;
910 wxBitmap *pThumbShowing;
912 bool bShowingCurrent;
921 double m_canvas_scale_factor;
924 double m_display_size_mm;
926 double m_absolute_min_scale_ppm;
928 bool singleClickEventIsValid;
929 wxMouseEvent singleClickEvent;
931 std::vector<s57Sector_t> extendedSectorLegs;
932 wxFont m_overzoomFont;
933 int m_overzoomTextWidth;
934 int m_overzoomTextHeight;
937 void OnActivate(wxActivateEvent &event);
938 void OnSize(wxSizeEvent &event);
939 void MouseTimedEvent(wxTimerEvent &event);
940 void MouseEvent(wxMouseEvent &event);
941 void ShipDraw(
ocpnDC &dc);
942 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
943 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
944 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
946 void RotateTimerEvent(wxTimerEvent &event);
947 void PanTimerEvent(wxTimerEvent &event);
948 void MovementTimerEvent(wxTimerEvent &);
949 void MovementStopTimerEvent(wxTimerEvent &);
950 void OnCursorTrackTimerEvent(wxTimerEvent &event);
952 void MovementVPTimerEvent(wxTimerEvent &event);
954 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
955 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
956 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
957 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
958 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
959 void DrawAnchorWatchPoints(
ocpnDC &dc);
960 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
962 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
963 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
964 void RebuildTideSelectList(LLBBox &BBox);
965 void RebuildCurrentSelectList(LLBBox &BBox);
969 void RenderRouteLegs(
ocpnDC &dc);
970 void RenderVisibleSectorLights(
ocpnDC &dc);
972 void AlertDraw(
ocpnDC &dc);
974 void GridDraw(
ocpnDC &dc);
975 void ScaleBarDraw(
ocpnDC &dc);
977 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
978 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
981 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
982 const wxString &str, ColorScheme cs);
983 void CreateDepthUnitEmbossMaps(ColorScheme cs);
984 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
986 void CreateOZEmbossMapData(ColorScheme cs);
988 void SetOverzoomFont();
995 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
996 void HandleNotificationMouseClick();
1002 int m_canvas_height;
1020 wxTimer *pMovementStopTimer;
1022 wxTimer *pCurTrackTimer;
1024 wxTimer *pRotDefTimer;
1026 wxTimer *m_DoubleClickTimer;
1027 wxTimer m_routeFinishTimer;
1029 wxTimer m_RolloverPopupTimer;
1031 wxTimer m_VPMovementTimer;
1033 int m_wheelzoom_stop_oneshot;
1034 int m_last_wheel_dir;
1035 wxStopWatch m_wheelstopwatch;
1036 double m_zoom_target;
1038 int m_curtrack_timer_msec;
1039 int m_rollover_popup_timer_msec;
1044 wxBitmap *pss_overlay_bmp;
1045 wxMask *pss_overlay_mask;
1047 wxRect ship_draw_rect;
1048 wxRect ship_draw_last_rect;
1049 wxRect ais_draw_rect;
1050 wxRect alert_draw_rect;
1052 wxBitmap *proute_bm;
1053 wxMemoryDC m_dc_route;
1077 double m_true_scale_ppm;
1079 ownship_state_t m_ownship_state;
1083 wxBitmap m_bmTideDay;
1084 wxBitmap m_bmTideDusk;
1085 wxBitmap m_bmTideNight;
1086 wxBitmap m_bmCurrentDay;
1087 wxBitmap m_bmCurrentDusk;
1088 wxBitmap m_bmCurrentNight;
1089 wxBitmap m_cTideBitmap;
1090 wxBitmap m_cCurrentBitmap;
1098 wxImage m_os_image_red_day;
1099 wxImage m_os_image_red_dusk;
1100 wxImage m_os_image_red_night;
1101 wxImage m_os_image_grey_day;
1102 wxImage m_os_image_grey_dusk;
1103 wxImage m_os_image_grey_night;
1104 wxImage m_os_image_yellow_day;
1105 wxImage m_os_image_yellow_dusk;
1106 wxImage m_os_image_yellow_night;
1108 wxImage *m_pos_image_red;
1109 wxImage *m_pos_image_grey;
1110 wxImage *m_pos_image_yellow;
1112 wxImage *m_pos_image_user;
1113 wxImage *m_pos_image_user_grey;
1114 wxImage *m_pos_image_user_yellow;
1116 wxImage *m_pos_image_user_day;
1117 wxImage *m_pos_image_user_dusk;
1118 wxImage *m_pos_image_user_night;
1119 wxImage *m_pos_image_user_grey_day;
1120 wxImage *m_pos_image_user_grey_dusk;
1121 wxImage *m_pos_image_user_grey_night;
1122 wxImage *m_pos_image_user_yellow_day;
1123 wxImage *m_pos_image_user_yellow_dusk;
1124 wxImage *m_pos_image_user_yellow_night;
1126 wxImage m_ship_pix_image;
1128 bool m_cur_ship_pix_isgrey;
1129 ColorScheme m_ship_cs;
1132 wxBitmap *m_prot_bm;
1140 double m_wheel_lat, m_wheel_lon;
1141 int m_wheel_x, m_wheel_y;
1144 wxBitmap m_working_bm;
1145 wxBitmap m_cached_chart_bm;
1150 bool m_bzooming, m_bzooming_to_cursor;
1159 int m_panx, m_pany, m_modkeys;
1161 bool m_bmouse_key_mod;
1162 double m_zoom_factor, m_rotation_speed;
1170 wxDateTime m_last_movement_time;
1172 int m_AISRollover_MMSI;
1173 bool m_bsectors_shown;
1175 double m_displayed_scale_factor;
1177 wxColour m_fog_color;
1178 bool m_disable_edge_pan;
1179 wxFont *m_pgridFont;
1181 bool m_dragoffsetSet;
1185 double m_vLat, m_vLon;
1188 bool m_bpersistent_quilt;
1190 wxMenu *m_piano_ctx_menu;
1191 int menu_selected_dbIndex, menu_selected_index;
1196 wxRect m_mainlast_tb_rect;
1197 int m_restore_dbindex;
1198 int m_restore_group;
1201 wxSize m_muiBarHOSize;
1203 bool m_bShowOutlines;
1204 bool m_bDisplayGrid;
1205 bool m_bShowDepthUnits;
1207 bool m_bShowAISScaled;
1210 long m_s52StateHash;
1212 bool m_encShowDepth;
1213 bool m_encShowLightDesc;
1214 bool m_encShowBuoyLabels;
1215 int m_encDisplayCategory;
1216 bool m_encShowLights;
1217 bool m_encShowAnchor;
1218 bool m_encShowDataQual;
1220 wxTimer m_deferredFocusTimer;
1221 float m_focus_indicator_pix;
1225 double m_OSoffsetx, m_OSoffsety;
1226 bool m_MouseDragging;
1228 wxString m_alertString;
1229 wxRect m_scaleBarRect;
1230 bool m_bShowCompassWin;
1233 double m_sector_glat, m_sector_glon;
1234 std::vector<s57Sector_t> m_sectorlegsVisible;
1235 bool m_bShowVisibleSectors;
1237 double m_displayScale;
1238 bool m_show_focus_bar;
1240 double m_panx_target_final;
1241 double m_pany_target_final;
1242 double m_panx_target_now;
1243 double m_pany_target_now;
1245 double m_start_lat, m_start_lon;
1246 double m_target_lat, m_target_lon;
1247 double m_run_lat, m_run_lon;
1248 bool m_timed_move_vp_active;
1252 double meters_to_shift = 0;
1253 double dir_to_shift = 0;
1256 wxTimer m_chart_drag_inertia_timer;
1257 void OnChartDragInertiaTimer(wxTimerEvent &event);
1259 uint64_t m_last_drag_time;
1260 int m_chart_drag_total_x;
1261 int m_chart_drag_total_y;
1262 double m_chart_drag_total_time;
1263 double m_chart_drag_velocity_x;
1264 double m_chart_drag_velocity_y;
1265 wxLongLong m_chart_drag_inertia_time;
1266 wxLongLong m_chart_drag_inertia_start_time;
1267 bool m_chart_drag_inertia_active;
1268 double m_last_elapsed;
1269 std::vector<int> m_drag_vec_x;
1270 std::vector<int> m_drag_vec_y;
1271 std::vector<double> m_drag_vec_t;
1272 int m_inertia_last_drag_x;
1273 int m_inertia_last_drag_y;
1276 wxTimer m_easeTimer;
1277 wxLongLong m_animationStart;
1278 wxLongLong m_animationDuration;
1279 double m_startLat, m_startLon, m_startScale;
1280 double m_endLat, m_endLon, m_endScale;
1281 bool m_animationActive;
1282 void OnJumpEaseTimer(wxTimerEvent &event);
1283 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1288 DECLARE_EVENT_TABLE()