OpenCPN Partial API docs
Loading...
Searching...
No Matches
chcanv.h
Go to the documentation of this file.
1
2/**************************************************************************
3 * Copyright (C) 2010 by David S. Register *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
25#ifndef _CHCANV_H__
26#define _CHCANV_H__
27
28#include "gl_headers.h" // Must go before wx/glcanvas
29
30#include <wx/datetime.h>
31#include <wx/grid.h>
32#include <wx/treectrl.h>
33
34#ifdef ocpnUSE_GL
35#include <wx/glcanvas.h>
36#endif
37
38#include "model/route.h"
39#include "model/route_point.h"
40#include "model/select_item.h"
41
42#include "abstract_chart_canv.h"
43#include "bbox.h"
44#include "canvas_menu.h"
45#include "chartdb.h"
46#include "chartimg.h"
47#include "ch_info_win.h"
48#include "compass.h"
49#include "emboss_data.h"
50#include "gshhs.h"
51#include "gl_chart_canvas.h"
52#include "gui_lib.h"
53#include "idx_entry.h"
54#include "mui_bar.h"
56#include "observable_evtvar.h"
57#include "observable.h"
58#include "ocp_cursor.h"
59#include "ocpn_pixel.h"
60#include "ocpn_plugin.h"
61#include "piano.h"
62#include "quilt.h"
63#include "rollover_win.h"
64#include "s57_sector.h"
65#include "tc_win.h"
66#include "undo.h"
67
68WX_DEFINE_ARRAY_PTR(ChartCanvas *, arrayofCanvasPtr);
69
70#ifdef __ANDROID__
71#define STAT_FIELD_TICK -1
72#define STAT_FIELD_SOGCOG 0
73#define STAT_FIELD_CURSOR_LL -1
74#define STAT_FIELD_CURSOR_BRGRNG -1
75#define STAT_FIELD_SCALE 1
76#else
77#define STAT_FIELD_TICK 0
78#define STAT_FIELD_SOGCOG 1
79#define STAT_FIELD_CURSOR_LL 2
80#define STAT_FIELD_CURSOR_BRGRNG 3
81#define STAT_FIELD_SCALE 4
82#endif
83
84class canvasConfig; // circular
85class CanvasMenuHandler; // circular
86class MyFrame; // circular
87class NotificationsList; // circular
88class NotificationButton; // circular
89class Quilt; // circular
90class TCWin; // circular
91class Undo; // circular
92
93class ChartCanvas; // forward
96extern arrayofCanvasPtr g_canvasArray;
97
98// Useful static routines
99void ShowAISTargetQueryDialog(wxWindow *parent, int mmsi);
100
101// Set up the preferred quilt type
102#define QUILT_TYPE_2
103
104//----------------------------------------------------------------------------
105// Forward Declarations
106//----------------------------------------------------------------------------
107
108//--------------------------------------------------------
109// Screen Brightness Control Support Routines
110//
111//--------------------------------------------------------
112
113int InitScreenBrightness(void);
114int RestoreScreenBrightness(void);
115int SetScreenBrightness(int brig1Ghtness);
116
117enum // specify the render behaviour of SetViewPoint()
118{
119 CURRENT_RENDER, // use the current render type
120 FORCE_SUBSAMPLE // force sub-sampled render, with re-render timer
121};
122
123// Cursor region enumerator
124enum {
125 CENTER,
126 MID_RIGHT,
127 MID_LEFT,
128 MID_TOP,
129 MID_BOT,
130};
131
132typedef enum ownship_state_t {
133 SHIP_NORMAL = 0,
134 SHIP_LOWACCURACY,
135 SHIP_INVALID
136} _ownship_state_t;
137
138enum { ID_S57QUERYTREECTRL = 10000, ID_AISDIALOGOK };
139
140enum {
141 ID_PIANO_DISABLE_QUILT_CHART = 32000,
142 ID_PIANO_ENABLE_QUILT_CHART,
143 ID_PIANO_CONTRACT_PIANO,
144 ID_PIANO_EXPAND_PIANO
145};
146
147enum { NORTH_UP_MODE, COURSE_UP_MODE, HEAD_UP_MODE };
148
149extern void pupHandler_PasteRoute(); // forward
150
151extern void pupHandler_PasteWaypoint(); // forward
152
153extern void pupHandler_PasteTrack(); // forward
154
174 friend class glChartCanvas;
175
176public:
177 ChartCanvas(wxFrame *frame, int canvasIndex, wxWindow *nmea_log);
178 ~ChartCanvas();
179
180 virtual void ReloadVP(bool b_adjust = true) override;
181
183 float GetVPScale() override { return GetVP().view_scale_ppm; }
184
185 bool Show(bool show = true) override { return wxWindow::Show(show); }
186 double GetCanvasRangeMeters() override;
187 int GetENCDisplayCategory() override { return m_encDisplayCategory; }
188 void SetCanvasRangeMeters(double range) override;
189 wxBitmap *GetScratchBitmap() const override { return pscratch_bm; }
190 void ResetGridFont() override { m_pgridFont = nullptr; }
191 void ResetGlGridFont() override;
192 void EnablePaint(bool b_enable) override;
193 bool CanAccelerateGlPanning() override;
194 void SetupGlCompression() override;
195
196 void TriggerDeferredFocus() override;
197 void Refresh(bool eraseBackground = true,
198 const wxRect *rect = nullptr) override;
199 wxWindow *GetWindow() override { return this; }
200 double GetScaleValue() override { return m_scaleValue; }
201
202 void SetupGlCanvas();
203
204 // Methods
205 void OnKeyDown(wxKeyEvent &event);
206 void OnKeyUp(wxKeyEvent &event);
207 void OnKeyChar(wxKeyEvent &event);
208 void OnPaint(wxPaintEvent &event);
209 void OnToolLeftClick(wxCommandEvent &event);
210 void PaintCleanup();
211 void Scroll(int dx, int dy);
212
213 bool MouseEventOverlayWindows(wxMouseEvent &event);
214 bool MouseEventChartBar(wxMouseEvent &event);
215 bool MouseEventMUIBar(wxMouseEvent &event);
216 bool MouseEventToolbar(wxMouseEvent &event);
217 bool MouseEventIENCBar(wxMouseEvent &event);
218
219 bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick = true);
220 bool MouseEventProcessObjects(wxMouseEvent &event);
236 bool MouseEventProcessCanvas(wxMouseEvent &event);
237 void SetCanvasCursor(wxMouseEvent &event);
238 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
239 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
240#ifdef HAVE_WX_GESTURE_EVENTS
241 void OnZoom(wxZoomGestureEvent &event);
242 void OnLongPress(wxLongPressEvent &event);
243 void OnPressAndTap(wxPressAndTapEvent &event);
244
245 void OnLeftDown(wxMouseEvent &evt);
246 void OnLeftUp(wxMouseEvent &evt);
247
248 void OnRightUp(wxMouseEvent &event);
249 void OnRightDown(wxMouseEvent &event);
250
251 void OnDoubleLeftClick(wxMouseEvent &event);
252
253 void OnWheel(wxMouseEvent &event);
254 void OnMotion(wxMouseEvent &event);
255#endif /* HAVE_WX_GESTURE_EVENTS */
256
257 void PopupMenuHandler(wxCommandEvent &event);
258 bool IsPrimaryCanvas() { return (m_canvasIndex == 0); }
259
260 bool SetUserOwnship();
261
262 bool SetCursor(const wxCursor &c) override;
263 void Update() override;
264
265 void LostMouseCapture(wxMouseCaptureLostEvent &event);
266
267 void CancelMouseRoute();
271 void SetDisplaySizeMM(double size);
275 double GetDisplaySizeMM() { return m_display_size_mm; }
276
288 bool SetVPScale(double sc, bool b_refresh = true);
289 bool SetVPProjection(int projection);
297 bool SetViewPoint(double lat, double lon);
298 bool SetViewPointByCorners(double latSW, double lonSW, double latNE,
299 double lonNE);
314 bool SetViewPoint(double lat, double lon, double scale_ppm, double skew,
315 double rotation, int projection = 0, bool b_adjust = true,
316 bool b_refresh = true);
317 void LoadVP(ViewPort &vp, bool b_adjust = true);
318
319 ChartStack *GetpCurrentStack() { return m_pCurrentStack; }
320 void SetGroupIndex(int index, bool autoswitch = false);
321 bool CheckGroup(int igroup);
322 void canvasRefreshGroupIndex(void);
323 void canvasChartsRefresh(int dbi_hint);
324
325 void CheckGroupValid(bool showMessage = true, bool switchGroup0 = true);
326
327 void UpdateCanvasS52PLIBConfig();
328
329 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
330 void OnRouteFinishTimerEvent(wxTimerEvent &event);
331
332 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
333 void SetupCanvasQuiltMode(void);
334 void ApplyCanvasConfig(canvasConfig *pcc);
335
336 bool SetVPRotation(double angle);
337 double GetVPRotation(void) { return GetVP().rotation; }
338 double GetVPSkew(void) { return GetVP().skew; }
339 double GetVPTilt(void) { return GetVP().tilt; }
340
341 void ClearbFollow(void);
342 void SetbFollow(void);
343 void TogglebFollow(void);
344 bool GetbFollow() { return m_bFollow; }
345
346 void JumpToPosition(double lat, double lon, double scale);
347 void SetFirstAuto(bool b_auto) { m_bFirstAuto = b_auto; }
348 void SetAbsoluteMinScale(double min_scale);
349 std::shared_ptr<HostApi121::PiPointContext> GetCanvasContextAtPoint(int x,
350 int y);
351
364 void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r);
378 void GetDoubleCanvasPointPixVP(ViewPort &vp, double rlat, double rlon,
379 wxPoint2DDouble *r);
380
397 bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r);
398
419 bool GetCanvasPointPixVP(ViewPort &vp, double rlat, double rlon, wxPoint *r);
420
436 void GetCanvasPixPoint(double x, double y, double &lat, double &lon);
437 void WarpPointerDeferred(int x, int y);
438 void UpdateShips();
439 void UpdateAIS();
440 void UpdateAlerts(); // pjotrc 2010.02.22
441 void ToggleCPAWarn();
442
443 bool IsMeasureActive() { return m_bMeasure_Active; }
444 wxBitmap &GetTideBitmap() { return m_cTideBitmap; }
445 Undo *undo;
446
447 int GetUpMode() { return m_upMode; }
448 bool GetLookahead() { return m_bLookAhead; }
449
450 void UnlockQuilt();
451 void SetQuiltMode(bool b_quilt);
452 bool GetQuiltMode(void);
453 std::vector<int> GetQuiltIndexArray(void);
454 bool IsQuiltDelta(void);
455 void SetQuiltChartHiLiteIndex(int dbIndex);
456 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
457 void ClearQuiltChartHiLiteIndexArray();
458 int GetQuiltReferenceChartIndex(void);
459 double GetBestStartScale(int dbi_hint, const ViewPort &vp);
460 void ConfigureChartBar();
461
462 int GetNextContextMenuId();
463
464 TCWin *getTCWin() { return pCwin; }
465
466 bool StartTimedMovement(bool stoptimer = true);
467 void DoTimedMovement();
480 void DoMovement(long dt);
481 void StopMovement();
482
483 void StartTimedMovementVP(double target_lat, double target_lon, int nstep);
484 void DoTimedMovementVP();
485 void StopMovementVP();
486
487 void StartTimedMovementTarget();
488 void DoTimedMovementTarget();
489 void StopMovementTarget();
490
491 void SetColorScheme(ColorScheme cs);
492 ColorScheme GetColorScheme() { return m_cs; }
493
494 void CanvasApplyLocale();
495 void RebuildCursors();
496
497 // Accessors
498 int GetCanvasWidth() { return m_canvas_width; }
499 int GetCanvasHeight() { return m_canvas_height; }
502 float GetVPChartScale() { return GetVP().chart_scale; }
511 double GetCanvasScaleFactor() { return m_canvas_scale_factor; }
512 /*chcanv*
513 * Return the physical pixels per meter at chart center, accounting for
514 * latitude distortion.
515 */
516 double GetCanvasTrueScale() { return m_true_scale_ppm; }
517 double GetAbsoluteMinScalePpm() { return m_absolute_min_scale_ppm; }
518 ViewPort *GetpVP() { return &VPoint; }
519 void SetVP(ViewPort &);
520 ChartBase *GetChartAtCursor();
521 ChartBase *GetOverlayChartAtCursor();
522 Piano *GetPiano() { return m_Piano; }
523 int GetPianoHeight();
524
525 bool isRouteEditing(void) {
526 return m_bRouteEditing && m_pRoutePointEditTarget;
527 }
528 bool isMarkEditing(void) { return m_bMarkEditing && m_pRoutePointEditTarget; }
529
530 GSHHSChart *GetWorldBackgroundChart() { return pWorldBackgroundChart; }
531 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
532
533 void SetbTCUpdate(bool f) { m_bTCupdate = f; }
534 bool GetbTCUpdate() { return m_bTCupdate; }
535 void SetbShowCurrent(bool f) { m_bShowCurrent = f; }
536 bool GetbShowCurrent() { return m_bShowCurrent; }
537 void SetbShowTide(bool f) { m_bShowTide = f; }
538 bool GetbShowTide() { return m_bShowTide; }
539 void SetShowVisibleSectors(bool val) { m_bShowVisibleSectors = val; }
540 bool GetShowVisibleSectors() { return m_bShowVisibleSectors; }
542 double GetPixPerMM() { return m_pix_per_mm; }
543
544 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
545 void SetCursorStatus(double cursor_lat, double cursor_lon);
546 void GetCursorLatLon(double *lat, double *lon);
549 bool PanCanvas(double dx, double dy);
550 void StopAutoPan(void);
551 bool IsOwnshipOnScreen();
552 void DisableQuiltAdjustOnZoom(bool disable) {
553 m_disable_adjust_on_zoom = disable;
554 }
555
574 void ZoomCanvas(double factor, bool can_zoom_to_cursor = true,
575 bool stoptimer = true);
576
589 void ZoomCanvasSimple(double factor);
590
591 void RotateCanvas(double dir);
592 void DoRotateCanvas(double rotation);
593 void DoTiltCanvas(double tilt);
594
595 void ShowAISTargetList(void);
596
597 void ShowGoToPosition(void);
598 void HideGlobalToolbar();
599 void ShowGlobalToolbar();
600
601 bool GetShowDepthUnits() { return m_bShowDepthUnits; }
602 void SetShowDepthUnits(bool show) { m_bShowDepthUnits = show; }
603 bool GetShowGrid() { return m_bDisplayGrid; }
604 void SetShowGrid(bool show) { m_bDisplayGrid = show; }
605 bool GetShowOutlines() { return m_bShowOutlines; }
606 void SetShowOutlines(bool show) { m_bShowOutlines = show; }
607 bool GetShowChartbar() { return true; }
608 wxRect GetMUIBarRect();
609 void SetMUIBarPosition();
610 void DestroyMuiBar();
611 void CreateMUIBar();
612
613 void ToggleChartOutlines(void);
614 void ToggleCanvasQuiltMode(void);
615
616 wxString GetScaleText() { return m_scaleText; }
617 bool GetShowAIS() { return m_bShowAIS; }
618 void SetShowAIS(bool show);
619 bool GetAttenAIS() { return m_bShowAISScaled; }
620 void SetAttenAIS(bool show);
621 void SetShowFocusBar(bool enable) { m_show_focus_bar = enable; }
622 bool GetShowFocusBar() { return m_show_focus_bar; }
623 MUIBar *GetMUIBar() { return m_muiBar; }
624 void SetAlertString(wxString str) { m_alertString = str; }
625 wxString GetAlertString() { return m_alertString; }
626 bool GetShowENCText() { return m_encShowText; }
627 void SetShowENCText(bool show);
628
629 bool GetShowENCDepth() { return m_encShowDepth; }
630 void SetShowENCDepth(bool show);
631
632 bool GetShowENCLightDesc() { return m_encShowLightDesc; }
633 void SetShowENCLightDesc(bool show);
634
635 bool GetShowENCBuoyLabels() { return m_encShowBuoyLabels; }
636 void SetShowENCBuoyLabels(bool show);
637
638 bool GetShowENCLights() { return m_encShowLights; }
639 void SetShowENCLights(bool show);
640
641 void SetENCDisplayCategory(int category);
642
643 bool GetShowENCAnchor() { return m_encShowAnchor; }
644 void SetShowENCAnchor(bool show);
645
646 bool GetShowENCDataQual() { return m_encShowDataQual; }
647 void SetShowENCDataQual(bool show);
648
649 void JaggyCircle(ocpnDC &dc, wxPen pen, int x, int y, int radius);
650 int m_canvasIndex;
651 void ShowTides(bool bShow);
652 void ShowCurrents(bool bShow);
653 void SetUpMode(int mode);
654 void ToggleLookahead();
655 void SetShowGPS(bool show);
656 void UpdateFollowButtonState(void);
657 void InvalidateGL();
658 bool IsTileOverlayIndexInYesShow(int index);
659 bool IsTileOverlayIndexInNoShow(int index);
660 void AddTileOverlayIndexToNoShow(int index);
661 int m_groupIndex;
662 Route *m_pMouseRoute;
663 bool m_bMeasure_Active;
664 ViewPort &GetVP();
665 ChartBase *m_singleChart;
666 Quilt *m_pQuilt;
667 wxString FindValidUploadPort();
668 wxString m_active_upload_port;
669
670 // protected:
671
672 // private:
673 ChartBase *GetLargestScaleQuiltChart();
674 ChartBase *GetFirstQuiltChart();
675 ChartBase *GetNextQuiltChart();
676 int GetQuiltChartCount();
677 void InvalidateAllQuiltPatchs(void);
678 void SetQuiltRefChart(int dbIndex);
679 std::vector<int> GetQuiltCandidatedbIndexArray(bool flag1 = true,
680 bool flag2 = true);
681 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
682 std::vector<int> &GetQuiltFullScreendbIndexArray();
683 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
684 int GetQuiltRefChartdbIndex(void);
685 void InvalidateQuilt(void);
686 double GetQuiltMaxErrorFactor();
687 bool IsChartQuiltableRef(int db_index);
688 bool IsChartLargeEnoughToRender(ChartBase *chart, ViewPort &vp);
689 int GetCanvasChartNativeScale();
690 int FindClosestCanvasChartdbIndex(int scale);
691 void UpdateCanvasOnGroupChange(void);
692
693 void ShowObjectQueryWindow(int x, int y, float zlat, float zlon);
694 void ShowMarkPropertiesDialog(RoutePoint *markPoint);
695 void ShowRoutePropertiesDialog(wxString title, Route *selected);
696 void ShowTrackPropertiesDialog(Track *selected);
699 void DrawTCWindow(int x, int y, void *pIDX);
700
713 void ShowSingleTideDialog(int x, int y, void *pvIDX);
714
716 bool IsTideDialogOpen() const;
717
719 void CloseTideDialog();
720
721 void UpdateGPSCompassStatusBox(bool b_force_new);
722 ocpnCompass *GetCompass() { return m_Compass; }
723
724 wxColour GetFogColor() { return m_fog_color; }
725
726 void ShowChartInfoWindow(int x, int dbIndex);
727 void HideChartInfoWindow(void);
728 void ShowCompositeInfoWindow(int x, int n_charts, int scale,
729 const std::vector<int> &index_vector);
730
731 void StartMeasureRoute();
732 void CancelMeasureRoute();
733
734 bool DoCanvasUpdate(void);
735 void SelectQuiltRefdbChart(int db_index, bool b_autoscale = true);
736 void SelectQuiltRefChart(int selected_index);
737 double GetBestVPScale(ChartBase *pchart);
738 void selectCanvasChartDisplay(int type, int family);
739 void RemoveChartFromQuilt(int dbIndex);
740
741 void HandlePianoClick(int selected_index,
742 const std::vector<int> &selected_dbIndex_array);
743 void HandlePianoRClick(int x, int y, int selected_index,
744 const std::vector<int> &selected_dbIndex_array);
745 void HandlePianoRollover(int selected_index,
746 const std::vector<int> &selected_dbIndex_array,
747 int n_charts, int scale);
748 void ClearPianoRollover();
749 void UpdateCanvasControlBar(void);
750 void FormatPianoKeys(void);
751 void PianoPopupMenu(int x, int y, int selected_index,
752 const std::vector<int> &selected_dbIndex_array);
753 void OnPianoMenuDisableChart(wxCommandEvent &event);
754 void OnPianoMenuEnableChart(wxCommandEvent &event);
755
756 bool IsPianoContextMenuActive() { return m_piano_ctx_menu != 0; }
757 bool DoCanvasCOGSet(void);
758 void ApplyGlobalSettings();
759 void SetShowGPSCompassWindow(bool bshow);
760 bool GetShowGPSCompassWindow() { return m_bShowCompassWin; }
761 void FreezePiano() { m_pianoFrozen = true; }
762 void ThawPiano() { m_pianoFrozen = false; }
763 void StartChartDragInertia();
764 void SetupGridFont();
765
766 // Todo build more accessors
767 bool m_bFollow;
768 wxCursor *pCursorPencil;
769 wxCursor *pCursorArrow;
770 wxCursor *pCursorCross;
771 wxCursor *pPlugIn_Cursor;
772 TCWin *pCwin;
773 bool m_brepaint_piano;
806 wxPoint r_rband;
807 double m_prev_rlat;
808 double m_prev_rlon;
809 RoutePoint *m_prev_pMousePoint;
810 bool m_bShowNavobjects;
811 int m_routeState;
812 int m_upMode;
813 bool m_bLookAhead;
814
815#ifdef HAVE_WX_GESTURE_EVENTS
816 double m_oldVPSScale;
817 bool m_popupWanted;
818 bool m_leftdown;
819 wxPoint m_zoomStartPoint;
820#endif /* HAVE_WX_GESTURE_EVENTS */
821
822 void DrawBlinkObjects(void);
823
824 void StartRoute(void);
825 wxString FinishRoute(void);
826
827#ifdef ocpnUSE_GL
828 glChartCanvas *GetglCanvas() { return m_glcc; }
829#endif
830
831 bool CheckEdgePan(int x, int y, bool bdragging, int margin, int delta);
832
833 bool m_FinishRouteOnKillFocus;
834 bool m_bMeasure_DistCircle;
835 bool m_bAppendingRoute;
836 int m_nMeasureState;
837 Route *m_pMeasureRoute;
838 wxWindow *parent_frame;
839 CanvasMenuHandler *m_canvasMenu;
840 int GetMinAvailableGshhgQuality() {
841 return pWorldBackgroundChart->GetMinAvailableQuality();
842 }
843 int GetMaxAvailableGshhgQuality() {
844 return pWorldBackgroundChart->GetMaxAvailableQuality();
845 }
846 Route *GetSelectedRoute() const { return m_pSelectedRoute; }
847 Track *GetSelectedTrack() const { return m_pSelectedTrack; }
848 RoutePoint *GetSelectedRoutePoint() const { return m_pFoundRoutePoint; }
849
850 void SetAISCanvasDisplayStyle(int StyleIndx);
851 void TouchAISToolActive(void);
852 void UpdateAISTBTool(void);
853
854 void SelectChartFromStack(int index, bool bDir = false,
855 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
856 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
857 void SelectdbChart(int dbindex);
858
859 void DoCanvasStackDelta(int direction);
860
861 void ProcessNewGUIScale();
862
863 bool m_b_paint_enable;
864
865 wxRect GetScaleBarRect() { return m_scaleBarRect; }
866 void RenderAlertMessage(wxDC &dc, const ViewPort &vp);
867
868 std::vector<int> m_tile_noshow_index_array;
869 std::vector<int> m_tile_yesshow_index_array;
870 std::vector<int> m_quilt_noshow_index_array;
871
872 std::vector<int> GetQuiltNoshowIindexArray() {
873 return m_quilt_noshow_index_array;
874 }
884 double GetDisplayScale() { return m_displayScale; }
885 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
886 NotificationsList *GetNotificationsList() { return m_NotificationsList; }
887
888 int PrepareContextSelections(double lat, double lon);
889
890 RoutePoint *GetFoundRoutepoint() { return m_pFoundRoutePoint; }
891
897
898 bool m_inPinch;
899
900private:
914 void DoZoomCanvas(double factor, bool can_zoom_to_cursor = true);
915
916 int AdjustQuiltRefChart();
917 bool UpdateS52State();
918 void CallPopupMenu(int x, int y);
919 bool IsTempMenuBarEnabled();
920 bool InvokeCanvasMenu(int x, int y, int seltype);
921 void OnMenuTimer(wxTimerEvent &event);
922 wxTimer m_menuTimer;
923 wxPoint m_menuPos;
924 bool m_inLongPress;
925
926 wxBitmap *pscratch_bm;
927 ViewPort VPoint;
928 void PositionConsole(void);
929 wxWindow *m_nmea_log;
930
931 wxColour PredColor();
932 wxColour ShipColor();
933
934 void ComputeShipScaleFactor(float icon_hdt, int ownShipWidth,
935 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
936 wxPoint &GpsOffsetPixels,
937 wxPoint2DDouble lGPSPoint, float &scale_factor_x,
938 float &scale_factor_y);
939
940 void ShipDrawLargeScale(ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
941 void ShipIndicatorsDraw(ocpnDC &dc, int img_height, wxPoint GPSOffsetPixels,
942 wxPoint2DDouble lGPSPoint);
943
944 ChInfoWin *m_pCIWin;
945
946 bool m_bShowCurrent;
947 bool m_bShowTide;
948 int cursor_region;
949 bool m_bTCupdate;
950 wxString m_scaleText;
951 double m_scaleValue;
952 bool m_bShowScaleInStatusBar;
953 wxRect bbRect;
954
955 wxPoint LastShipPoint;
956 wxPoint LastPredPoint;
957 bool m_bDrawingRoute;
958 bool m_bRouteEditing;
959 bool m_bMarkEditing;
960 bool m_bRoutePoinDragging;
961 bool m_bIsInRadius;
962 bool m_bMayToggleMenuBar;
963
964 RoutePoint *m_pRoutePointEditTarget;
965 RoutePoint *m_lastRoutePointEditTarget;
966 SelectItem *m_pFoundPoint;
967 bool m_bChartDragging;
968 wxPoint
969 m_touchdownPos; // LeftDown position for touch drag displacement check
970 Route *m_pSelectedRoute;
971 Track *m_pSelectedTrack;
972 wxArrayPtrVoid *m_pEditRouteArray;
973 RoutePoint *m_pFoundRoutePoint;
974
975 int m_FoundAIS_MMSI;
976
977 wxCursor *pCursorLeft;
978 wxCursor *pCursorRight;
979 wxCursor *pCursorUp;
980 wxCursor *pCursorDown;
981
982 wxCursor *pCursorUpLeft;
983 wxCursor *pCursorUpRight;
984 wxCursor *pCursorDownLeft;
985 wxCursor *pCursorDownRight;
986
987 int popx, popy;
988
989 wxBitmap *pThumbDIBShow;
990 wxBitmap *pThumbShowing;
991
992 bool bShowingCurrent;
993 bool bShowingTide;
994
1001 double m_canvas_scale_factor;
1003 double m_pix_per_mm;
1004 double m_display_size_mm;
1005
1006 double m_absolute_min_scale_ppm;
1007
1008 bool singleClickEventIsValid;
1009 wxMouseEvent singleClickEvent;
1010
1011 std::vector<s57Sector_t> extendedSectorLegs;
1012 wxFont m_overzoomFont;
1013 int m_overzoomTextWidth;
1014 int m_overzoomTextHeight;
1015
1016 // Methods
1017 void OnActivate(wxActivateEvent &event);
1018 void OnSize(wxSizeEvent &event);
1019 void MouseTimedEvent(wxTimerEvent &event);
1020 void MouseEvent(wxMouseEvent &event);
1021 void ShipDraw(ocpnDC &dc);
1022 void DrawArrow(ocpnDC &dc, int x, int y, double rot_angle, double scale);
1023 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
1024 void FindRoutePointsAtCursor(float selectRadius, bool setBeingEdited);
1025
1026 void RotateTimerEvent(wxTimerEvent &event);
1027 void PanTimerEvent(wxTimerEvent &event);
1028 void MovementTimerEvent(wxTimerEvent &);
1029 void MovementStopTimerEvent(wxTimerEvent &);
1030 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1031
1032 void MovementVPTimerEvent(wxTimerEvent &event);
1033
1034 void DrawAllTracksInBBox(ocpnDC &dc, LLBBox &BltBBox);
1035 void DrawActiveTrackInBBox(ocpnDC &dc, LLBBox &BltBBox);
1036 void DrawAllRoutesInBBox(ocpnDC &dc, LLBBox &BltBBox);
1037 void DrawActiveRouteInBBox(ocpnDC &dc, LLBBox &BltBBox);
1038 void DrawAllWaypointsInBBox(ocpnDC &dc, LLBBox &BltBBox);
1039 void DrawAnchorWatchPoints(ocpnDC &dc);
1040 double GetAnchorWatchRadiusPixels(RoutePoint *pAnchorWatchPoint);
1041
1042 void DrawAllTidesInBBox(ocpnDC &dc, LLBBox &BBox);
1043 void DrawAllCurrentsInBBox(ocpnDC &dc, LLBBox &BBox);
1044 void RebuildTideSelectList(LLBBox &BBox);
1045 void RebuildCurrentSelectList(LLBBox &BBox);
1046 IDX_entry *FindBestCurrentObject(double lat, double lon);
1047
1048 void RenderAllChartOutlines(ocpnDC &dc, ViewPort &vp);
1049 void RenderChartOutline(ocpnDC &dc, int dbIndex, ViewPort &vp);
1050 void RenderRouteLegs(ocpnDC &dc);
1051 void RenderVisibleSectorLights(ocpnDC &dc);
1052
1053 void AlertDraw(ocpnDC &dc); // pjotrc 2010.02.22
1054
1055 void GridDraw(ocpnDC &dc); // Display lat/lon Grid in chart display
1056 void ScaleBarDraw(ocpnDC &dc);
1057
1058 void DrawOverlayObjects(ocpnDC &dc, const wxRegion &ru);
1059 void RenderShipToActive(ocpnDC &dc, bool Use_Opengl);
1060
1061 emboss_data *EmbossDepthScale();
1062 emboss_data *CreateEmbossMapData(wxFont &font, int width, int height,
1063 const wxString &str, ColorScheme cs);
1064 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1065 wxBitmap CreateDimBitmap(wxBitmap &Bitmap, double factor);
1066
1067 void CreateOZEmbossMapData(ColorScheme cs);
1068 emboss_data *EmbossOverzoomIndicator(ocpnDC &dc);
1069 void SetOverzoomFont();
1070
1071 // void CreateCM93OffsetEmbossMapData(ColorScheme cs);
1072 // void EmbossCM93Offset ( wxMemoryDC *pdc);
1073
1074 void DrawEmboss(ocpnDC &dc, emboss_data *pemboss);
1075
1076 void ShowBrightnessLevelTimedPopup(int brightness, int min, int max);
1077 void HandleNotificationMouseClick();
1078
1079 // Data
1081 int m_canvas_width;
1083 int m_canvas_height;
1084
1085 int xr_margin; // chart scroll margins, control cursor, etc.
1086 int xl_margin;
1087 int yt_margin;
1088 int yb_margin;
1089
1090 wxPoint last_drag;
1091 wxPoint m_last_touch_down_pos;
1092
1093 wxMemoryDC *pmemdc;
1094
1095 int warp_x, warp_y;
1096 bool warp_flag;
1097
1098 wxTimer *
1099 pPanTimer; // This timer used for auto panning on route creation and edit
1100 wxTimer *
1101 pMovementTimer; // This timer used for smooth movement in non-opengl mode
1102 wxTimer *pMovementStopTimer; // This timer used to stop movement if a keyup
1103 // event is lost
1104 wxTimer *pCurTrackTimer; // This timer used to update the status window on
1105 // mouse idle
1106 wxTimer *pRotDefTimer; // This timer used to control rotaion rendering on
1107 // mouse moves
1108 wxTimer *m_DoubleClickTimer;
1109 wxTimer m_routeFinishTimer;
1110
1111 wxTimer m_RolloverPopupTimer;
1112
1113 wxTimer m_VPMovementTimer;
1114
1115 int m_wheelzoom_stop_oneshot;
1116 int m_last_wheel_dir;
1117 wxStopWatch m_wheelstopwatch;
1118 double m_zoom_target;
1119
1120 int m_curtrack_timer_msec;
1121 int m_rollover_popup_timer_msec;
1122
1123 GSHHSChart *pWorldBackgroundChart;
1124
1125 ChartBaseBSB *pCBSB;
1126 wxBitmap *pss_overlay_bmp;
1127 wxMask *pss_overlay_mask;
1128
1129 wxRect ship_draw_rect;
1130 wxRect ship_draw_last_rect;
1131 wxRect ais_draw_rect;
1132 wxRect alert_draw_rect; // pjotrc 2010.02.22
1133
1134 wxBitmap *proute_bm; // a bitmap and dc used to calculate route bounding box
1135 wxMemoryDC m_dc_route; // seen in mouse->edit->route
1136
1137 emboss_data *m_pEM_Feet; // maps for depth unit emboss pattern
1138 emboss_data *m_pEM_Meters;
1139 emboss_data *m_pEM_Fathoms;
1140
1141 emboss_data *m_pEM_OverZoom;
1142 // emboss_data *m_pEM_CM93Offset; // Flav
1143
1159 double m_true_scale_ppm;
1160
1161 ownship_state_t m_ownship_state;
1162
1163 ColorScheme m_cs;
1164
1165 wxBitmap m_bmTideDay;
1166 wxBitmap m_bmTideDusk;
1167 wxBitmap m_bmTideNight;
1168 wxBitmap m_bmCurrentDay;
1169 wxBitmap m_bmCurrentDusk;
1170 wxBitmap m_bmCurrentNight;
1171 wxBitmap m_cTideBitmap;
1172 wxBitmap m_cCurrentBitmap;
1173
1174 RolloverWin *m_pRouteRolloverWin;
1175 RolloverWin *m_pTrackRolloverWin;
1176 RolloverWin *m_pAISRolloverWin;
1177
1178 TimedPopupWin *m_pBrightPopup;
1179
1180 wxImage m_os_image_red_day;
1181 wxImage m_os_image_red_dusk;
1182 wxImage m_os_image_red_night;
1183 wxImage m_os_image_grey_day;
1184 wxImage m_os_image_grey_dusk;
1185 wxImage m_os_image_grey_night;
1186 wxImage m_os_image_yellow_day;
1187 wxImage m_os_image_yellow_dusk;
1188 wxImage m_os_image_yellow_night;
1189
1190 wxImage *m_pos_image_red;
1191 wxImage *m_pos_image_grey;
1192 wxImage *m_pos_image_yellow;
1193
1194 wxImage *m_pos_image_user;
1195 wxImage *m_pos_image_user_grey;
1196 wxImage *m_pos_image_user_yellow;
1197
1198 wxImage *m_pos_image_user_day;
1199 wxImage *m_pos_image_user_dusk;
1200 wxImage *m_pos_image_user_night;
1201 wxImage *m_pos_image_user_grey_day;
1202 wxImage *m_pos_image_user_grey_dusk;
1203 wxImage *m_pos_image_user_grey_night;
1204 wxImage *m_pos_image_user_yellow_day;
1205 wxImage *m_pos_image_user_yellow_dusk;
1206 wxImage *m_pos_image_user_yellow_night;
1207
1208 wxImage m_ship_pix_image; // cached ship draw image for high overzoom
1209 int m_cur_ship_pix;
1210 bool m_cur_ship_pix_isgrey;
1211 ColorScheme m_ship_cs;
1212
1213 ViewPort m_cache_vp;
1214 wxBitmap *m_prot_bm;
1215 wxPoint m_roffset;
1216
1217 bool m_b_rot_hidef;
1218
1219 SelectItem *m_pRolloverRouteSeg;
1220 SelectItem *m_pRolloverTrackSeg;
1221
1222 double m_wheel_lat, m_wheel_lon;
1223 int m_wheel_x, m_wheel_y;
1224
1225 ViewPort m_bm_cache_vp;
1226 wxBitmap m_working_bm; // Used to build quilt in OnPaint()
1227 wxBitmap m_cached_chart_bm; // A cached copy of the fully drawn quilt
1228
1229 bool m_bbrightdir;
1230 int m_brightmod;
1231
1232 bool m_bzooming, m_bzooming_to_cursor;
1233 IDX_entry *m_pIDXCandidate;
1234
1235 // #ifdef ocpnUSE_GL
1236 glChartCanvas *m_glcc;
1237 // #endif
1238
1239 // Smooth movement member variables
1240 wxPoint m_pan_drag;
1241 int m_panx, m_pany, m_modkeys;
1242 double m_panspeed;
1243 bool m_bmouse_key_mod;
1244 double m_zoom_factor, m_rotation_speed;
1250 int m_mustmove;
1251
1252 wxDateTime m_last_movement_time;
1253
1254 int m_AISRollover_MMSI;
1255 bool m_bsectors_shown;
1256 bool m_bedge_pan;
1257 double m_displayed_scale_factor;
1258
1259 wxColour m_fog_color;
1260 bool m_disable_edge_pan;
1261 wxFont *m_pgridFont;
1262
1263 bool m_dragoffsetSet;
1264
1265 bool m_bautofind;
1266 bool m_bFirstAuto;
1267 double m_vLat, m_vLon;
1268 ChartStack *m_pCurrentStack;
1269 Piano *m_Piano;
1270 bool m_bpersistent_quilt;
1271
1272 wxMenu *m_piano_ctx_menu;
1273 int menu_selected_dbIndex, menu_selected_index;
1274
1275 ocpnCompass *m_Compass;
1276 bool m_bShowGPS;
1281 bool m_mouseWasInCompass;
1282
1283 wxRect m_mainlast_tb_rect;
1284 int m_restore_dbindex;
1285 int m_restore_group;
1286
1287 MUIBar *m_muiBar;
1288 wxSize m_muiBarHOSize;
1289
1290 bool m_bShowOutlines;
1291 bool m_bDisplayGrid;
1292 bool m_bShowDepthUnits;
1293 bool m_bShowAIS;
1294 bool m_bShowAISScaled;
1295
1296 // S52PLib state storage
1297 long m_s52StateHash;
1298 bool m_encShowText;
1299 bool m_encShowDepth;
1300 bool m_encShowLightDesc;
1301 bool m_encShowBuoyLabels;
1302 int m_encDisplayCategory;
1303 bool m_encShowLights;
1304 bool m_encShowAnchor;
1305 bool m_encShowDataQual;
1306
1307 wxTimer m_deferredFocusTimer;
1308 float m_focus_indicator_pix;
1309 bool m_bENCGroup;
1310 bool m_last_TBviz;
1311
1312 double m_OSoffsetx, m_OSoffsety;
1313 bool m_MouseDragging;
1314
1315 wxString m_alertString;
1316 wxRect m_scaleBarRect;
1317 bool m_bShowCompassWin;
1318 bool m_pianoFrozen;
1319
1320 double m_sector_glat, m_sector_glon;
1321 std::vector<s57Sector_t> m_sectorlegsVisible;
1322 bool m_bShowVisibleSectors;
1324 double m_displayScale;
1325 bool m_show_focus_bar;
1326
1327 double m_panx_target_final;
1328 double m_pany_target_final;
1329 double m_panx_target_now;
1330 double m_pany_target_now;
1331
1332 double m_start_lat, m_start_lon;
1333 double m_target_lat, m_target_lon;
1334 double m_run_lat, m_run_lon;
1335 bool m_timed_move_vp_active;
1336 int m_timedVP_step;
1337 int m_stvpc;
1338
1339 double meters_to_shift = 0;
1340 double dir_to_shift = 0;
1341
1342 // Chart drag inertia support
1343 wxTimer m_chart_drag_inertia_timer;
1344 void OnChartDragInertiaTimer(wxTimerEvent &event);
1345
1346 uint64_t m_last_drag_time;
1347 int m_chart_drag_total_x;
1348 int m_chart_drag_total_y;
1349 double m_chart_drag_total_time;
1350 double m_chart_drag_velocity_x;
1351 double m_chart_drag_velocity_y;
1352 wxLongLong m_chart_drag_inertia_time;
1353 wxLongLong m_chart_drag_inertia_start_time;
1354 bool m_chart_drag_inertia_active;
1355 double m_last_elapsed;
1356 std::vector<int> m_drag_vec_x;
1357 std::vector<int> m_drag_vec_y;
1358 std::vector<double> m_drag_vec_t;
1359 int m_inertia_last_drag_x;
1360 int m_inertia_last_drag_y;
1361
1362 // For Jump animation
1363 wxTimer m_easeTimer;
1364 wxLongLong m_animationStart;
1365 wxLongLong m_animationDuration; // e.g. 300 ms
1366 double m_startLat, m_startLon, m_startScale;
1367 double m_endLat, m_endLon, m_endScale;
1368 bool m_animationActive;
1369 void OnJumpEaseTimer(wxTimerEvent &event);
1370 bool StartSmoothJump(double lat, double lon, double scale_ppm);
1371 bool m_disable_adjust_on_zoom;
1372
1373 NotificationButton *m_notification_button;
1374 NotificationsList *m_NotificationsList;
1375 ObservableListener evt_notificationlist_change_listener;
1376
1377 wxStopWatch m_sw_left_down;
1378 wxStopWatch m_sw_left_up;
1379 long m_sw_down_time;
1380 long m_sw_up_time;
1381 wxTimer m_tap_timer;
1382 wxPoint m_lastTapPos;
1383 int m_tap_count;
1384 void OnTapTimer(wxTimerEvent &event);
1385 int m_DragTrigger;
1386 uint64_t m_DragTriggerStartTime;
1387
1388 DECLARE_EVENT_TABLE()
1389};
1390
1391// CUSTOMIZATION - FORMAT MINUTES
1392
1393wxString minutesToHoursDays(float timeInMinutes);
1394
1395// END OF CUSTOMIZATION - FORMAT MINUTES
1396
1401#ifndef wxCLOSE_BOX
1402#define wxCLOSE_BOX 0x1000
1403#endif
1404#ifndef wxFIXED_MINSIZE
1405#define wxFIXED_MINSIZE 0
1406#endif
1407
1408#endif // _CHCANV_H__
Minimal ChartCanvas interfaces.
Canvas context (right click) menu handler.
Chart info panel.
Charts database management
BSB chart management.
ChartCanvas * g_focusCanvas
Global instance.
Definition chcanv.cpp:1314
arrayofCanvasPtr g_canvasArray
Global instance.
Definition chcanv.cpp:173
ChartCanvas * g_overlayCanvas
Global instance.
Definition chcanv.cpp:1313
Minimal ChartCAnvas interface with very little dependencies.
Handles context menu events for the chart canvas.
Definition canvas_menu.h:45
A custom panel for displaying chart information.
Definition ch_info_win.h:36
Base class for BSB (Maptech/NOS) format nautical charts.
Definition chartimg.h:128
Base class for all chart types.
Definition chartbase.h:126
ChartCanvas - Main chart display and interaction component.
Definition chcanv.h:173
void CloseTideDialog()
Close any open tide dialog.
Definition chcanv.cpp:13835
bool GetCanvasPointPixVP(ViewPort &vp, double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates rounded to nearest integer using specified vie...
Definition chcanv.cpp:4581
float GetVPChartScale()
Return the ViewPort chart scale denominator (e.g., 50000 for a 1:50000 scale).
Definition chcanv.h:502
void OnPaint(wxPaintEvent &event)
Definition chcanv.cpp:11876
bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) rounded to nearest integer.
Definition chcanv.cpp:4577
void DoMovement(long dt)
Performs a step of smooth movement animation on the chart canvas.
Definition chcanv.cpp:3673
void ShowSingleTideDialog(int x, int y, void *pvIDX)
Display tide/current dialog with single-instance management.
Definition chcanv.cpp:13794
void GetDoubleCanvasPointPixVP(ViewPort &vp, double rlat, double rlon, wxPoint2DDouble *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) with double precision,...
Definition chcanv.cpp:4527
double m_cursor_lat
The latitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:805
double GetCanvasScaleFactor()
Return the number of logical pixels per meter for the screen.
Definition chcanv.h:511
double GetPixPerMM()
Get the number of logical pixels per millimeter on the screen.
Definition chcanv.h:542
double GetDisplaySizeMM()
Get the width of the screen in millimeters.
Definition chcanv.h:275
double GetDisplayScale()
Get the ratio of physical to logical pixel for the display.
Definition chcanv.h:884
void SetDisplaySizeMM(double size)
Set the width of the screen in millimeters.
Definition chcanv.cpp:2358
int PrepareContextSelections(double lat, double lon)
Definition chcanv.cpp:8033
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)
Definition chcanv.cpp:7842
bool PanCanvas(double dx, double dy)
Pans (moves) the canvas by the specified physical pixels in x and y directions.
Definition chcanv.cpp:5109
EventVar json_msg
Notified with message targeting all plugins.
Definition chcanv.h:896
void ZoomCanvasSimple(double factor)
Perform an immediate zoom operation without smooth transitions.
Definition chcanv.cpp:4658
bool SetVPScale(double sc, bool b_refresh=true)
Sets the viewport scale while maintaining the center point.
Definition chcanv.cpp:5389
float GetVPScale() override
Return ViewPort scale factor, in physical pixels per meter.
Definition chcanv.h:183
double m_cursor_lon
The longitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:789
void GetCanvasPixPoint(double x, double y, double &lat, double &lon)
Convert canvas pixel coordinates (physical pixels) to latitude/longitude.
Definition chcanv.cpp:4602
bool IsTideDialogOpen() const
Definition chcanv.cpp:13833
void ZoomCanvas(double factor, bool can_zoom_to_cursor=true, bool stoptimer=true)
Perform a smooth zoom operation on the chart canvas by the specified factor.
Definition chcanv.cpp:4664
void DrawTCWindow(int x, int y, void *pIDX)
Legacy tide dialog creation method.
Definition chcanv.cpp:13790
void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) with double precision.
Definition chcanv.cpp:4522
bool SetViewPoint(double lat, double lon)
Centers the view on a specific lat/lon position.
Definition chcanv.cpp:5408
bool MouseEventProcessCanvas(wxMouseEvent &event)
Processes mouse events for core chart panning and zooming operations.
Definition chcanv.cpp:10285
Generic event handling between MVC Model and Controller based on a shared EventVar variable.
Represents an index entry for tidal and current data.
Definition idx_entry.h:48
Modern User Interface Control Bar for OpenCPN.
Definition mui_bar.h:60
Main application frame.
Definition ocpn_frame.h:108
Keeps listening over its lifespan, removes itself on destruction.
Definition observable.h:155
Definition piano.h:59
Definition quilt.h:82
Represents a waypoint or mark within the navigation system.
Definition route_point.h:71
Represents a navigational route in the navigation system.
Definition route.h:99
Definition tc_win.h:46
Represents a track, which is a series of connected track points.
Definition track.h:117
Definition undo.h:36
ViewPort - Core geographic projection and coordinate transformation engine.
Definition viewport.h:56
double view_scale_ppm
Requested view scale in physical pixels per meter (ppm), before applying projections.
Definition viewport.h:204
double rotation
Rotation angle of the viewport in radians.
Definition viewport.h:214
double tilt
Tilt angle for perspective view in radians.
Definition viewport.h:216
double skew
Angular distortion (shear transform) applied to the viewport in radians.
Definition viewport.h:212
double chart_scale
Chart scale denominator (e.g., 50000 for a 1:50000 scale).
Definition viewport.h:219
Encapsulates persistent canvas configuration.
Stores emboss effect data for textures.
Definition emboss_data.h:34
OpenGL chart rendering canvas.
Represents a compass display in the OpenCPN navigation system.
Definition compass.h:39
Device context class that can use either wxDC or OpenGL for drawing.
Definition ocpndc.h:60
Texture emboss effects storage.
OpenGL chart rendering canvas.
Platform independent GL includes.
GSHHS Chart Object (Global Self-consistent, Hierarchical, High-resolution Shoreline) Derived from htt...
General purpose GUI support.
Tidal data container.
MUI (Modern User Interface) Control bar.
Notification Manager GUI.
General observable implementation with several specializations.
A common variable shared between producer and consumer which supports Listen() and Notify().
Platform specific wxCursor extension.
Optimized wxBitmap Object.
PlugIn Object Definition/API.
void SetENCDisplayCategory(PI_DisCat cat, int CanvasIndex)
Sets ENC (Electronic Navigation Chart) feature display category.
PI_DisCat GetENCDisplayCategory(int CanvasIndex)
Gets current ENC display category.
void JumpToPosition(double lat, double lon, double scale)
Centers chart display on specified position at given scale.
Chart Bar Window.
Chart quilt support.
Route abstraction.
Waypoint or mark abstraction.
S57 chart sector encapsulation.
A single, selected generic item.
Tide and currents window.
Framework for Undo features.