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 Route *m_pSelectedRoute;
969 Track *m_pSelectedTrack;
970 wxArrayPtrVoid *m_pEditRouteArray;
971 RoutePoint *m_pFoundRoutePoint;
972
973 int m_FoundAIS_MMSI;
974
975 wxCursor *pCursorLeft;
976 wxCursor *pCursorRight;
977 wxCursor *pCursorUp;
978 wxCursor *pCursorDown;
979
980 wxCursor *pCursorUpLeft;
981 wxCursor *pCursorUpRight;
982 wxCursor *pCursorDownLeft;
983 wxCursor *pCursorDownRight;
984
985 int popx, popy;
986
987 wxBitmap *pThumbDIBShow;
988 wxBitmap *pThumbShowing;
989
990 bool bShowingCurrent;
991 bool bShowingTide;
992
999 double m_canvas_scale_factor;
1001 double m_pix_per_mm;
1002 double m_display_size_mm;
1003
1004 double m_absolute_min_scale_ppm;
1005
1006 bool singleClickEventIsValid;
1007 wxMouseEvent singleClickEvent;
1008
1009 std::vector<s57Sector_t> extendedSectorLegs;
1010 wxFont m_overzoomFont;
1011 int m_overzoomTextWidth;
1012 int m_overzoomTextHeight;
1013
1014 // Methods
1015 void OnActivate(wxActivateEvent &event);
1016 void OnSize(wxSizeEvent &event);
1017 void MouseTimedEvent(wxTimerEvent &event);
1018 void MouseEvent(wxMouseEvent &event);
1019 void ShipDraw(ocpnDC &dc);
1020 void DrawArrow(ocpnDC &dc, int x, int y, double rot_angle, double scale);
1021 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
1022 void FindRoutePointsAtCursor(float selectRadius, bool setBeingEdited);
1023
1024 void RotateTimerEvent(wxTimerEvent &event);
1025 void PanTimerEvent(wxTimerEvent &event);
1026 void MovementTimerEvent(wxTimerEvent &);
1027 void MovementStopTimerEvent(wxTimerEvent &);
1028 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1029
1030 void MovementVPTimerEvent(wxTimerEvent &event);
1031
1032 void DrawAllTracksInBBox(ocpnDC &dc, LLBBox &BltBBox);
1033 void DrawActiveTrackInBBox(ocpnDC &dc, LLBBox &BltBBox);
1034 void DrawAllRoutesInBBox(ocpnDC &dc, LLBBox &BltBBox);
1035 void DrawActiveRouteInBBox(ocpnDC &dc, LLBBox &BltBBox);
1036 void DrawAllWaypointsInBBox(ocpnDC &dc, LLBBox &BltBBox);
1037 void DrawAnchorWatchPoints(ocpnDC &dc);
1038 double GetAnchorWatchRadiusPixels(RoutePoint *pAnchorWatchPoint);
1039
1040 void DrawAllTidesInBBox(ocpnDC &dc, LLBBox &BBox);
1041 void DrawAllCurrentsInBBox(ocpnDC &dc, LLBBox &BBox);
1042 void RebuildTideSelectList(LLBBox &BBox);
1043 void RebuildCurrentSelectList(LLBBox &BBox);
1044 IDX_entry *FindBestCurrentObject(double lat, double lon);
1045
1046 void RenderAllChartOutlines(ocpnDC &dc, ViewPort &vp);
1047 void RenderChartOutline(ocpnDC &dc, int dbIndex, ViewPort &vp);
1048 void RenderRouteLegs(ocpnDC &dc);
1049 void RenderVisibleSectorLights(ocpnDC &dc);
1050
1051 void AlertDraw(ocpnDC &dc); // pjotrc 2010.02.22
1052
1053 void GridDraw(ocpnDC &dc); // Display lat/lon Grid in chart display
1054 void ScaleBarDraw(ocpnDC &dc);
1055
1056 void DrawOverlayObjects(ocpnDC &dc, const wxRegion &ru);
1057 void RenderShipToActive(ocpnDC &dc, bool Use_Opengl);
1058
1059 emboss_data *EmbossDepthScale();
1060 emboss_data *CreateEmbossMapData(wxFont &font, int width, int height,
1061 const wxString &str, ColorScheme cs);
1062 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1063 wxBitmap CreateDimBitmap(wxBitmap &Bitmap, double factor);
1064
1065 void CreateOZEmbossMapData(ColorScheme cs);
1066 emboss_data *EmbossOverzoomIndicator(ocpnDC &dc);
1067 void SetOverzoomFont();
1068
1069 // void CreateCM93OffsetEmbossMapData(ColorScheme cs);
1070 // void EmbossCM93Offset ( wxMemoryDC *pdc);
1071
1072 void DrawEmboss(ocpnDC &dc, emboss_data *pemboss);
1073
1074 void ShowBrightnessLevelTimedPopup(int brightness, int min, int max);
1075 void HandleNotificationMouseClick();
1076
1077 // Data
1079 int m_canvas_width;
1081 int m_canvas_height;
1082
1083 int xr_margin; // chart scroll margins, control cursor, etc.
1084 int xl_margin;
1085 int yt_margin;
1086 int yb_margin;
1087
1088 wxPoint last_drag;
1089 wxPoint m_last_touch_down_pos;
1090 bool m_ignore_next_leftup;
1091
1092 wxMemoryDC *pmemdc;
1093
1094 int warp_x, warp_y;
1095 bool warp_flag;
1096
1097 wxTimer *
1098 pPanTimer; // This timer used for auto panning on route creation and edit
1099 wxTimer *
1100 pMovementTimer; // This timer used for smooth movement in non-opengl mode
1101 wxTimer *pMovementStopTimer; // This timer used to stop movement if a keyup
1102 // event is lost
1103 wxTimer *pCurTrackTimer; // This timer used to update the status window on
1104 // mouse idle
1105 wxTimer *pRotDefTimer; // This timer used to control rotaion rendering on
1106 // mouse moves
1107 wxTimer *m_DoubleClickTimer;
1108 wxTimer m_routeFinishTimer;
1109
1110 wxTimer m_RolloverPopupTimer;
1111
1112 wxTimer m_VPMovementTimer;
1113
1114 int m_wheelzoom_stop_oneshot;
1115 int m_last_wheel_dir;
1116 wxStopWatch m_wheelstopwatch;
1117 double m_zoom_target;
1118
1119 int m_curtrack_timer_msec;
1120 int m_rollover_popup_timer_msec;
1121
1122 GSHHSChart *pWorldBackgroundChart;
1123
1124 ChartBaseBSB *pCBSB;
1125 wxBitmap *pss_overlay_bmp;
1126 wxMask *pss_overlay_mask;
1127
1128 wxRect ship_draw_rect;
1129 wxRect ship_draw_last_rect;
1130 wxRect ais_draw_rect;
1131 wxRect alert_draw_rect; // pjotrc 2010.02.22
1132
1133 wxBitmap *proute_bm; // a bitmap and dc used to calculate route bounding box
1134 wxMemoryDC m_dc_route; // seen in mouse->edit->route
1135
1136 emboss_data *m_pEM_Feet; // maps for depth unit emboss pattern
1137 emboss_data *m_pEM_Meters;
1138 emboss_data *m_pEM_Fathoms;
1139
1140 emboss_data *m_pEM_OverZoom;
1141 // emboss_data *m_pEM_CM93Offset; // Flav
1142
1158 double m_true_scale_ppm;
1159
1160 ownship_state_t m_ownship_state;
1161
1162 ColorScheme m_cs;
1163
1164 wxBitmap m_bmTideDay;
1165 wxBitmap m_bmTideDusk;
1166 wxBitmap m_bmTideNight;
1167 wxBitmap m_bmCurrentDay;
1168 wxBitmap m_bmCurrentDusk;
1169 wxBitmap m_bmCurrentNight;
1170 wxBitmap m_cTideBitmap;
1171 wxBitmap m_cCurrentBitmap;
1172
1173 RolloverWin *m_pRouteRolloverWin;
1174 RolloverWin *m_pTrackRolloverWin;
1175 RolloverWin *m_pAISRolloverWin;
1176
1177 TimedPopupWin *m_pBrightPopup;
1178
1179 wxImage m_os_image_red_day;
1180 wxImage m_os_image_red_dusk;
1181 wxImage m_os_image_red_night;
1182 wxImage m_os_image_grey_day;
1183 wxImage m_os_image_grey_dusk;
1184 wxImage m_os_image_grey_night;
1185 wxImage m_os_image_yellow_day;
1186 wxImage m_os_image_yellow_dusk;
1187 wxImage m_os_image_yellow_night;
1188
1189 wxImage *m_pos_image_red;
1190 wxImage *m_pos_image_grey;
1191 wxImage *m_pos_image_yellow;
1192
1193 wxImage *m_pos_image_user;
1194 wxImage *m_pos_image_user_grey;
1195 wxImage *m_pos_image_user_yellow;
1196
1197 wxImage *m_pos_image_user_day;
1198 wxImage *m_pos_image_user_dusk;
1199 wxImage *m_pos_image_user_night;
1200 wxImage *m_pos_image_user_grey_day;
1201 wxImage *m_pos_image_user_grey_dusk;
1202 wxImage *m_pos_image_user_grey_night;
1203 wxImage *m_pos_image_user_yellow_day;
1204 wxImage *m_pos_image_user_yellow_dusk;
1205 wxImage *m_pos_image_user_yellow_night;
1206
1207 wxImage m_ship_pix_image; // cached ship draw image for high overzoom
1208 int m_cur_ship_pix;
1209 bool m_cur_ship_pix_isgrey;
1210 ColorScheme m_ship_cs;
1211
1212 ViewPort m_cache_vp;
1213 wxBitmap *m_prot_bm;
1214 wxPoint m_roffset;
1215
1216 bool m_b_rot_hidef;
1217
1218 SelectItem *m_pRolloverRouteSeg;
1219 SelectItem *m_pRolloverTrackSeg;
1220
1221 double m_wheel_lat, m_wheel_lon;
1222 int m_wheel_x, m_wheel_y;
1223
1224 ViewPort m_bm_cache_vp;
1225 wxBitmap m_working_bm; // Used to build quilt in OnPaint()
1226 wxBitmap m_cached_chart_bm; // A cached copy of the fully drawn quilt
1227
1228 bool m_bbrightdir;
1229 int m_brightmod;
1230
1231 bool m_bzooming, m_bzooming_to_cursor;
1232 IDX_entry *m_pIDXCandidate;
1233
1234 // #ifdef ocpnUSE_GL
1235 glChartCanvas *m_glcc;
1236 // #endif
1237
1238 // Smooth movement member variables
1239 wxPoint m_pan_drag;
1240 int m_panx, m_pany, m_modkeys;
1241 double m_panspeed;
1242 bool m_bmouse_key_mod;
1243 double m_zoom_factor, m_rotation_speed;
1249 int m_mustmove;
1250
1251 wxDateTime m_last_movement_time;
1252
1253 int m_AISRollover_MMSI;
1254 bool m_bsectors_shown;
1255 bool m_bedge_pan;
1256 double m_displayed_scale_factor;
1257
1258 wxColour m_fog_color;
1259 bool m_disable_edge_pan;
1260 wxFont *m_pgridFont;
1261
1262 bool m_dragoffsetSet;
1263
1264 bool m_bautofind;
1265 bool m_bFirstAuto;
1266 double m_vLat, m_vLon;
1267 ChartStack *m_pCurrentStack;
1268 Piano *m_Piano;
1269 bool m_bpersistent_quilt;
1270
1271 wxMenu *m_piano_ctx_menu;
1272 int menu_selected_dbIndex, menu_selected_index;
1273
1274 ocpnCompass *m_Compass;
1275 bool m_bShowGPS;
1280 bool m_mouseWasInCompass;
1281
1282 wxRect m_mainlast_tb_rect;
1283 int m_restore_dbindex;
1284 int m_restore_group;
1285
1286 MUIBar *m_muiBar;
1287 wxSize m_muiBarHOSize;
1288
1289 bool m_bShowOutlines;
1290 bool m_bDisplayGrid;
1291 bool m_bShowDepthUnits;
1292 bool m_bShowAIS;
1293 bool m_bShowAISScaled;
1294
1295 // S52PLib state storage
1296 long m_s52StateHash;
1297 bool m_encShowText;
1298 bool m_encShowDepth;
1299 bool m_encShowLightDesc;
1300 bool m_encShowBuoyLabels;
1301 int m_encDisplayCategory;
1302 bool m_encShowLights;
1303 bool m_encShowAnchor;
1304 bool m_encShowDataQual;
1305
1306 wxTimer m_deferredFocusTimer;
1307 float m_focus_indicator_pix;
1308 bool m_bENCGroup;
1309 bool m_last_TBviz;
1310
1311 double m_OSoffsetx, m_OSoffsety;
1312 bool m_MouseDragging;
1313
1314 wxString m_alertString;
1315 wxRect m_scaleBarRect;
1316 bool m_bShowCompassWin;
1317 bool m_pianoFrozen;
1318
1319 double m_sector_glat, m_sector_glon;
1320 std::vector<s57Sector_t> m_sectorlegsVisible;
1321 bool m_bShowVisibleSectors;
1323 double m_displayScale;
1324 bool m_show_focus_bar;
1325
1326 double m_panx_target_final;
1327 double m_pany_target_final;
1328 double m_panx_target_now;
1329 double m_pany_target_now;
1330
1331 double m_start_lat, m_start_lon;
1332 double m_target_lat, m_target_lon;
1333 double m_run_lat, m_run_lon;
1334 bool m_timed_move_vp_active;
1335 int m_timedVP_step;
1336 int m_stvpc;
1337
1338 double meters_to_shift = 0;
1339 double dir_to_shift = 0;
1340
1341 // Chart drag inertia support
1342 wxTimer m_chart_drag_inertia_timer;
1343 void OnChartDragInertiaTimer(wxTimerEvent &event);
1344
1345 uint64_t m_last_drag_time;
1346 int m_chart_drag_total_x;
1347 int m_chart_drag_total_y;
1348 double m_chart_drag_total_time;
1349 double m_chart_drag_velocity_x;
1350 double m_chart_drag_velocity_y;
1351 wxLongLong m_chart_drag_inertia_time;
1352 wxLongLong m_chart_drag_inertia_start_time;
1353 bool m_chart_drag_inertia_active;
1354 double m_last_elapsed;
1355 std::vector<int> m_drag_vec_x;
1356 std::vector<int> m_drag_vec_y;
1357 std::vector<double> m_drag_vec_t;
1358 int m_inertia_last_drag_x;
1359 int m_inertia_last_drag_y;
1360
1361 // For Jump animation
1362 wxTimer m_easeTimer;
1363 wxLongLong m_animationStart;
1364 wxLongLong m_animationDuration; // e.g. 300 ms
1365 double m_startLat, m_startLon, m_startScale;
1366 double m_endLat, m_endLon, m_endScale;
1367 bool m_animationActive;
1368 void OnJumpEaseTimer(wxTimerEvent &event);
1369 bool StartSmoothJump(double lat, double lon, double scale_ppm);
1370 bool m_disable_adjust_on_zoom;
1371
1372 NotificationButton *m_notification_button;
1373 NotificationsList *m_NotificationsList;
1374 ObservableListener evt_notificationlist_change_listener;
1375
1376 wxStopWatch m_sw_left_down;
1377 wxStopWatch m_sw_left_up;
1378 long m_sw_down_time;
1379 long m_sw_up_time;
1380 wxTimer m_tap_timer;
1381 wxPoint m_lastTapPos;
1382 int m_tap_count;
1383 void OnTapTimer(wxTimerEvent &event);
1384 int m_DragTrigger;
1385 uint64_t m_DragTriggerStartTime;
1386
1387 DECLARE_EVENT_TABLE()
1388};
1389
1390// CUSTOMIZATION - FORMAT MINUTES
1391
1392wxString minutesToHoursDays(float timeInMinutes);
1393
1394// END OF CUSTOMIZATION - FORMAT MINUTES
1395
1400#ifndef wxCLOSE_BOX
1401#define wxCLOSE_BOX 0x1000
1402#endif
1403#ifndef wxFIXED_MINSIZE
1404#define wxFIXED_MINSIZE 0
1405#endif
1406
1407#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:1315
arrayofCanvasPtr g_canvasArray
Global instance.
Definition chcanv.cpp:173
ChartCanvas * g_overlayCanvas
Global instance.
Definition chcanv.cpp:1314
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:13791
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:4551
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:11835
bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) rounded to nearest integer.
Definition chcanv.cpp:4547
void DoMovement(long dt)
Performs a step of smooth movement animation on the chart canvas.
Definition chcanv.cpp:3643
void ShowSingleTideDialog(int x, int y, void *pvIDX)
Display tide/current dialog with single-instance management.
Definition chcanv.cpp:13750
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:4497
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:2343
int PrepareContextSelections(double lat, double lon)
Definition chcanv.cpp:7999
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)
Definition chcanv.cpp:7808
bool PanCanvas(double dx, double dy)
Pans (moves) the canvas by the specified physical pixels in x and y directions.
Definition chcanv.cpp:5079
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:4628
bool SetVPScale(double sc, bool b_refresh=true)
Sets the viewport scale while maintaining the center point.
Definition chcanv.cpp:5359
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:4572
bool IsTideDialogOpen() const
Definition chcanv.cpp:13789
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:4634
void DrawTCWindow(int x, int y, void *pIDX)
Legacy tide dialog creation method.
Definition chcanv.cpp:13746
void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) with double precision.
Definition chcanv.cpp:4492
bool SetViewPoint(double lat, double lon)
Centers the view on a specific lat/lon position.
Definition chcanv.cpp:5378
bool MouseEventProcessCanvas(wxMouseEvent &event)
Processes mouse events for core chart panning and zooming operations.
Definition chcanv.cpp:10244
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:109
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.