142 void SetupGlCanvas();
145 void OnKeyDown(wxKeyEvent &event);
146 void OnKeyUp(wxKeyEvent &event);
147 void OnKeyChar(wxKeyEvent &event);
148 void OnPaint(wxPaintEvent &event);
150 void Scroll(
int dx,
int dy);
151 void OnToolLeftClick(wxCommandEvent &event);
153 bool MouseEventOverlayWindows(wxMouseEvent &event);
154 bool MouseEventChartBar(wxMouseEvent &event);
155 bool MouseEventMUIBar(wxMouseEvent &event);
156 bool MouseEventToolbar(wxMouseEvent &event);
157 bool MouseEventIENCBar(wxMouseEvent &event);
159 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
160 bool MouseEventProcessObjects(wxMouseEvent &event);
177 void SetCanvasCursor(wxMouseEvent &event);
178 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
179 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
180#ifdef HAVE_WX_GESTURE_EVENTS
181 void OnZoom(wxZoomGestureEvent &event);
182 void OnLongPress(wxLongPressEvent &event);
183 void OnPressAndTap(wxPressAndTapEvent &event);
185 void OnLeftDown(wxMouseEvent &evt);
186 void OnLeftUp(wxMouseEvent &evt);
188 void OnRightUp(wxMouseEvent &event);
189 void OnRightDown(wxMouseEvent &event);
191 void OnDoubleLeftClick(wxMouseEvent &event);
193 void OnWheel(wxMouseEvent &event);
194 void OnMotion(wxMouseEvent &event);
197 void PopupMenuHandler(wxCommandEvent &event);
198 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
200 bool SetUserOwnship();
202 double GetCanvasRangeMeters();
203 void SetCanvasRangeMeters(
double range);
205 void EnablePaint(
bool b_enable);
206 virtual bool SetCursor(
const wxCursor &c);
207 virtual void Refresh(
bool eraseBackground =
true,
208 const wxRect *rect = (
const wxRect *)NULL);
209 virtual void Update();
211 void LostMouseCapture(wxMouseCaptureLostEvent &event);
213 void CancelMouseRoute();
234 bool SetVPScale(
double sc,
bool b_refresh =
true);
235 bool SetVPProjection(
int projection);
244 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
260 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
261 double rotation,
int projection = 0,
bool b_adjust =
true,
262 bool b_refresh =
true);
263 void ReloadVP(
bool b_adjust =
true);
264 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
266 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
267 void SetGroupIndex(
int index,
bool autoswitch =
false);
268 bool CheckGroup(
int igroup);
269 void canvasRefreshGroupIndex(
void);
270 void canvasChartsRefresh(
int dbi_hint);
272 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
274 void UpdateCanvasS52PLIBConfig();
276 void TriggerDeferredFocus();
277 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
278 void OnRouteFinishTimerEvent(wxTimerEvent &event);
280 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
281 void SetupCanvasQuiltMode(
void);
284 bool SetVPRotation(
double angle);
285 double GetVPRotation(
void) {
return GetVP().
rotation; }
286 double GetVPSkew(
void) {
return GetVP().
skew; }
287 double GetVPTilt(
void) {
return GetVP().
tilt; }
289 void ClearbFollow(
void);
290 void SetbFollow(
void);
291 void TogglebFollow(
void);
292 bool GetbFollow() {
return m_bFollow; }
294 void JumpToPosition(
double lat,
double lon,
double scale);
295 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
376 void WarpPointerDeferred(
int x,
int y);
380 void ToggleCPAWarn();
382 bool IsMeasureActive() {
return m_bMeasure_Active; }
383 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
386 int GetUpMode() {
return m_upMode; }
387 bool GetLookahead() {
return m_bLookAhead; }
390 void SetQuiltMode(
bool b_quilt);
391 bool GetQuiltMode(
void);
392 std::vector<int> GetQuiltIndexArray(
void);
393 bool IsQuiltDelta(
void);
394 void SetQuiltChartHiLiteIndex(
int dbIndex);
395 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
396 void ClearQuiltChartHiLiteIndexArray();
397 int GetQuiltReferenceChartIndex(
void);
398 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
399 void ConfigureChartBar();
401 int GetNextContextMenuId();
403 TCWin *getTCWin() {
return pCwin; }
405 bool StartTimedMovement(
bool stoptimer =
true);
406 void DoTimedMovement();
407 void DoMovement(
long dt);
410 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
411 void DoTimedMovementVP();
412 void StopMovementVP();
414 void StartTimedMovementTarget();
415 void DoTimedMovementTarget();
416 void StopMovementTarget();
418 void SetColorScheme(ColorScheme cs);
419 ColorScheme GetColorScheme() {
return m_cs; }
421 void CanvasApplyLocale();
422 void RebuildCursors();
425 int GetCanvasWidth() {
return m_canvas_width; }
426 int GetCanvasHeight() {
return m_canvas_height; }
445 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
446 ViewPort *GetpVP() {
return &VPoint; }
450 Piano *GetPiano() {
return m_Piano; }
451 int GetPianoHeight();
453 bool isRouteEditing(
void) {
454 return m_bRouteEditing && m_pRoutePointEditTarget;
456 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
458 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
459 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
461 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
462 bool GetbTCUpdate() {
return m_bTCupdate; }
463 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
464 bool GetbShowCurrent() {
return m_bShowCurrent; }
465 void SetbShowTide(
bool f) { m_bShowTide = f; }
466 bool GetbShowTide() {
return m_bShowTide; }
467 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
468 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
472 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
473 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
474 void GetCursorLatLon(
double *lat,
double *lon);
478 void StopAutoPan(
void);
498 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
499 bool stoptimer =
true);
527 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
529 void RotateCanvas(
double dir);
530 void DoRotateCanvas(
double rotation);
531 void DoTiltCanvas(
double tilt);
533 void ShowAISTargetList(
void);
535 void ShowGoToPosition(
void);
536 void HideGlobalToolbar();
537 void ShowGlobalToolbar();
539 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
540 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
541 bool GetShowGrid() {
return m_bDisplayGrid; }
542 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
543 bool GetShowOutlines() {
return m_bShowOutlines; }
544 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
545 bool GetShowChartbar() {
return true; }
546 wxRect GetMUIBarRect();
547 void SetMUIBarPosition();
548 void DestroyMuiBar();
551 void ToggleChartOutlines(
void);
552 void ToggleCanvasQuiltMode(
void);
554 wxString GetScaleText() {
return m_scaleText; }
555 double GetScaleValue() {
return m_scaleValue; }
556 bool GetShowAIS() {
return m_bShowAIS; }
557 void SetShowAIS(
bool show);
558 bool GetAttenAIS() {
return m_bShowAISScaled; }
559 void SetAttenAIS(
bool show);
560 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
561 bool GetShowFocusBar() {
return m_show_focus_bar; }
562 MUIBar *GetMUIBar() {
return m_muiBar; }
563 void SetAlertString(wxString str) { m_alertString = str; }
564 wxString GetAlertString() {
return m_alertString; }
565 bool GetShowENCText() {
return m_encShowText; }
566 void SetShowENCText(
bool show);
568 bool GetShowENCDepth() {
return m_encShowDepth; }
569 void SetShowENCDepth(
bool show);
571 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
572 void SetShowENCLightDesc(
bool show);
574 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
575 void SetShowENCBuoyLabels(
bool show);
577 bool GetShowENCLights() {
return m_encShowLights; }
578 void SetShowENCLights(
bool show);
580 int GetENCDisplayCategory() {
return m_encDisplayCategory; }
581 void SetENCDisplayCategory(
int category);
583 bool GetShowENCAnchor() {
return m_encShowAnchor; }
584 void SetShowENCAnchor(
bool show);
586 bool GetShowENCDataQual() {
return m_encShowDataQual; }
587 void SetShowENCDataQual(
bool show);
589 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
591 void ShowTides(
bool bShow);
592 void ShowCurrents(
bool bShow);
593 void SetUpMode(
int mode);
594 void ToggleLookahead();
595 void SetShowGPS(
bool show);
596 void UpdateFollowButtonState(
void);
598 bool IsTileOverlayIndexInYesShow(
int index);
599 bool IsTileOverlayIndexInNoShow(
int index);
600 void AddTileOverlayIndexToNoShow(
int index);
602 Route *m_pMouseRoute;
603 bool m_bMeasure_Active;
607 wxString FindValidUploadPort();
608 wxString m_active_upload_port;
616 int GetQuiltChartCount();
617 void InvalidateAllQuiltPatchs(
void);
618 void SetQuiltRefChart(
int dbIndex);
619 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
621 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
622 std::vector<int> &GetQuiltFullScreendbIndexArray();
623 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
624 int GetQuiltRefChartdbIndex(
void);
625 void InvalidateQuilt(
void);
626 double GetQuiltMaxErrorFactor();
627 bool IsChartQuiltableRef(
int db_index);
629 int GetCanvasChartNativeScale();
630 int FindClosestCanvasChartdbIndex(
int scale);
631 void UpdateCanvasOnGroupChange(
void);
633 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
634 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
635 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
636 void ShowTrackPropertiesDialog(
Track *selected);
637 void DrawTCWindow(
int x,
int y,
void *pIDX);
639 void UpdateGPSCompassStatusBox(
bool b_force_new);
642 wxColour GetFogColor() {
return m_fog_color; }
644 void ShowChartInfoWindow(
int x,
int dbIndex);
645 void HideChartInfoWindow(
void);
646 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
647 const std::vector<int> &index_vector);
649 void StartMeasureRoute();
650 void CancelMeasureRoute();
652 bool DoCanvasUpdate(
void);
653 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
654 void SelectQuiltRefChart(
int selected_index);
655 double GetBestVPScale(
ChartBase *pchart);
656 void selectCanvasChartDisplay(
int type,
int family);
657 void RemoveChartFromQuilt(
int dbIndex);
659 void HandlePianoClick(
int selected_index,
660 const std::vector<int> &selected_dbIndex_array);
661 void HandlePianoRClick(
int x,
int y,
int selected_index,
662 const std::vector<int> &selected_dbIndex_array);
663 void HandlePianoRollover(
int selected_index,
664 const std::vector<int> &selected_dbIndex_array,
665 int n_charts,
int scale);
666 void ClearPianoRollover();
667 void UpdateCanvasControlBar(
void);
668 void FormatPianoKeys(
void);
669 void PianoPopupMenu(
int x,
int y,
int selected_index,
670 const std::vector<int> &selected_dbIndex_array);
671 void OnPianoMenuDisableChart(wxCommandEvent &event);
672 void OnPianoMenuEnableChart(wxCommandEvent &event);
674 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
675 bool DoCanvasCOGSet(
void);
676 void ApplyGlobalSettings();
677 void SetShowGPSCompassWindow(
bool bshow);
678 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
679 void FreezePiano() { m_pianoFrozen =
true; }
680 void ThawPiano() { m_pianoFrozen =
false; }
681 void StartChartDragInertia();
685 wxCursor *pCursorPencil;
686 wxCursor *pCursorArrow;
687 wxCursor *pCursorCross;
688 wxCursor *pPlugIn_Cursor;
690 wxBitmap *pscratch_bm;
691 bool m_brepaint_piano;
700 bool m_bShowNavobjects;
705#ifdef HAVE_WX_GESTURE_EVENTS
706 double m_oldVPSScale;
709 wxPoint m_zoomStartPoint;
712 void DrawBlinkObjects(
void);
714 void StartRoute(
void);
715 void FinishRoute(
void);
721 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
723 bool m_FinishRouteOnKillFocus;
724 bool m_bMeasure_DistCircle;
725 bool m_bAppendingRoute;
727 Route *m_pMeasureRoute;
730 int GetMinAvailableGshhgQuality() {
731 return pWorldBackgroundChart->GetMinAvailableQuality();
733 int GetMaxAvailableGshhgQuality() {
734 return pWorldBackgroundChart->GetMaxAvailableQuality();
736 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
737 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
738 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
740 void SetAISCanvasDisplayStyle(
int StyleIndx);
741 void TouchAISToolActive(
void);
742 void UpdateAISTBTool(
void);
744 void SelectChartFromStack(
int index,
bool bDir =
false,
745 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
746 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
747 void SelectdbChart(
int dbindex);
749 void DoCanvasStackDelta(
int direction);
751 void ProcessNewGUIScale();
753 bool m_b_paint_enable;
755 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
756 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
758 std::vector<int> m_tile_noshow_index_array;
759 std::vector<int> m_tile_yesshow_index_array;
760 std::vector<int> m_quilt_noshow_index_array;
762 std::vector<int> GetQuiltNoshowIindexArray() {
763 return m_quilt_noshow_index_array;
775 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
778 int AdjustQuiltRefChart();
780 bool UpdateS52State();
782 void CallPopupMenu(
int x,
int y);
784 bool IsTempMenuBarEnabled();
785 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
788 void PositionConsole(
void);
790 wxColour PredColor();
791 wxColour ShipColor();
793 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
794 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
795 wxPoint &GpsOffsetPixels,
796 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
797 float &scale_factor_y);
799 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
800 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
801 wxPoint2DDouble lGPSPoint);
809 wxString m_scaleText;
811 bool m_bShowScaleInStatusBar;
814 wxPoint LastShipPoint;
815 wxPoint LastPredPoint;
816 bool m_bDrawingRoute;
817 bool m_bRouteEditing;
819 bool m_bRoutePoinDragging;
821 bool m_bMayToggleMenuBar;
826 bool m_bChartDragging;
827 Route *m_pSelectedRoute;
828 Track *m_pSelectedTrack;
829 wxArrayPtrVoid *m_pEditRouteArray;
834 wxCursor *pCursorLeft;
835 wxCursor *pCursorRight;
837 wxCursor *pCursorDown;
839 wxCursor *pCursorUpLeft;
840 wxCursor *pCursorUpRight;
841 wxCursor *pCursorDownLeft;
842 wxCursor *pCursorDownRight;
846 wxBitmap *pThumbDIBShow;
847 wxBitmap *pThumbShowing;
849 bool bShowingCurrent;
858 double m_canvas_scale_factor;
861 double m_display_size_mm;
863 double m_absolute_min_scale_ppm;
865 bool singleClickEventIsValid;
866 wxMouseEvent singleClickEvent;
868 std::vector<s57Sector_t> extendedSectorLegs;
869 wxFont m_overzoomFont;
870 int m_overzoomTextWidth;
871 int m_overzoomTextHeight;
874 void OnActivate(wxActivateEvent &event);
875 void OnSize(wxSizeEvent &event);
876 void MouseTimedEvent(wxTimerEvent &event);
877 void MouseEvent(wxMouseEvent &event);
878 void ShipDraw(
ocpnDC &dc);
879 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
880 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
881 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
883 void RotateTimerEvent(wxTimerEvent &event);
884 void PanTimerEvent(wxTimerEvent &event);
885 void MovementTimerEvent(wxTimerEvent &);
886 void MovementStopTimerEvent(wxTimerEvent &);
887 void OnCursorTrackTimerEvent(wxTimerEvent &event);
889 void MovementVPTimerEvent(wxTimerEvent &event);
891 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
892 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
893 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
894 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
895 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
896 void DrawAnchorWatchPoints(
ocpnDC &dc);
897 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
899 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
900 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
901 void RebuildTideSelectList(LLBBox &BBox);
902 void RebuildCurrentSelectList(LLBBox &BBox);
906 void RenderRouteLegs(
ocpnDC &dc);
907 void RenderVisibleSectorLights(
ocpnDC &dc);
909 void AlertDraw(
ocpnDC &dc);
911 void GridDraw(
ocpnDC &dc);
912 void ScaleBarDraw(
ocpnDC &dc);
914 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
915 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
918 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
919 const wxString &str, ColorScheme cs);
920 void CreateDepthUnitEmbossMaps(ColorScheme cs);
921 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
923 void CreateOZEmbossMapData(ColorScheme cs);
925 void SetOverzoomFont();
932 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
956 wxTimer *pMovementStopTimer;
958 wxTimer *pCurTrackTimer;
960 wxTimer *pRotDefTimer;
962 wxTimer *m_DoubleClickTimer;
963 wxTimer m_routeFinishTimer;
965 wxTimer m_RolloverPopupTimer;
967 wxTimer m_VPMovementTimer;
969 int m_wheelzoom_stop_oneshot;
970 int m_last_wheel_dir;
971 wxStopWatch m_wheelstopwatch;
972 double m_zoom_target;
974 int m_curtrack_timer_msec;
975 int m_rollover_popup_timer_msec;
980 wxBitmap *pss_overlay_bmp;
981 wxMask *pss_overlay_mask;
983 wxRect ship_draw_rect;
984 wxRect ship_draw_last_rect;
985 wxRect ais_draw_rect;
986 wxRect alert_draw_rect;
989 wxMemoryDC m_dc_route;
1013 double m_true_scale_ppm;
1015 ownship_state_t m_ownship_state;
1019 wxBitmap m_bmTideDay;
1020 wxBitmap m_bmTideDusk;
1021 wxBitmap m_bmTideNight;
1022 wxBitmap m_bmCurrentDay;
1023 wxBitmap m_bmCurrentDusk;
1024 wxBitmap m_bmCurrentNight;
1025 wxBitmap m_cTideBitmap;
1026 wxBitmap m_cCurrentBitmap;
1034 wxImage m_os_image_red_day;
1035 wxImage m_os_image_red_dusk;
1036 wxImage m_os_image_red_night;
1037 wxImage m_os_image_grey_day;
1038 wxImage m_os_image_grey_dusk;
1039 wxImage m_os_image_grey_night;
1040 wxImage m_os_image_yellow_day;
1041 wxImage m_os_image_yellow_dusk;
1042 wxImage m_os_image_yellow_night;
1044 wxImage *m_pos_image_red;
1045 wxImage *m_pos_image_grey;
1046 wxImage *m_pos_image_yellow;
1048 wxImage *m_pos_image_user;
1049 wxImage *m_pos_image_user_grey;
1050 wxImage *m_pos_image_user_yellow;
1052 wxImage *m_pos_image_user_day;
1053 wxImage *m_pos_image_user_dusk;
1054 wxImage *m_pos_image_user_night;
1055 wxImage *m_pos_image_user_grey_day;
1056 wxImage *m_pos_image_user_grey_dusk;
1057 wxImage *m_pos_image_user_grey_night;
1058 wxImage *m_pos_image_user_yellow_day;
1059 wxImage *m_pos_image_user_yellow_dusk;
1060 wxImage *m_pos_image_user_yellow_night;
1062 wxImage m_ship_pix_image;
1064 bool m_cur_ship_pix_isgrey;
1065 ColorScheme m_ship_cs;
1068 wxBitmap *m_prot_bm;
1076 double m_wheel_lat, m_wheel_lon;
1077 int m_wheel_x, m_wheel_y;
1080 wxBitmap m_working_bm;
1081 wxBitmap m_cached_chart_bm;
1086 bool m_bzooming, m_bzooming_to_cursor;
1095 int m_panx, m_pany, m_modkeys;
1097 bool m_bmouse_key_mod;
1098 double m_zoom_factor, m_rotation_speed;
1101 wxDateTime m_last_movement_time;
1103 int m_AISRollover_MMSI;
1104 bool m_bsectors_shown;
1106 double m_displayed_scale_factor;
1108 wxColour m_fog_color;
1109 bool m_disable_edge_pan;
1110 wxFont *m_pgridFont;
1112 bool m_dragoffsetSet;
1116 double m_vLat, m_vLon;
1119 bool m_bpersistent_quilt;
1121 wxMenu *m_piano_ctx_menu;
1122 int menu_selected_dbIndex, menu_selected_index;
1127 wxRect m_mainlast_tb_rect;
1128 int m_restore_dbindex;
1129 int m_restore_group;
1132 wxSize m_muiBarHOSize;
1134 bool m_bShowOutlines;
1135 bool m_bDisplayGrid;
1136 bool m_bShowDepthUnits;
1138 bool m_bShowAISScaled;
1141 long m_s52StateHash;
1143 bool m_encShowDepth;
1144 bool m_encShowLightDesc;
1145 bool m_encShowBuoyLabels;
1146 int m_encDisplayCategory;
1147 bool m_encShowLights;
1148 bool m_encShowAnchor;
1149 bool m_encShowDataQual;
1151 wxTimer m_deferredFocusTimer;
1152 float m_focus_indicator_pix;
1156 double m_OSoffsetx, m_OSoffsety;
1157 bool m_MouseDragging;
1159 wxString m_alertString;
1160 wxRect m_scaleBarRect;
1161 bool m_bShowCompassWin;
1164 double m_sector_glat, m_sector_glon;
1165 std::vector<s57Sector_t> m_sectorlegsVisible;
1166 bool m_bShowVisibleSectors;
1168 double m_displayScale;
1169 bool m_show_focus_bar;
1171 double m_panx_target_final;
1172 double m_pany_target_final;
1173 double m_panx_target_now;
1174 double m_pany_target_now;
1176 double m_start_lat, m_start_lon;
1177 double m_target_lat, m_target_lon;
1178 double m_run_lat, m_run_lon;
1179 bool m_timed_move_vp_active;
1183 double meters_to_shift = 0;
1184 double dir_to_shift = 0;
1187 wxTimer m_chart_drag_inertia_timer;
1188 void OnChartDragInertiaTimer(wxTimerEvent &event);
1190 uint64_t m_last_drag_time;
1191 int m_chart_drag_total_x;
1192 int m_chart_drag_total_y;
1193 double m_chart_drag_total_time;
1194 double m_chart_drag_velocity_x;
1195 double m_chart_drag_velocity_y;
1196 wxLongLong m_chart_drag_inertia_time;
1197 wxLongLong m_chart_drag_inertia_start_time;
1198 bool m_chart_drag_inertia_active;
1199 double m_last_elapsed;
1200 std::vector<int> m_drag_vec_x;
1201 std::vector<int> m_drag_vec_y;
1202 std::vector<double> m_drag_vec_t;
1203 int m_inertia_last_drag_x;
1204 int m_inertia_last_drag_y;
1207 wxTimer m_easeTimer;
1208 wxLongLong m_animationStart;
1209 wxLongLong m_animationDuration;
1210 double m_startLat, m_startLon, m_startScale;
1211 double m_endLat, m_endLon, m_endScale;
1212 bool m_animationActive;
1213 void OnJumpEaseTimer(wxTimerEvent &event);
1214 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1216 DECLARE_EVENT_TABLE()