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);
561 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
563 void RotateCanvas(
double dir);
564 void DoRotateCanvas(
double rotation);
565 void DoTiltCanvas(
double tilt);
567 void ShowAISTargetList(
void);
569 void ShowGoToPosition(
void);
570 void HideGlobalToolbar();
571 void ShowGlobalToolbar();
573 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
574 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
575 bool GetShowGrid() {
return m_bDisplayGrid; }
576 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
577 bool GetShowOutlines() {
return m_bShowOutlines; }
578 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
579 bool GetShowChartbar() {
return true; }
580 wxRect GetMUIBarRect();
581 void SetMUIBarPosition();
582 void DestroyMuiBar();
585 void ToggleChartOutlines(
void);
586 void ToggleCanvasQuiltMode(
void);
588 wxString GetScaleText() {
return m_scaleText; }
589 double GetScaleValue() {
return m_scaleValue; }
590 bool GetShowAIS() {
return m_bShowAIS; }
591 void SetShowAIS(
bool show);
592 bool GetAttenAIS() {
return m_bShowAISScaled; }
593 void SetAttenAIS(
bool show);
594 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
595 bool GetShowFocusBar() {
return m_show_focus_bar; }
596 MUIBar *GetMUIBar() {
return m_muiBar; }
597 void SetAlertString(wxString str) { m_alertString = str; }
598 wxString GetAlertString() {
return m_alertString; }
599 bool GetShowENCText() {
return m_encShowText; }
600 void SetShowENCText(
bool show);
602 bool GetShowENCDepth() {
return m_encShowDepth; }
603 void SetShowENCDepth(
bool show);
605 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
606 void SetShowENCLightDesc(
bool show);
608 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
609 void SetShowENCBuoyLabels(
bool show);
611 bool GetShowENCLights() {
return m_encShowLights; }
612 void SetShowENCLights(
bool show);
617 bool GetShowENCAnchor() {
return m_encShowAnchor; }
618 void SetShowENCAnchor(
bool show);
620 bool GetShowENCDataQual() {
return m_encShowDataQual; }
621 void SetShowENCDataQual(
bool show);
623 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
625 void ShowTides(
bool bShow);
626 void ShowCurrents(
bool bShow);
627 void SetUpMode(
int mode);
628 void ToggleLookahead();
629 void SetShowGPS(
bool show);
630 void UpdateFollowButtonState(
void);
632 bool IsTileOverlayIndexInYesShow(
int index);
633 bool IsTileOverlayIndexInNoShow(
int index);
634 void AddTileOverlayIndexToNoShow(
int index);
636 Route *m_pMouseRoute;
637 bool m_bMeasure_Active;
641 wxString FindValidUploadPort();
642 wxString m_active_upload_port;
650 int GetQuiltChartCount();
651 void InvalidateAllQuiltPatchs(
void);
652 void SetQuiltRefChart(
int dbIndex);
653 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
655 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
656 std::vector<int> &GetQuiltFullScreendbIndexArray();
657 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
658 int GetQuiltRefChartdbIndex(
void);
659 void InvalidateQuilt(
void);
660 double GetQuiltMaxErrorFactor();
661 bool IsChartQuiltableRef(
int db_index);
663 int GetCanvasChartNativeScale();
664 int FindClosestCanvasChartdbIndex(
int scale);
665 void UpdateCanvasOnGroupChange(
void);
667 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
668 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
669 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
670 void ShowTrackPropertiesDialog(
Track *selected);
671 void DrawTCWindow(
int x,
int y,
void *pIDX);
673 void UpdateGPSCompassStatusBox(
bool b_force_new);
676 wxColour GetFogColor() {
return m_fog_color; }
678 void ShowChartInfoWindow(
int x,
int dbIndex);
679 void HideChartInfoWindow(
void);
680 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
681 const std::vector<int> &index_vector);
683 void StartMeasureRoute();
684 void CancelMeasureRoute();
686 bool DoCanvasUpdate(
void);
687 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
688 void SelectQuiltRefChart(
int selected_index);
689 double GetBestVPScale(
ChartBase *pchart);
690 void selectCanvasChartDisplay(
int type,
int family);
691 void RemoveChartFromQuilt(
int dbIndex);
693 void HandlePianoClick(
int selected_index,
694 const std::vector<int> &selected_dbIndex_array);
695 void HandlePianoRClick(
int x,
int y,
int selected_index,
696 const std::vector<int> &selected_dbIndex_array);
697 void HandlePianoRollover(
int selected_index,
698 const std::vector<int> &selected_dbIndex_array,
699 int n_charts,
int scale);
700 void ClearPianoRollover();
701 void UpdateCanvasControlBar(
void);
702 void FormatPianoKeys(
void);
703 void PianoPopupMenu(
int x,
int y,
int selected_index,
704 const std::vector<int> &selected_dbIndex_array);
705 void OnPianoMenuDisableChart(wxCommandEvent &event);
706 void OnPianoMenuEnableChart(wxCommandEvent &event);
708 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
709 bool DoCanvasCOGSet(
void);
710 void ApplyGlobalSettings();
711 void SetShowGPSCompassWindow(
bool bshow);
712 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
713 void FreezePiano() { m_pianoFrozen =
true; }
714 void ThawPiano() { m_pianoFrozen =
false; }
715 void StartChartDragInertia();
719 wxCursor *pCursorPencil;
720 wxCursor *pCursorArrow;
721 wxCursor *pCursorCross;
722 wxCursor *pPlugIn_Cursor;
724 wxBitmap *pscratch_bm;
725 bool m_brepaint_piano;
762 bool m_bShowNavobjects;
767#ifdef HAVE_WX_GESTURE_EVENTS
768 double m_oldVPSScale;
771 wxPoint m_zoomStartPoint;
774 void DrawBlinkObjects(
void);
776 void StartRoute(
void);
777 void FinishRoute(
void);
783 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
785 bool m_FinishRouteOnKillFocus;
786 bool m_bMeasure_DistCircle;
787 bool m_bAppendingRoute;
789 Route *m_pMeasureRoute;
792 int GetMinAvailableGshhgQuality() {
793 return pWorldBackgroundChart->GetMinAvailableQuality();
795 int GetMaxAvailableGshhgQuality() {
796 return pWorldBackgroundChart->GetMaxAvailableQuality();
798 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
799 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
800 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
802 void SetAISCanvasDisplayStyle(
int StyleIndx);
803 void TouchAISToolActive(
void);
804 void UpdateAISTBTool(
void);
806 void SelectChartFromStack(
int index,
bool bDir =
false,
807 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
808 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
809 void SelectdbChart(
int dbindex);
811 void DoCanvasStackDelta(
int direction);
813 void ProcessNewGUIScale();
815 bool m_b_paint_enable;
817 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
818 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
820 std::vector<int> m_tile_noshow_index_array;
821 std::vector<int> m_tile_yesshow_index_array;
822 std::vector<int> m_quilt_noshow_index_array;
824 std::vector<int> GetQuiltNoshowIindexArray() {
825 return m_quilt_noshow_index_array;
837 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
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()