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 void SetbEnableBasemapTile(bool f) { m_bEnableBasemapTile = f; }
544 bool GetbEnableBasemapTile() { return m_bEnableBasemapTile; }
545
546 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
547 void SetCursorStatus(double cursor_lat, double cursor_lon);
548 void GetCursorLatLon(double *lat, double *lon);
551 bool PanCanvas(double dx, double dy);
552 void StopAutoPan(void);
553 bool IsOwnshipOnScreen();
554 void DisableQuiltAdjustOnZoom(bool disable) {
555 m_disable_adjust_on_zoom = disable;
556 }
557
576 void ZoomCanvas(double factor, bool can_zoom_to_cursor = true,
577 bool stoptimer = true);
578
591 void ZoomCanvasSimple(double factor);
592
593 void RotateCanvas(double dir);
594 void DoRotateCanvas(double rotation);
595 void DoTiltCanvas(double tilt);
596
597 void ShowAISTargetList(void);
598
599 void ShowGoToPosition(void);
600 void HideGlobalToolbar();
601 void ShowGlobalToolbar();
602
603 bool GetShowDepthUnits() { return m_bShowDepthUnits; }
604 void SetShowDepthUnits(bool show) { m_bShowDepthUnits = show; }
605 bool GetShowGrid() { return m_bDisplayGrid; }
606 void SetShowGrid(bool show) { m_bDisplayGrid = show; }
607 bool GetShowOutlines() { return m_bShowOutlines; }
608 void SetShowOutlines(bool show) { m_bShowOutlines = show; }
609 bool GetShowChartbar() { return true; }
610 wxRect GetMUIBarRect();
611 void SetMUIBarPosition();
612 void DestroyMuiBar();
613 void CreateMUIBar();
614
615 void ToggleChartOutlines(void);
616 void ToggleCanvasQuiltMode(void);
617
618 wxString GetScaleText() { return m_scaleText; }
619 bool GetShowAIS() { return m_bShowAIS; }
620 void SetShowAIS(bool show);
621 bool GetAttenAIS() { return m_bShowAISScaled; }
622 void SetAttenAIS(bool show);
623 void SetShowFocusBar(bool enable) { m_show_focus_bar = enable; }
624 bool GetShowFocusBar() { return m_show_focus_bar; }
625 MUIBar *GetMUIBar() { return m_muiBar; }
626 void SetAlertString(wxString str) { m_alertString = str; }
627 wxString GetAlertString() { return m_alertString; }
628 bool GetShowENCText() { return m_encShowText; }
629 void SetShowENCText(bool show);
630
631 bool GetShowENCDepth() { return m_encShowDepth; }
632 void SetShowENCDepth(bool show);
633
634 bool GetShowENCLightDesc() { return m_encShowLightDesc; }
635 void SetShowENCLightDesc(bool show);
636
637 bool GetShowENCBuoyLabels() { return m_encShowBuoyLabels; }
638 void SetShowENCBuoyLabels(bool show);
639
640 bool GetShowENCLights() { return m_encShowLights; }
641 void SetShowENCLights(bool show);
642
643 void SetENCDisplayCategory(int category);
644
645 bool GetShowENCAnchor() { return m_encShowAnchor; }
646 void SetShowENCAnchor(bool show);
647
648 bool GetShowENCDataQual() { return m_encShowDataQual; }
649 void SetShowENCDataQual(bool show);
650
651 void JaggyCircle(ocpnDC &dc, wxPen pen, int x, int y, int radius);
652 int m_canvasIndex;
653 void ShowTides(bool bShow);
654 void ShowCurrents(bool bShow);
655 void SetUpMode(int mode);
656 void ToggleLookahead();
657 void SetShowGPS(bool show);
658 void UpdateFollowButtonState(void);
659 void InvalidateGL();
660 bool IsTileOverlayIndexInYesShow(int index);
661 bool IsTileOverlayIndexInNoShow(int index);
662 void AddTileOverlayIndexToNoShow(int index);
663 int m_groupIndex;
664 Route *m_pMouseRoute;
665 bool m_bMeasure_Active;
666 ViewPort &GetVP();
667 ChartBase *m_singleChart;
668 Quilt *m_pQuilt;
669 wxString FindValidUploadPort();
670 wxString m_active_upload_port;
671
672 // protected:
673
674 // private:
675 ChartBase *GetLargestScaleQuiltChart();
676 ChartBase *GetFirstQuiltChart();
677 ChartBase *GetNextQuiltChart();
678 int GetQuiltChartCount();
679 void InvalidateAllQuiltPatchs(void);
680 void SetQuiltRefChart(int dbIndex);
681 std::vector<int> GetQuiltCandidatedbIndexArray(bool flag1 = true,
682 bool flag2 = true);
683 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
684 std::vector<int> &GetQuiltFullScreendbIndexArray();
685 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
686 int GetQuiltRefChartdbIndex(void);
687 void InvalidateQuilt(void);
688 double GetQuiltMaxErrorFactor();
689 bool IsChartQuiltableRef(int db_index);
690 bool IsChartLargeEnoughToRender(ChartBase *chart, ViewPort &vp);
691 int GetCanvasChartNativeScale();
692 int FindClosestCanvasChartdbIndex(int scale);
693 void UpdateCanvasOnGroupChange(void);
694
695 void ShowObjectQueryWindow(int x, int y, float zlat, float zlon);
696 void ShowMarkPropertiesDialog(RoutePoint *markPoint);
697 void ShowRoutePropertiesDialog(wxString title, Route *selected);
698 void ShowTrackPropertiesDialog(Track *selected);
701 void DrawTCWindow(int x, int y, void *pIDX);
702
715 void ShowSingleTideDialog(int x, int y, void *pvIDX);
716
718 bool IsTideDialogOpen() const;
719
721 void CloseTideDialog();
722
723 void UpdateGPSCompassStatusBox(bool b_force_new);
724 ocpnCompass *GetCompass() { return m_Compass; }
725
726 wxColour GetFogColor() { return m_fog_color; }
727
728 void ShowChartInfoWindow(int x, int dbIndex);
729 void HideChartInfoWindow(void);
730 void ShowCompositeInfoWindow(int x, int n_charts, int scale,
731 const std::vector<int> &index_vector);
732
733 void StartMeasureRoute();
734 void CancelMeasureRoute();
735
736 bool DoCanvasUpdate(void);
737 void SelectQuiltRefdbChart(int db_index, bool b_autoscale = true);
738 void SelectQuiltRefChart(int selected_index);
739 double GetBestVPScale(ChartBase *pchart);
740 void selectCanvasChartDisplay(int type, int family);
741 void RemoveChartFromQuilt(int dbIndex);
742
743 void HandlePianoClick(int selected_index,
744 const std::vector<int> &selected_dbIndex_array);
745 void HandlePianoRClick(int x, int y, int selected_index,
746 const std::vector<int> &selected_dbIndex_array);
747 void HandlePianoRollover(int selected_index,
748 const std::vector<int> &selected_dbIndex_array,
749 int n_charts, int scale);
750 void ClearPianoRollover();
751 void UpdateCanvasControlBar(void);
752 void FormatPianoKeys(void);
753 void PianoPopupMenu(int x, int y, int selected_index,
754 const std::vector<int> &selected_dbIndex_array);
755 void OnPianoMenuDisableChart(wxCommandEvent &event);
756 void OnPianoMenuEnableChart(wxCommandEvent &event);
757
758 bool IsPianoContextMenuActive() { return m_piano_ctx_menu != 0; }
759 bool DoCanvasCOGSet(void);
760 void ApplyGlobalSettings();
761 void SetShowGPSCompassWindow(bool bshow);
762 bool GetShowGPSCompassWindow() { return m_bShowCompassWin; }
763 void FreezePiano() { m_pianoFrozen = true; }
764 void ThawPiano() { m_pianoFrozen = false; }
765 void StartChartDragInertia();
766 void SetupGridFont();
767
768 // Todo build more accessors
769 bool m_bFollow;
770 wxCursor *pCursorPencil;
771 wxCursor *pCursorArrow;
772 wxCursor *pCursorCross;
773 wxCursor *pPlugIn_Cursor;
774 TCWin *pCwin;
775 bool m_brepaint_piano;
808 wxPoint r_rband;
809 double m_prev_rlat;
810 double m_prev_rlon;
811 RoutePoint *m_prev_pMousePoint;
812 bool m_bShowNavobjects;
813 int m_routeState;
814 int m_upMode;
815 bool m_bLookAhead;
816
817#ifdef HAVE_WX_GESTURE_EVENTS
818 double m_oldVPSScale;
819 bool m_popupWanted;
820 bool m_leftdown;
821 wxPoint m_zoomStartPoint;
822#endif /* HAVE_WX_GESTURE_EVENTS */
823
824 void DrawBlinkObjects(void);
825
826 void StartRoute(void);
827 wxString FinishRoute(void);
828
829#ifdef ocpnUSE_GL
830 glChartCanvas *GetglCanvas() { return m_glcc; }
831#endif
832
833 bool CheckEdgePan(int x, int y, bool bdragging, int margin, int delta);
834
835 bool m_FinishRouteOnKillFocus;
836 bool m_bMeasure_DistCircle;
837 bool m_bAppendingRoute;
838 int m_nMeasureState;
839 Route *m_pMeasureRoute;
840 wxWindow *parent_frame;
841 CanvasMenuHandler *m_canvasMenu;
842 int GetMinAvailableGshhgQuality() {
843 return pWorldBackgroundChart->GetMinAvailableQuality();
844 }
845 int GetMaxAvailableGshhgQuality() {
846 return pWorldBackgroundChart->GetMaxAvailableQuality();
847 }
848 Route *GetSelectedRoute() const { return m_pSelectedRoute; }
849 Track *GetSelectedTrack() const { return m_pSelectedTrack; }
850 RoutePoint *GetSelectedRoutePoint() const { return m_pFoundRoutePoint; }
851
852 void SetAISCanvasDisplayStyle(int StyleIndx);
853 void TouchAISToolActive(void);
854 void UpdateAISTBTool(void);
855
856 void SelectChartFromStack(int index, bool bDir = false,
857 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
858 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
859 void SelectdbChart(int dbindex);
860
861 void DoCanvasStackDelta(int direction);
862
863 void ProcessNewGUIScale();
864
865 bool m_b_paint_enable;
866
867 wxRect GetScaleBarRect() { return m_scaleBarRect; }
868 void RenderAlertMessage(wxDC &dc, const ViewPort &vp);
869
870 std::vector<int> m_tile_noshow_index_array;
871 std::vector<int> m_tile_yesshow_index_array;
872 std::vector<int> m_quilt_noshow_index_array;
873
874 std::vector<int> GetQuiltNoshowIindexArray() {
875 return m_quilt_noshow_index_array;
876 }
886 double GetDisplayScale() { return m_displayScale; }
887 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
888 NotificationsList *GetNotificationsList() { return m_NotificationsList; }
889
890 int PrepareContextSelections(double lat, double lon);
891
892 RoutePoint *GetFoundRoutepoint() { return m_pFoundRoutePoint; }
893
899
900 bool m_inPinch;
901
902private:
916 void DoZoomCanvas(double factor, bool can_zoom_to_cursor = true);
917
918 int AdjustQuiltRefChart();
919 bool UpdateS52State();
920 void CallPopupMenu(int x, int y);
921 bool IsTempMenuBarEnabled();
922 bool InvokeCanvasMenu(int x, int y, int seltype);
923 void OnMenuTimer(wxTimerEvent &event);
924 wxTimer m_menuTimer;
925 wxPoint m_menuPos;
926 bool m_inLongPress;
927
928 wxBitmap *pscratch_bm;
929 ViewPort VPoint;
930 void PositionConsole(void);
931 wxWindow *m_nmea_log;
932
933 wxColour PredColor();
934 wxColour ShipColor();
935
936 void ComputeShipScaleFactor(float icon_hdt, int ownShipWidth,
937 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
938 wxPoint &GpsOffsetPixels,
939 wxPoint2DDouble lGPSPoint, float &scale_factor_x,
940 float &scale_factor_y);
941
942 void ShipDrawLargeScale(ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
943 void ShipIndicatorsDraw(ocpnDC &dc, int img_height, wxPoint GPSOffsetPixels,
944 wxPoint2DDouble lGPSPoint);
945
946 ChInfoWin *m_pCIWin;
947
948 bool m_bShowCurrent;
949 bool m_bShowTide;
950 int cursor_region;
951 bool m_bTCupdate;
952 wxString m_scaleText;
953 double m_scaleValue;
954 bool m_bShowScaleInStatusBar;
955 wxRect bbRect;
956 bool m_bEnableBasemapTile;
957
958 wxPoint LastShipPoint;
959 wxPoint LastPredPoint;
960 bool m_bDrawingRoute;
961 bool m_bRouteEditing;
962 bool m_bMarkEditing;
963 bool m_bRoutePoinDragging;
964 bool m_bIsInRadius;
965 bool m_bMayToggleMenuBar;
966
967 RoutePoint *m_pRoutePointEditTarget;
968 RoutePoint *m_lastRoutePointEditTarget;
969 SelectItem *m_pFoundPoint;
970 bool m_bChartDragging;
971 wxPoint
972 m_touchdownPos; // LeftDown position for touch drag displacement check
973 Route *m_pSelectedRoute;
974 Track *m_pSelectedTrack;
975 wxArrayPtrVoid *m_pEditRouteArray;
976 RoutePoint *m_pFoundRoutePoint;
977
978 int m_FoundAIS_MMSI;
979
980 wxCursor *pCursorLeft;
981 wxCursor *pCursorRight;
982 wxCursor *pCursorUp;
983 wxCursor *pCursorDown;
984
985 wxCursor *pCursorUpLeft;
986 wxCursor *pCursorUpRight;
987 wxCursor *pCursorDownLeft;
988 wxCursor *pCursorDownRight;
989
990 int popx, popy;
991
992 wxBitmap *pThumbDIBShow;
993 wxBitmap *pThumbShowing;
994
995 bool bShowingCurrent;
996 bool bShowingTide;
997
1004 double m_canvas_scale_factor;
1006 double m_pix_per_mm;
1007 double m_display_size_mm;
1008
1009 double m_absolute_min_scale_ppm;
1010
1011 bool singleClickEventIsValid;
1012 wxMouseEvent singleClickEvent;
1013
1014 std::vector<s57Sector_t> extendedSectorLegs;
1015 wxFont m_overzoomFont;
1016 int m_overzoomTextWidth;
1017 int m_overzoomTextHeight;
1018
1019 // Methods
1020 void OnActivate(wxActivateEvent &event);
1021 void OnSize(wxSizeEvent &event);
1022 void MouseTimedEvent(wxTimerEvent &event);
1023 void MouseEvent(wxMouseEvent &event);
1024 void ShipDraw(ocpnDC &dc);
1025 void DrawArrow(ocpnDC &dc, int x, int y, double rot_angle, double scale);
1026 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
1027 void FindRoutePointsAtCursor(float selectRadius, bool setBeingEdited);
1028
1029 void RotateTimerEvent(wxTimerEvent &event);
1030 void PanTimerEvent(wxTimerEvent &event);
1031 void MovementTimerEvent(wxTimerEvent &);
1032 void MovementStopTimerEvent(wxTimerEvent &);
1033 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1034
1035 void MovementVPTimerEvent(wxTimerEvent &event);
1036
1037 void DrawAllTracksInBBox(ocpnDC &dc, LLBBox &BltBBox);
1038 void DrawActiveTrackInBBox(ocpnDC &dc, LLBBox &BltBBox);
1039 void DrawAllRoutesInBBox(ocpnDC &dc, LLBBox &BltBBox);
1040 void DrawActiveRouteInBBox(ocpnDC &dc, LLBBox &BltBBox);
1041 void DrawAllWaypointsInBBox(ocpnDC &dc, LLBBox &BltBBox);
1042 void DrawAnchorWatchPoints(ocpnDC &dc);
1043 double GetAnchorWatchRadiusPixels(RoutePoint *pAnchorWatchPoint);
1044
1045 void DrawAllTidesInBBox(ocpnDC &dc, LLBBox &BBox);
1046 void DrawAllCurrentsInBBox(ocpnDC &dc, LLBBox &BBox);
1047 void RebuildTideSelectList(LLBBox &BBox);
1048 void RebuildCurrentSelectList(LLBBox &BBox);
1049 IDX_entry *FindBestCurrentObject(double lat, double lon);
1050
1051 void RenderAllChartOutlines(ocpnDC &dc, ViewPort &vp);
1052 void RenderChartOutline(ocpnDC &dc, int dbIndex, ViewPort &vp);
1053 void RenderRouteLegs(ocpnDC &dc);
1054 void RenderVisibleSectorLights(ocpnDC &dc);
1055
1056 void AlertDraw(ocpnDC &dc); // pjotrc 2010.02.22
1057
1058 void GridDraw(ocpnDC &dc); // Display lat/lon Grid in chart display
1059 void ScaleBarDraw(ocpnDC &dc);
1060
1061 void DrawOverlayObjects(ocpnDC &dc, const wxRegion &ru);
1062 void RenderShipToActive(ocpnDC &dc, bool Use_Opengl);
1063
1064 emboss_data *EmbossDepthScale();
1065 emboss_data *CreateEmbossMapData(wxFont &font, int width, int height,
1066 const wxString &str, ColorScheme cs);
1067 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1068 wxBitmap CreateDimBitmap(wxBitmap &Bitmap, double factor);
1069
1070 void CreateOZEmbossMapData(ColorScheme cs);
1071 emboss_data *EmbossOverzoomIndicator(ocpnDC &dc);
1072 void SetOverzoomFont();
1073
1074 // void CreateCM93OffsetEmbossMapData(ColorScheme cs);
1075 // void EmbossCM93Offset ( wxMemoryDC *pdc);
1076
1077 void DrawEmboss(ocpnDC &dc, emboss_data *pemboss);
1078
1079 void ShowBrightnessLevelTimedPopup(int brightness, int min, int max);
1080 void HandleNotificationMouseClick();
1081
1082 // Data
1084 int m_canvas_width;
1086 int m_canvas_height;
1087
1088 int xr_margin; // chart scroll margins, control cursor, etc.
1089 int xl_margin;
1090 int yt_margin;
1091 int yb_margin;
1092
1093 wxPoint last_drag;
1094 wxPoint m_last_touch_down_pos;
1095
1096 wxMemoryDC *pmemdc;
1097
1098 int warp_x, warp_y;
1099 bool warp_flag;
1100
1101 wxTimer *
1102 pPanTimer; // This timer used for auto panning on route creation and edit
1103 wxTimer *
1104 pMovementTimer; // This timer used for smooth movement in non-opengl mode
1105 wxTimer *pMovementStopTimer; // This timer used to stop movement if a keyup
1106 // event is lost
1107 wxTimer *pCurTrackTimer; // This timer used to update the status window on
1108 // mouse idle
1109 wxTimer *pRotDefTimer; // This timer used to control rotaion rendering on
1110 // mouse moves
1111 wxTimer *m_DoubleClickTimer;
1112 wxTimer m_routeFinishTimer;
1113
1114 wxTimer m_RolloverPopupTimer;
1115
1116 wxTimer m_VPMovementTimer;
1117
1118 int m_wheelzoom_stop_oneshot;
1119 int m_last_wheel_dir;
1120 wxStopWatch m_wheelstopwatch;
1121 double m_zoom_target;
1122
1123 int m_curtrack_timer_msec;
1124 int m_rollover_popup_timer_msec;
1125
1126 GSHHSChart *pWorldBackgroundChart;
1127
1128 ChartBaseBSB *pCBSB;
1129 wxBitmap *pss_overlay_bmp;
1130 wxMask *pss_overlay_mask;
1131
1132 wxRect ship_draw_rect;
1133 wxRect ship_draw_last_rect;
1134 wxRect ais_draw_rect;
1135 wxRect alert_draw_rect; // pjotrc 2010.02.22
1136
1137 wxBitmap *proute_bm; // a bitmap and dc used to calculate route bounding box
1138 wxMemoryDC m_dc_route; // seen in mouse->edit->route
1139
1140 emboss_data *m_pEM_Feet; // maps for depth unit emboss pattern
1141 emboss_data *m_pEM_Meters;
1142 emboss_data *m_pEM_Fathoms;
1143
1144 emboss_data *m_pEM_OverZoom;
1145 // emboss_data *m_pEM_CM93Offset; // Flav
1146
1162 double m_true_scale_ppm;
1163
1164 ownship_state_t m_ownship_state;
1165
1166 ColorScheme m_cs;
1167
1168 wxBitmap m_bmTideDay;
1169 wxBitmap m_bmTideDusk;
1170 wxBitmap m_bmTideNight;
1171 wxBitmap m_bmCurrentDay;
1172 wxBitmap m_bmCurrentDusk;
1173 wxBitmap m_bmCurrentNight;
1174 wxBitmap m_cTideBitmap;
1175 wxBitmap m_cCurrentBitmap;
1176
1177 RolloverWin *m_pRouteRolloverWin;
1178 RolloverWin *m_pTrackRolloverWin;
1179 RolloverWin *m_pAISRolloverWin;
1180
1181 TimedPopupWin *m_pBrightPopup;
1182
1183 wxImage m_os_image_red_day;
1184 wxImage m_os_image_red_dusk;
1185 wxImage m_os_image_red_night;
1186 wxImage m_os_image_grey_day;
1187 wxImage m_os_image_grey_dusk;
1188 wxImage m_os_image_grey_night;
1189 wxImage m_os_image_yellow_day;
1190 wxImage m_os_image_yellow_dusk;
1191 wxImage m_os_image_yellow_night;
1192
1193 wxImage *m_pos_image_red;
1194 wxImage *m_pos_image_grey;
1195 wxImage *m_pos_image_yellow;
1196
1197 wxImage *m_pos_image_user;
1198 wxImage *m_pos_image_user_grey;
1199 wxImage *m_pos_image_user_yellow;
1200
1201 wxImage *m_pos_image_user_day;
1202 wxImage *m_pos_image_user_dusk;
1203 wxImage *m_pos_image_user_night;
1204 wxImage *m_pos_image_user_grey_day;
1205 wxImage *m_pos_image_user_grey_dusk;
1206 wxImage *m_pos_image_user_grey_night;
1207 wxImage *m_pos_image_user_yellow_day;
1208 wxImage *m_pos_image_user_yellow_dusk;
1209 wxImage *m_pos_image_user_yellow_night;
1210
1211 wxImage m_ship_pix_image; // cached ship draw image for high overzoom
1212 int m_cur_ship_pix;
1213 bool m_cur_ship_pix_isgrey;
1214 ColorScheme m_ship_cs;
1215
1216 ViewPort m_cache_vp;
1217 wxBitmap *m_prot_bm;
1218 wxPoint m_roffset;
1219
1220 bool m_b_rot_hidef;
1221
1222 SelectItem *m_pRolloverRouteSeg;
1223 SelectItem *m_pRolloverTrackSeg;
1224
1225 double m_wheel_lat, m_wheel_lon;
1226 int m_wheel_x, m_wheel_y;
1227
1228 ViewPort m_bm_cache_vp;
1229 wxBitmap m_working_bm; // Used to build quilt in OnPaint()
1230 wxBitmap m_cached_chart_bm; // A cached copy of the fully drawn quilt
1231
1232 bool m_bbrightdir;
1233 int m_brightmod;
1234
1235 bool m_bzooming, m_bzooming_to_cursor;
1236 IDX_entry *m_pIDXCandidate;
1237
1238 // #ifdef ocpnUSE_GL
1239 glChartCanvas *m_glcc;
1240 // #endif
1241
1242 // Smooth movement member variables
1243 wxPoint m_pan_drag;
1244 int m_panx, m_pany, m_modkeys;
1245 double m_panspeed;
1246 bool m_bmouse_key_mod;
1247 double m_zoom_factor, m_rotation_speed;
1253 int m_mustmove;
1254
1255 wxDateTime m_last_movement_time;
1256
1257 int m_AISRollover_MMSI;
1258 bool m_bsectors_shown;
1259 bool m_bedge_pan;
1260 double m_displayed_scale_factor;
1261
1262 wxColour m_fog_color;
1263 bool m_disable_edge_pan;
1264 wxFont *m_pgridFont;
1265
1266 bool m_dragoffsetSet;
1267
1268 bool m_bautofind;
1269 bool m_bFirstAuto;
1270 double m_vLat, m_vLon;
1271 ChartStack *m_pCurrentStack;
1272 Piano *m_Piano;
1273 bool m_bpersistent_quilt;
1274
1275 wxMenu *m_piano_ctx_menu;
1276 int menu_selected_dbIndex, menu_selected_index;
1277
1278 ocpnCompass *m_Compass;
1279 bool m_bShowGPS;
1284 bool m_mouseWasInCompass;
1285
1286 wxRect m_mainlast_tb_rect;
1287 int m_restore_dbindex;
1288 int m_restore_group;
1289
1290 MUIBar *m_muiBar;
1291 wxSize m_muiBarHOSize;
1292
1293 bool m_bShowOutlines;
1294 bool m_bDisplayGrid;
1295 bool m_bShowDepthUnits;
1296 bool m_bShowAIS;
1297 bool m_bShowAISScaled;
1298
1299 // S52PLib state storage
1300 long m_s52StateHash;
1301 bool m_encShowText;
1302 bool m_encShowDepth;
1303 bool m_encShowLightDesc;
1304 bool m_encShowBuoyLabels;
1305 int m_encDisplayCategory;
1306 bool m_encShowLights;
1307 bool m_encShowAnchor;
1308 bool m_encShowDataQual;
1309
1310 wxTimer m_deferredFocusTimer;
1311 float m_focus_indicator_pix;
1312 bool m_bENCGroup;
1313 bool m_last_TBviz;
1314
1315 double m_OSoffsetx, m_OSoffsety;
1316 bool m_MouseDragging;
1317
1318 wxString m_alertString;
1319 wxRect m_scaleBarRect;
1320 bool m_bShowCompassWin;
1321 bool m_pianoFrozen;
1322
1323 double m_sector_glat, m_sector_glon;
1324 std::vector<s57Sector_t> m_sectorlegsVisible;
1325 bool m_bShowVisibleSectors;
1327 double m_displayScale;
1328 bool m_show_focus_bar;
1329
1330 double m_panx_target_final;
1331 double m_pany_target_final;
1332 double m_panx_target_now;
1333 double m_pany_target_now;
1334
1335 double m_start_lat, m_start_lon;
1336 double m_target_lat, m_target_lon;
1337 double m_run_lat, m_run_lon;
1338 bool m_timed_move_vp_active;
1339 int m_timedVP_step;
1340 int m_stvpc;
1341
1342 double meters_to_shift = 0;
1343 double dir_to_shift = 0;
1344
1345 // Chart drag inertia support
1346 wxTimer m_chart_drag_inertia_timer;
1347 void OnChartDragInertiaTimer(wxTimerEvent &event);
1348
1349 uint64_t m_last_drag_time;
1350 int m_chart_drag_total_x;
1351 int m_chart_drag_total_y;
1352 double m_chart_drag_total_time;
1353 double m_chart_drag_velocity_x;
1354 double m_chart_drag_velocity_y;
1355 wxLongLong m_chart_drag_inertia_time;
1356 wxLongLong m_chart_drag_inertia_start_time;
1357 bool m_chart_drag_inertia_active;
1358 double m_last_elapsed;
1359 std::vector<int> m_drag_vec_x;
1360 std::vector<int> m_drag_vec_y;
1361 std::vector<double> m_drag_vec_t;
1362 int m_inertia_last_drag_x;
1363 int m_inertia_last_drag_y;
1364
1365 // For Jump animation
1366 wxTimer m_easeTimer;
1367 wxLongLong m_animationStart;
1368 wxLongLong m_animationDuration; // e.g. 300 ms
1369 double m_startLat, m_startLon, m_startScale;
1370 double m_endLat, m_endLon, m_endScale;
1371 bool m_animationActive;
1372 void OnJumpEaseTimer(wxTimerEvent &event);
1373 bool StartSmoothJump(double lat, double lon, double scale_ppm);
1374 bool m_disable_adjust_on_zoom;
1375
1376 NotificationButton *m_notification_button;
1377 NotificationsList *m_NotificationsList;
1378 ObservableListener evt_notificationlist_change_listener;
1379
1380 wxStopWatch m_sw_left_down;
1381 wxStopWatch m_sw_left_up;
1382 long m_sw_down_time;
1383 long m_sw_up_time;
1384 wxTimer m_tap_timer;
1385 wxPoint m_lastTapPos;
1386 int m_tap_count;
1387 void OnTapTimer(wxTimerEvent &event);
1388 int m_DragTrigger;
1389 uint64_t m_DragTriggerStartTime;
1390
1391 DECLARE_EVENT_TABLE()
1392};
1393
1394// CUSTOMIZATION - FORMAT MINUTES
1395
1396wxString minutesToHoursDays(float timeInMinutes);
1397
1398// END OF CUSTOMIZATION - FORMAT MINUTES
1399
1404#ifndef wxCLOSE_BOX
1405#define wxCLOSE_BOX 0x1000
1406#endif
1407#ifndef wxFIXED_MINSIZE
1408#define wxFIXED_MINSIZE 0
1409#endif
1410
1411#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:1316
arrayofCanvasPtr g_canvasArray
Global instance.
Definition chcanv.cpp:173
ChartCanvas * g_overlayCanvas
Global instance.
Definition chcanv.cpp:1315
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:13853
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:4583
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:11878
bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) rounded to nearest integer.
Definition chcanv.cpp:4579
void DoMovement(long dt)
Performs a step of smooth movement animation on the chart canvas.
Definition chcanv.cpp:3675
void ShowSingleTideDialog(int x, int y, void *pvIDX)
Display tide/current dialog with single-instance management.
Definition chcanv.cpp:13812
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:4529
double m_cursor_lat
The latitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:807
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:886
void SetDisplaySizeMM(double size)
Set the width of the screen in millimeters.
Definition chcanv.cpp:2360
int PrepareContextSelections(double lat, double lon)
Definition chcanv.cpp:8035
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)
Definition chcanv.cpp:7844
bool PanCanvas(double dx, double dy)
Pans (moves) the canvas by the specified physical pixels in x and y directions.
Definition chcanv.cpp:5111
EventVar json_msg
Notified with message targeting all plugins.
Definition chcanv.h:898
void ZoomCanvasSimple(double factor)
Perform an immediate zoom operation without smooth transitions.
Definition chcanv.cpp:4660
bool SetVPScale(double sc, bool b_refresh=true)
Sets the viewport scale while maintaining the center point.
Definition chcanv.cpp:5391
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:791
void GetCanvasPixPoint(double x, double y, double &lat, double &lon)
Convert canvas pixel coordinates (physical pixels) to latitude/longitude.
Definition chcanv.cpp:4604
bool IsTideDialogOpen() const
Definition chcanv.cpp:13851
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:4666
void DrawTCWindow(int x, int y, void *pIDX)
Legacy tide dialog creation method.
Definition chcanv.cpp:13808
void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) with double precision.
Definition chcanv.cpp:4524
bool SetViewPoint(double lat, double lon)
Centers the view on a specific lat/lon position.
Definition chcanv.cpp:5410
bool MouseEventProcessCanvas(wxMouseEvent &event)
Processes mouse events for core chart panning and zooming operations.
Definition chcanv.cpp:10287
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.