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();
429 void DoMovement(
long dt);
432 void StartTimedMovementVP(
double target_lat,
double target_lon,
int nstep);
433 void DoTimedMovementVP();
434 void StopMovementVP();
436 void StartTimedMovementTarget();
437 void DoTimedMovementTarget();
438 void StopMovementTarget();
440 void SetColorScheme(ColorScheme cs);
441 ColorScheme GetColorScheme() {
return m_cs; }
443 void CanvasApplyLocale();
444 void RebuildCursors();
447 int GetCanvasWidth() {
return m_canvas_width; }
448 int GetCanvasHeight() {
return m_canvas_height; }
467 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
468 ViewPort *GetpVP() {
return &VPoint; }
472 Piano *GetPiano() {
return m_Piano; }
473 int GetPianoHeight();
475 bool isRouteEditing(
void) {
476 return m_bRouteEditing && m_pRoutePointEditTarget;
478 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
480 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
481 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
483 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
484 bool GetbTCUpdate() {
return m_bTCupdate; }
485 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
486 bool GetbShowCurrent() {
return m_bShowCurrent; }
487 void SetbShowTide(
bool f) { m_bShowTide = f; }
488 bool GetbShowTide() {
return m_bShowTide; }
489 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
490 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
494 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
495 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
496 void GetCursorLatLon(
double *lat,
double *lon);
500 void StopAutoPan(
void);
520 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
521 bool stoptimer =
true);
549 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
551 void RotateCanvas(
double dir);
552 void DoRotateCanvas(
double rotation);
553 void DoTiltCanvas(
double tilt);
555 void ShowAISTargetList(
void);
557 void ShowGoToPosition(
void);
558 void HideGlobalToolbar();
559 void ShowGlobalToolbar();
561 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
562 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
563 bool GetShowGrid() {
return m_bDisplayGrid; }
564 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
565 bool GetShowOutlines() {
return m_bShowOutlines; }
566 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
567 bool GetShowChartbar() {
return true; }
568 wxRect GetMUIBarRect();
569 void SetMUIBarPosition();
570 void DestroyMuiBar();
573 void ToggleChartOutlines(
void);
574 void ToggleCanvasQuiltMode(
void);
576 wxString GetScaleText() {
return m_scaleText; }
577 double GetScaleValue() {
return m_scaleValue; }
578 bool GetShowAIS() {
return m_bShowAIS; }
579 void SetShowAIS(
bool show);
580 bool GetAttenAIS() {
return m_bShowAISScaled; }
581 void SetAttenAIS(
bool show);
582 void SetShowFocusBar(
bool enable) { m_show_focus_bar = enable; }
583 bool GetShowFocusBar() {
return m_show_focus_bar; }
584 MUIBar *GetMUIBar() {
return m_muiBar; }
585 void SetAlertString(wxString str) { m_alertString = str; }
586 wxString GetAlertString() {
return m_alertString; }
587 bool GetShowENCText() {
return m_encShowText; }
588 void SetShowENCText(
bool show);
590 bool GetShowENCDepth() {
return m_encShowDepth; }
591 void SetShowENCDepth(
bool show);
593 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
594 void SetShowENCLightDesc(
bool show);
596 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
597 void SetShowENCBuoyLabels(
bool show);
599 bool GetShowENCLights() {
return m_encShowLights; }
600 void SetShowENCLights(
bool show);
605 bool GetShowENCAnchor() {
return m_encShowAnchor; }
606 void SetShowENCAnchor(
bool show);
608 bool GetShowENCDataQual() {
return m_encShowDataQual; }
609 void SetShowENCDataQual(
bool show);
611 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
613 void ShowTides(
bool bShow);
614 void ShowCurrents(
bool bShow);
615 void SetUpMode(
int mode);
616 void ToggleLookahead();
617 void SetShowGPS(
bool show);
618 void UpdateFollowButtonState(
void);
620 bool IsTileOverlayIndexInYesShow(
int index);
621 bool IsTileOverlayIndexInNoShow(
int index);
622 void AddTileOverlayIndexToNoShow(
int index);
624 Route *m_pMouseRoute;
625 bool m_bMeasure_Active;
629 wxString FindValidUploadPort();
630 wxString m_active_upload_port;
638 int GetQuiltChartCount();
639 void InvalidateAllQuiltPatchs(
void);
640 void SetQuiltRefChart(
int dbIndex);
641 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
643 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
644 std::vector<int> &GetQuiltFullScreendbIndexArray();
645 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
646 int GetQuiltRefChartdbIndex(
void);
647 void InvalidateQuilt(
void);
648 double GetQuiltMaxErrorFactor();
649 bool IsChartQuiltableRef(
int db_index);
651 int GetCanvasChartNativeScale();
652 int FindClosestCanvasChartdbIndex(
int scale);
653 void UpdateCanvasOnGroupChange(
void);
655 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
656 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
657 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
658 void ShowTrackPropertiesDialog(
Track *selected);
659 void DrawTCWindow(
int x,
int y,
void *pIDX);
661 void UpdateGPSCompassStatusBox(
bool b_force_new);
664 wxColour GetFogColor() {
return m_fog_color; }
666 void ShowChartInfoWindow(
int x,
int dbIndex);
667 void HideChartInfoWindow(
void);
668 void ShowCompositeInfoWindow(
int x,
int n_charts,
int scale,
669 const std::vector<int> &index_vector);
671 void StartMeasureRoute();
672 void CancelMeasureRoute();
674 bool DoCanvasUpdate(
void);
675 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
676 void SelectQuiltRefChart(
int selected_index);
677 double GetBestVPScale(
ChartBase *pchart);
678 void selectCanvasChartDisplay(
int type,
int family);
679 void RemoveChartFromQuilt(
int dbIndex);
681 void HandlePianoClick(
int selected_index,
682 const std::vector<int> &selected_dbIndex_array);
683 void HandlePianoRClick(
int x,
int y,
int selected_index,
684 const std::vector<int> &selected_dbIndex_array);
685 void HandlePianoRollover(
int selected_index,
686 const std::vector<int> &selected_dbIndex_array,
687 int n_charts,
int scale);
688 void ClearPianoRollover();
689 void UpdateCanvasControlBar(
void);
690 void FormatPianoKeys(
void);
691 void PianoPopupMenu(
int x,
int y,
int selected_index,
692 const std::vector<int> &selected_dbIndex_array);
693 void OnPianoMenuDisableChart(wxCommandEvent &event);
694 void OnPianoMenuEnableChart(wxCommandEvent &event);
696 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
697 bool DoCanvasCOGSet(
void);
698 void ApplyGlobalSettings();
699 void SetShowGPSCompassWindow(
bool bshow);
700 bool GetShowGPSCompassWindow() {
return m_bShowCompassWin; }
701 void FreezePiano() { m_pianoFrozen =
true; }
702 void ThawPiano() { m_pianoFrozen =
false; }
703 void StartChartDragInertia();
707 wxCursor *pCursorPencil;
708 wxCursor *pCursorArrow;
709 wxCursor *pCursorCross;
710 wxCursor *pPlugIn_Cursor;
712 wxBitmap *pscratch_bm;
713 bool m_brepaint_piano;
750 bool m_bShowNavobjects;
755#ifdef HAVE_WX_GESTURE_EVENTS
756 double m_oldVPSScale;
759 wxPoint m_zoomStartPoint;
762 void DrawBlinkObjects(
void);
764 void StartRoute(
void);
765 void FinishRoute(
void);
771 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
773 bool m_FinishRouteOnKillFocus;
774 bool m_bMeasure_DistCircle;
775 bool m_bAppendingRoute;
777 Route *m_pMeasureRoute;
780 int GetMinAvailableGshhgQuality() {
781 return pWorldBackgroundChart->GetMinAvailableQuality();
783 int GetMaxAvailableGshhgQuality() {
784 return pWorldBackgroundChart->GetMaxAvailableQuality();
786 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
787 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
788 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
790 void SetAISCanvasDisplayStyle(
int StyleIndx);
791 void TouchAISToolActive(
void);
792 void UpdateAISTBTool(
void);
794 void SelectChartFromStack(
int index,
bool bDir =
false,
795 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
796 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
797 void SelectdbChart(
int dbindex);
799 void DoCanvasStackDelta(
int direction);
801 void ProcessNewGUIScale();
803 bool m_b_paint_enable;
805 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
806 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
808 std::vector<int> m_tile_noshow_index_array;
809 std::vector<int> m_tile_yesshow_index_array;
810 std::vector<int> m_quilt_noshow_index_array;
812 std::vector<int> GetQuiltNoshowIindexArray() {
813 return m_quilt_noshow_index_array;
825 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
828 int AdjustQuiltRefChart();
830 bool UpdateS52State();
832 void CallPopupMenu(
int x,
int y);
834 bool IsTempMenuBarEnabled();
835 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
838 void PositionConsole(
void);
839 wxWindow *m_nmea_log;
841 wxColour PredColor();
842 wxColour ShipColor();
844 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
845 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
846 wxPoint &GpsOffsetPixels,
847 wxPoint2DDouble lGPSPoint,
float &scale_factor_x,
848 float &scale_factor_y);
850 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
851 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
852 wxPoint2DDouble lGPSPoint);
860 wxString m_scaleText;
862 bool m_bShowScaleInStatusBar;
865 wxPoint LastShipPoint;
866 wxPoint LastPredPoint;
867 bool m_bDrawingRoute;
868 bool m_bRouteEditing;
870 bool m_bRoutePoinDragging;
872 bool m_bMayToggleMenuBar;
877 bool m_bChartDragging;
878 Route *m_pSelectedRoute;
879 Track *m_pSelectedTrack;
880 wxArrayPtrVoid *m_pEditRouteArray;
885 wxCursor *pCursorLeft;
886 wxCursor *pCursorRight;
888 wxCursor *pCursorDown;
890 wxCursor *pCursorUpLeft;
891 wxCursor *pCursorUpRight;
892 wxCursor *pCursorDownLeft;
893 wxCursor *pCursorDownRight;
897 wxBitmap *pThumbDIBShow;
898 wxBitmap *pThumbShowing;
900 bool bShowingCurrent;
909 double m_canvas_scale_factor;
912 double m_display_size_mm;
914 double m_absolute_min_scale_ppm;
916 bool singleClickEventIsValid;
917 wxMouseEvent singleClickEvent;
919 std::vector<s57Sector_t> extendedSectorLegs;
920 wxFont m_overzoomFont;
921 int m_overzoomTextWidth;
922 int m_overzoomTextHeight;
925 void OnActivate(wxActivateEvent &event);
926 void OnSize(wxSizeEvent &event);
927 void MouseTimedEvent(wxTimerEvent &event);
928 void MouseEvent(wxMouseEvent &event);
929 void ShipDraw(
ocpnDC &dc);
930 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
931 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
932 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
934 void RotateTimerEvent(wxTimerEvent &event);
935 void PanTimerEvent(wxTimerEvent &event);
936 void MovementTimerEvent(wxTimerEvent &);
937 void MovementStopTimerEvent(wxTimerEvent &);
938 void OnCursorTrackTimerEvent(wxTimerEvent &event);
940 void MovementVPTimerEvent(wxTimerEvent &event);
942 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
943 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
944 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
945 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
946 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
947 void DrawAnchorWatchPoints(
ocpnDC &dc);
948 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
950 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
951 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
952 void RebuildTideSelectList(LLBBox &BBox);
953 void RebuildCurrentSelectList(LLBBox &BBox);
957 void RenderRouteLegs(
ocpnDC &dc);
958 void RenderVisibleSectorLights(
ocpnDC &dc);
960 void AlertDraw(
ocpnDC &dc);
962 void GridDraw(
ocpnDC &dc);
963 void ScaleBarDraw(
ocpnDC &dc);
965 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
966 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
969 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
970 const wxString &str, ColorScheme cs);
971 void CreateDepthUnitEmbossMaps(ColorScheme cs);
972 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
974 void CreateOZEmbossMapData(ColorScheme cs);
976 void SetOverzoomFont();
983 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
984 void HandleNotificationMouseClick();
1008 wxTimer *pMovementStopTimer;
1010 wxTimer *pCurTrackTimer;
1012 wxTimer *pRotDefTimer;
1014 wxTimer *m_DoubleClickTimer;
1015 wxTimer m_routeFinishTimer;
1017 wxTimer m_RolloverPopupTimer;
1019 wxTimer m_VPMovementTimer;
1021 int m_wheelzoom_stop_oneshot;
1022 int m_last_wheel_dir;
1023 wxStopWatch m_wheelstopwatch;
1024 double m_zoom_target;
1026 int m_curtrack_timer_msec;
1027 int m_rollover_popup_timer_msec;
1032 wxBitmap *pss_overlay_bmp;
1033 wxMask *pss_overlay_mask;
1035 wxRect ship_draw_rect;
1036 wxRect ship_draw_last_rect;
1037 wxRect ais_draw_rect;
1038 wxRect alert_draw_rect;
1040 wxBitmap *proute_bm;
1041 wxMemoryDC m_dc_route;
1065 double m_true_scale_ppm;
1067 ownship_state_t m_ownship_state;
1071 wxBitmap m_bmTideDay;
1072 wxBitmap m_bmTideDusk;
1073 wxBitmap m_bmTideNight;
1074 wxBitmap m_bmCurrentDay;
1075 wxBitmap m_bmCurrentDusk;
1076 wxBitmap m_bmCurrentNight;
1077 wxBitmap m_cTideBitmap;
1078 wxBitmap m_cCurrentBitmap;
1086 wxImage m_os_image_red_day;
1087 wxImage m_os_image_red_dusk;
1088 wxImage m_os_image_red_night;
1089 wxImage m_os_image_grey_day;
1090 wxImage m_os_image_grey_dusk;
1091 wxImage m_os_image_grey_night;
1092 wxImage m_os_image_yellow_day;
1093 wxImage m_os_image_yellow_dusk;
1094 wxImage m_os_image_yellow_night;
1096 wxImage *m_pos_image_red;
1097 wxImage *m_pos_image_grey;
1098 wxImage *m_pos_image_yellow;
1100 wxImage *m_pos_image_user;
1101 wxImage *m_pos_image_user_grey;
1102 wxImage *m_pos_image_user_yellow;
1104 wxImage *m_pos_image_user_day;
1105 wxImage *m_pos_image_user_dusk;
1106 wxImage *m_pos_image_user_night;
1107 wxImage *m_pos_image_user_grey_day;
1108 wxImage *m_pos_image_user_grey_dusk;
1109 wxImage *m_pos_image_user_grey_night;
1110 wxImage *m_pos_image_user_yellow_day;
1111 wxImage *m_pos_image_user_yellow_dusk;
1112 wxImage *m_pos_image_user_yellow_night;
1114 wxImage m_ship_pix_image;
1116 bool m_cur_ship_pix_isgrey;
1117 ColorScheme m_ship_cs;
1120 wxBitmap *m_prot_bm;
1128 double m_wheel_lat, m_wheel_lon;
1129 int m_wheel_x, m_wheel_y;
1132 wxBitmap m_working_bm;
1133 wxBitmap m_cached_chart_bm;
1138 bool m_bzooming, m_bzooming_to_cursor;
1147 int m_panx, m_pany, m_modkeys;
1149 bool m_bmouse_key_mod;
1150 double m_zoom_factor, m_rotation_speed;
1153 wxDateTime m_last_movement_time;
1155 int m_AISRollover_MMSI;
1156 bool m_bsectors_shown;
1158 double m_displayed_scale_factor;
1160 wxColour m_fog_color;
1161 bool m_disable_edge_pan;
1162 wxFont *m_pgridFont;
1164 bool m_dragoffsetSet;
1168 double m_vLat, m_vLon;
1171 bool m_bpersistent_quilt;
1173 wxMenu *m_piano_ctx_menu;
1174 int menu_selected_dbIndex, menu_selected_index;
1179 wxRect m_mainlast_tb_rect;
1180 int m_restore_dbindex;
1181 int m_restore_group;
1184 wxSize m_muiBarHOSize;
1186 bool m_bShowOutlines;
1187 bool m_bDisplayGrid;
1188 bool m_bShowDepthUnits;
1190 bool m_bShowAISScaled;
1193 long m_s52StateHash;
1195 bool m_encShowDepth;
1196 bool m_encShowLightDesc;
1197 bool m_encShowBuoyLabels;
1198 int m_encDisplayCategory;
1199 bool m_encShowLights;
1200 bool m_encShowAnchor;
1201 bool m_encShowDataQual;
1203 wxTimer m_deferredFocusTimer;
1204 float m_focus_indicator_pix;
1208 double m_OSoffsetx, m_OSoffsety;
1209 bool m_MouseDragging;
1211 wxString m_alertString;
1212 wxRect m_scaleBarRect;
1213 bool m_bShowCompassWin;
1216 double m_sector_glat, m_sector_glon;
1217 std::vector<s57Sector_t> m_sectorlegsVisible;
1218 bool m_bShowVisibleSectors;
1220 double m_displayScale;
1221 bool m_show_focus_bar;
1223 double m_panx_target_final;
1224 double m_pany_target_final;
1225 double m_panx_target_now;
1226 double m_pany_target_now;
1228 double m_start_lat, m_start_lon;
1229 double m_target_lat, m_target_lon;
1230 double m_run_lat, m_run_lon;
1231 bool m_timed_move_vp_active;
1235 double meters_to_shift = 0;
1236 double dir_to_shift = 0;
1239 wxTimer m_chart_drag_inertia_timer;
1240 void OnChartDragInertiaTimer(wxTimerEvent &event);
1242 uint64_t m_last_drag_time;
1243 int m_chart_drag_total_x;
1244 int m_chart_drag_total_y;
1245 double m_chart_drag_total_time;
1246 double m_chart_drag_velocity_x;
1247 double m_chart_drag_velocity_y;
1248 wxLongLong m_chart_drag_inertia_time;
1249 wxLongLong m_chart_drag_inertia_start_time;
1250 bool m_chart_drag_inertia_active;
1251 double m_last_elapsed;
1252 std::vector<int> m_drag_vec_x;
1253 std::vector<int> m_drag_vec_y;
1254 std::vector<double> m_drag_vec_t;
1255 int m_inertia_last_drag_x;
1256 int m_inertia_last_drag_y;
1259 wxTimer m_easeTimer;
1260 wxLongLong m_animationStart;
1261 wxLongLong m_animationDuration;
1262 double m_startLat, m_startLon, m_startScale;
1263 double m_endLat, m_endLon, m_endScale;
1264 bool m_animationActive;
1265 void OnJumpEaseTimer(wxTimerEvent &event);
1266 bool StartSmoothJump(
double lat,
double lon,
double scale_ppm);
1271 DECLARE_EVENT_TABLE()