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 "bbox.h"
43#include "canvas_menu.h"
44#include "chartdb.h"
45#include "chartimg.h"
46#include "ch_info_win.h"
47#include "compass.h"
48#include "emboss_data.h"
49#include "gshhs.h"
50#include "gui_lib.h"
51#include "idx_entry.h"
52#include "mui_bar.h"
54#include "observable_evtvar.h"
55#include "observable.h"
56#include "ocp_cursor.h"
57#include "ocpn_frame.h"
58#include "ocpn_pixel.h"
59#include "ocpn_plugin.h"
60#include "piano.h"
61#include "quilt.h"
62#include "rollover_win.h"
63#include "s57_sector.h"
64#include "tc_win.h"
65#include "undo.h"
66
67class canvasConfig; // circular
68class CanvasMenuHandler; // circular
69class MyFrame; // circular
70class NotificationsList; // circular
71class NotificationButton; // circular
72class Quilt; // circular
73class TCWin; // circular
74class Undo; // circular
75
76class ChartCanvas; // forward
79
80WX_DEFINE_ARRAY_PTR(ChartCanvas *, arrayofCanvasPtr);
81
82// Useful static routines
83void ShowAISTargetQueryDialog(wxWindow *parent, int mmsi);
84
85// Set up the preferred quilt type
86#define QUILT_TYPE_2
87
88//----------------------------------------------------------------------------
89// Forward Declarations
90//----------------------------------------------------------------------------
91
92//--------------------------------------------------------
93// Screen Brightness Control Support Routines
94//
95//--------------------------------------------------------
96
97int InitScreenBrightness(void);
98int RestoreScreenBrightness(void);
99int SetScreenBrightness(int brig1Ghtness);
100
101enum // specify the render behaviour of SetViewPoint()
102{
103 CURRENT_RENDER, // use the current render type
104 FORCE_SUBSAMPLE // force sub-sampled render, with re-render timer
105};
106
107// Cursor region enumerator
108enum {
109 CENTER,
110 MID_RIGHT,
111 MID_LEFT,
112 MID_TOP,
113 MID_BOT,
114};
115
116typedef enum ownship_state_t {
117 SHIP_NORMAL = 0,
118 SHIP_LOWACCURACY,
119 SHIP_INVALID
120} _ownship_state_t;
121
122enum { ID_S57QUERYTREECTRL = 10000, ID_AISDIALOGOK };
123
124enum {
125 ID_PIANO_DISABLE_QUILT_CHART = 32000,
126 ID_PIANO_ENABLE_QUILT_CHART,
127 ID_PIANO_CONTRACT_PIANO,
128 ID_PIANO_EXPAND_PIANO
129};
130
131enum { NORTH_UP_MODE, COURSE_UP_MODE, HEAD_UP_MODE };
132
133extern void pupHandler_PasteRoute(); // forward
134
135extern void pupHandler_PasteWaypoint(); // forward
136
137extern void pupHandler_PasteTrack(); // forward
138
157class ChartCanvas : public wxWindow {
158 friend class glChartCanvas;
159
160public:
161 ChartCanvas(wxFrame *frame, int canvasIndex, wxWindow *nmea_log);
162 ~ChartCanvas();
163
164 void SetupGlCanvas();
165
166 // Methods
167 void OnKeyDown(wxKeyEvent &event);
168 void OnKeyUp(wxKeyEvent &event);
169 void OnKeyChar(wxKeyEvent &event);
170 void OnPaint(wxPaintEvent &event);
171 void PaintCleanup();
172 void Scroll(int dx, int dy);
173 void ResetGridFont() { m_pgridFont = nullptr; }
174
175 void OnToolLeftClick(wxCommandEvent &event);
176
177 bool MouseEventOverlayWindows(wxMouseEvent &event);
178 bool MouseEventChartBar(wxMouseEvent &event);
179 bool MouseEventMUIBar(wxMouseEvent &event);
180 bool MouseEventToolbar(wxMouseEvent &event);
181 bool MouseEventIENCBar(wxMouseEvent &event);
182
183 bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick = true);
184 bool MouseEventProcessObjects(wxMouseEvent &event);
200 bool MouseEventProcessCanvas(wxMouseEvent &event);
201 void SetCanvasCursor(wxMouseEvent &event);
202 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
203 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
204#ifdef HAVE_WX_GESTURE_EVENTS
205 void OnZoom(wxZoomGestureEvent &event);
206 void OnLongPress(wxLongPressEvent &event);
207 void OnPressAndTap(wxPressAndTapEvent &event);
208
209 void OnLeftDown(wxMouseEvent &evt);
210 void OnLeftUp(wxMouseEvent &evt);
211
212 void OnRightUp(wxMouseEvent &event);
213 void OnRightDown(wxMouseEvent &event);
214
215 void OnDoubleLeftClick(wxMouseEvent &event);
216
217 void OnWheel(wxMouseEvent &event);
218 void OnMotion(wxMouseEvent &event);
219#endif /* HAVE_WX_GESTURE_EVENTS */
220
221 void PopupMenuHandler(wxCommandEvent &event);
222 bool IsPrimaryCanvas() { return (m_canvasIndex == 0); }
223
224 bool SetUserOwnship();
225
226 double GetCanvasRangeMeters();
227 void SetCanvasRangeMeters(double range);
228
229 void EnablePaint(bool b_enable);
230 bool SetCursor(const wxCursor &c) override;
231 void Refresh(bool eraseBackground = true,
232 const wxRect *rect = nullptr) override;
233 void Update() override;
234
235 void LostMouseCapture(wxMouseCaptureLostEvent &event);
236
237 void CancelMouseRoute();
241 void SetDisplaySizeMM(double size);
245 double GetDisplaySizeMM() { return m_display_size_mm; }
246
258 bool SetVPScale(double sc, bool b_refresh = true);
259 bool SetVPProjection(int projection);
267 bool SetViewPoint(double lat, double lon);
268 bool SetViewPointByCorners(double latSW, double lonSW, double latNE,
269 double lonNE);
284 bool SetViewPoint(double lat, double lon, double scale_ppm, double skew,
285 double rotation, int projection = 0, bool b_adjust = true,
286 bool b_refresh = true);
287 void ReloadVP(bool b_adjust = true);
288 void LoadVP(ViewPort &vp, bool b_adjust = true);
289
290 ChartStack *GetpCurrentStack() { return m_pCurrentStack; }
291 void SetGroupIndex(int index, bool autoswitch = false);
292 bool CheckGroup(int igroup);
293 void canvasRefreshGroupIndex(void);
294 void canvasChartsRefresh(int dbi_hint);
295
296 void CheckGroupValid(bool showMessage = true, bool switchGroup0 = true);
297
298 void UpdateCanvasS52PLIBConfig();
299
300 void TriggerDeferredFocus();
301 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
302 void OnRouteFinishTimerEvent(wxTimerEvent &event);
303
304 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
305 void SetupCanvasQuiltMode(void);
306 void ApplyCanvasConfig(canvasConfig *pcc);
307
308 bool SetVPRotation(double angle);
309 double GetVPRotation(void) { return GetVP().rotation; }
310 double GetVPSkew(void) { return GetVP().skew; }
311 double GetVPTilt(void) { return GetVP().tilt; }
312
313 void ClearbFollow(void);
314 void SetbFollow(void);
315 void TogglebFollow(void);
316 bool GetbFollow() { return m_bFollow; }
317
318 void JumpToPosition(double lat, double lon, double scale);
319 void SetFirstAuto(bool b_auto) { m_bFirstAuto = b_auto; }
320 void SetAbsoluteMinScale(double min_scale);
321 std::shared_ptr<HostApi121::PiPointContext> GetCanvasContextAtPoint(int x,
322 int y);
323
336 void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r);
350 void GetDoubleCanvasPointPixVP(ViewPort &vp, double rlat, double rlon,
351 wxPoint2DDouble *r);
352
369 bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r);
370
391 bool GetCanvasPointPixVP(ViewPort &vp, double rlat, double rlon, wxPoint *r);
392
408 void GetCanvasPixPoint(double x, double y, double &lat, double &lon);
409 void WarpPointerDeferred(int x, int y);
410 void UpdateShips();
411 void UpdateAIS();
412 void UpdateAlerts(); // pjotrc 2010.02.22
413 void ToggleCPAWarn();
414
415 bool IsMeasureActive() { return m_bMeasure_Active; }
416 wxBitmap &GetTideBitmap() { return m_cTideBitmap; }
417 Undo *undo;
418
419 int GetUpMode() { return m_upMode; }
420 bool GetLookahead() { return m_bLookAhead; }
421
422 void UnlockQuilt();
423 void SetQuiltMode(bool b_quilt);
424 bool GetQuiltMode(void);
425 std::vector<int> GetQuiltIndexArray(void);
426 bool IsQuiltDelta(void);
427 void SetQuiltChartHiLiteIndex(int dbIndex);
428 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
429 void ClearQuiltChartHiLiteIndexArray();
430 int GetQuiltReferenceChartIndex(void);
431 double GetBestStartScale(int dbi_hint, const ViewPort &vp);
432 void ConfigureChartBar();
433
434 int GetNextContextMenuId();
435
436 TCWin *getTCWin() { return pCwin; }
437
438 bool StartTimedMovement(bool stoptimer = true);
439 void DoTimedMovement();
452 void DoMovement(long dt);
453 void StopMovement();
454
455 void StartTimedMovementVP(double target_lat, double target_lon, int nstep);
456 void DoTimedMovementVP();
457 void StopMovementVP();
458
459 void StartTimedMovementTarget();
460 void DoTimedMovementTarget();
461 void StopMovementTarget();
462
463 void SetColorScheme(ColorScheme cs);
464 ColorScheme GetColorScheme() { return m_cs; }
465
466 void CanvasApplyLocale();
467 void RebuildCursors();
468
469 // Accessors
470 int GetCanvasWidth() { return m_canvas_width; }
471 int GetCanvasHeight() { return m_canvas_height; }
473 float GetVPScale() { return GetVP().view_scale_ppm; }
476 float GetVPChartScale() { return GetVP().chart_scale; }
485 double GetCanvasScaleFactor() { return m_canvas_scale_factor; }
486 /*chcanv*
487 * Return the physical pixels per meter at chart center, accounting for
488 * latitude distortion.
489 */
490 double GetCanvasTrueScale() { return m_true_scale_ppm; }
491 double GetAbsoluteMinScalePpm() { return m_absolute_min_scale_ppm; }
492 ViewPort *GetpVP() { return &VPoint; }
493 void SetVP(ViewPort &);
494 ChartBase *GetChartAtCursor();
495 ChartBase *GetOverlayChartAtCursor();
496 Piano *GetPiano() { return m_Piano; }
497 int GetPianoHeight();
498
499 bool isRouteEditing(void) {
500 return m_bRouteEditing && m_pRoutePointEditTarget;
501 }
502 bool isMarkEditing(void) { return m_bMarkEditing && m_pRoutePointEditTarget; }
503
504 GSHHSChart *GetWorldBackgroundChart() { return pWorldBackgroundChart; }
505 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
506
507 void SetbTCUpdate(bool f) { m_bTCupdate = f; }
508 bool GetbTCUpdate() { return m_bTCupdate; }
509 void SetbShowCurrent(bool f) { m_bShowCurrent = f; }
510 bool GetbShowCurrent() { return m_bShowCurrent; }
511 void SetbShowTide(bool f) { m_bShowTide = f; }
512 bool GetbShowTide() { return m_bShowTide; }
513 void SetShowVisibleSectors(bool val) { m_bShowVisibleSectors = val; }
514 bool GetShowVisibleSectors() { return m_bShowVisibleSectors; }
516 double GetPixPerMM() { return m_pix_per_mm; }
517
518 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
519 void SetCursorStatus(double cursor_lat, double cursor_lon);
520 void GetCursorLatLon(double *lat, double *lon);
523 bool PanCanvas(double dx, double dy);
524 void StopAutoPan(void);
525 bool IsOwnshipOnScreen();
526 void DisableQuiltAdjustOnZoom(bool disable) {
527 m_disable_adjust_on_zoom = disable;
528 }
529
548 void ZoomCanvas(double factor, bool can_zoom_to_cursor = true,
549 bool stoptimer = true);
550
563 void ZoomCanvasSimple(double factor);
564
565 void RotateCanvas(double dir);
566 void DoRotateCanvas(double rotation);
567 void DoTiltCanvas(double tilt);
568
569 void ShowAISTargetList(void);
570
571 void ShowGoToPosition(void);
572 void HideGlobalToolbar();
573 void ShowGlobalToolbar();
574
575 bool GetShowDepthUnits() { return m_bShowDepthUnits; }
576 void SetShowDepthUnits(bool show) { m_bShowDepthUnits = show; }
577 bool GetShowGrid() { return m_bDisplayGrid; }
578 void SetShowGrid(bool show) { m_bDisplayGrid = show; }
579 bool GetShowOutlines() { return m_bShowOutlines; }
580 void SetShowOutlines(bool show) { m_bShowOutlines = show; }
581 bool GetShowChartbar() { return true; }
582 wxRect GetMUIBarRect();
583 void SetMUIBarPosition();
584 void DestroyMuiBar();
585 void CreateMUIBar();
586
587 void ToggleChartOutlines(void);
588 void ToggleCanvasQuiltMode(void);
589
590 wxString GetScaleText() { return m_scaleText; }
591 double GetScaleValue() { return m_scaleValue; }
592 bool GetShowAIS() { return m_bShowAIS; }
593 void SetShowAIS(bool show);
594 bool GetAttenAIS() { return m_bShowAISScaled; }
595 void SetAttenAIS(bool show);
596 void SetShowFocusBar(bool enable) { m_show_focus_bar = enable; }
597 bool GetShowFocusBar() { return m_show_focus_bar; }
598 MUIBar *GetMUIBar() { return m_muiBar; }
599 void SetAlertString(wxString str) { m_alertString = str; }
600 wxString GetAlertString() { return m_alertString; }
601 bool GetShowENCText() { return m_encShowText; }
602 void SetShowENCText(bool show);
603
604 bool GetShowENCDepth() { return m_encShowDepth; }
605 void SetShowENCDepth(bool show);
606
607 bool GetShowENCLightDesc() { return m_encShowLightDesc; }
608 void SetShowENCLightDesc(bool show);
609
610 bool GetShowENCBuoyLabels() { return m_encShowBuoyLabels; }
611 void SetShowENCBuoyLabels(bool show);
612
613 bool GetShowENCLights() { return m_encShowLights; }
614 void SetShowENCLights(bool show);
615
616 int GetENCDisplayCategory() { return m_encDisplayCategory; }
617 void SetENCDisplayCategory(int category);
618
619 bool GetShowENCAnchor() { return m_encShowAnchor; }
620 void SetShowENCAnchor(bool show);
621
622 bool GetShowENCDataQual() { return m_encShowDataQual; }
623 void SetShowENCDataQual(bool show);
624
625 void JaggyCircle(ocpnDC &dc, wxPen pen, int x, int y, int radius);
626 int m_canvasIndex;
627 void ShowTides(bool bShow);
628 void ShowCurrents(bool bShow);
629 void SetUpMode(int mode);
630 void ToggleLookahead();
631 void SetShowGPS(bool show);
632 void UpdateFollowButtonState(void);
633 void InvalidateGL();
634 bool IsTileOverlayIndexInYesShow(int index);
635 bool IsTileOverlayIndexInNoShow(int index);
636 void AddTileOverlayIndexToNoShow(int index);
637 int m_groupIndex;
638 Route *m_pMouseRoute;
639 bool m_bMeasure_Active;
640 ViewPort &GetVP();
641 ChartBase *m_singleChart;
642 Quilt *m_pQuilt;
643 wxString FindValidUploadPort();
644 wxString m_active_upload_port;
645
646 // protected:
647
648 // private:
649 ChartBase *GetLargestScaleQuiltChart();
650 ChartBase *GetFirstQuiltChart();
651 ChartBase *GetNextQuiltChart();
652 int GetQuiltChartCount();
653 void InvalidateAllQuiltPatchs(void);
654 void SetQuiltRefChart(int dbIndex);
655 std::vector<int> GetQuiltCandidatedbIndexArray(bool flag1 = true,
656 bool flag2 = true);
657 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
658 std::vector<int> &GetQuiltFullScreendbIndexArray();
659 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
660 int GetQuiltRefChartdbIndex(void);
661 void InvalidateQuilt(void);
662 double GetQuiltMaxErrorFactor();
663 bool IsChartQuiltableRef(int db_index);
664 bool IsChartLargeEnoughToRender(ChartBase *chart, ViewPort &vp);
665 int GetCanvasChartNativeScale();
666 int FindClosestCanvasChartdbIndex(int scale);
667 void UpdateCanvasOnGroupChange(void);
668
669 void ShowObjectQueryWindow(int x, int y, float zlat, float zlon);
670 void ShowMarkPropertiesDialog(RoutePoint *markPoint);
671 void ShowRoutePropertiesDialog(wxString title, Route *selected);
672 void ShowTrackPropertiesDialog(Track *selected);
675 void DrawTCWindow(int x, int y, void *pIDX);
676
689 void ShowSingleTideDialog(int x, int y, void *pvIDX);
690
692 bool IsTideDialogOpen() const;
693
695 void CloseTideDialog();
696
697 void UpdateGPSCompassStatusBox(bool b_force_new);
698 ocpnCompass *GetCompass() { return m_Compass; }
699
700 wxColour GetFogColor() { return m_fog_color; }
701
702 void ShowChartInfoWindow(int x, int dbIndex);
703 void HideChartInfoWindow(void);
704 void ShowCompositeInfoWindow(int x, int n_charts, int scale,
705 const std::vector<int> &index_vector);
706
707 void StartMeasureRoute();
708 void CancelMeasureRoute();
709
710 bool DoCanvasUpdate(void);
711 void SelectQuiltRefdbChart(int db_index, bool b_autoscale = true);
712 void SelectQuiltRefChart(int selected_index);
713 double GetBestVPScale(ChartBase *pchart);
714 void selectCanvasChartDisplay(int type, int family);
715 void RemoveChartFromQuilt(int dbIndex);
716
717 void HandlePianoClick(int selected_index,
718 const std::vector<int> &selected_dbIndex_array);
719 void HandlePianoRClick(int x, int y, int selected_index,
720 const std::vector<int> &selected_dbIndex_array);
721 void HandlePianoRollover(int selected_index,
722 const std::vector<int> &selected_dbIndex_array,
723 int n_charts, int scale);
724 void ClearPianoRollover();
725 void UpdateCanvasControlBar(void);
726 void FormatPianoKeys(void);
727 void PianoPopupMenu(int x, int y, int selected_index,
728 const std::vector<int> &selected_dbIndex_array);
729 void OnPianoMenuDisableChart(wxCommandEvent &event);
730 void OnPianoMenuEnableChart(wxCommandEvent &event);
731
732 bool IsPianoContextMenuActive() { return m_piano_ctx_menu != 0; }
733 bool DoCanvasCOGSet(void);
734 void ApplyGlobalSettings();
735 void SetShowGPSCompassWindow(bool bshow);
736 bool GetShowGPSCompassWindow() { return m_bShowCompassWin; }
737 void FreezePiano() { m_pianoFrozen = true; }
738 void ThawPiano() { m_pianoFrozen = false; }
739 void StartChartDragInertia();
740 void SetupGridFont();
741
742 // Todo build more accessors
743 bool m_bFollow;
744 wxCursor *pCursorPencil;
745 wxCursor *pCursorArrow;
746 wxCursor *pCursorCross;
747 wxCursor *pPlugIn_Cursor;
748 TCWin *pCwin;
749 wxBitmap *pscratch_bm;
750 bool m_brepaint_piano;
783 wxPoint r_rband;
784 double m_prev_rlat;
785 double m_prev_rlon;
786 RoutePoint *m_prev_pMousePoint;
787 bool m_bShowNavobjects;
788 int m_routeState;
789 int m_upMode;
790 bool m_bLookAhead;
791
792#ifdef HAVE_WX_GESTURE_EVENTS
793 double m_oldVPSScale;
794 bool m_popupWanted;
795 bool m_leftdown;
796 wxPoint m_zoomStartPoint;
797#endif /* HAVE_WX_GESTURE_EVENTS */
798
799 void DrawBlinkObjects(void);
800
801 void StartRoute(void);
802 wxString FinishRoute(void);
803
804#ifdef ocpnUSE_GL
805 glChartCanvas *GetglCanvas() { return m_glcc; }
806#endif
807
808 bool CheckEdgePan(int x, int y, bool bdragging, int margin, int delta);
809
810 bool m_FinishRouteOnKillFocus;
811 bool m_bMeasure_DistCircle;
812 bool m_bAppendingRoute;
813 int m_nMeasureState;
814 Route *m_pMeasureRoute;
815 MyFrame *parent_frame;
816 CanvasMenuHandler *m_canvasMenu;
817 int GetMinAvailableGshhgQuality() {
818 return pWorldBackgroundChart->GetMinAvailableQuality();
819 }
820 int GetMaxAvailableGshhgQuality() {
821 return pWorldBackgroundChart->GetMaxAvailableQuality();
822 }
823 Route *GetSelectedRoute() const { return m_pSelectedRoute; }
824 Track *GetSelectedTrack() const { return m_pSelectedTrack; }
825 RoutePoint *GetSelectedRoutePoint() const { return m_pFoundRoutePoint; }
826
827 void SetAISCanvasDisplayStyle(int StyleIndx);
828 void TouchAISToolActive(void);
829 void UpdateAISTBTool(void);
830
831 void SelectChartFromStack(int index, bool bDir = false,
832 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
833 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
834 void SelectdbChart(int dbindex);
835
836 void DoCanvasStackDelta(int direction);
837
838 void ProcessNewGUIScale();
839
840 bool m_b_paint_enable;
841
842 wxRect GetScaleBarRect() { return m_scaleBarRect; }
843 void RenderAlertMessage(wxDC &dc, const ViewPort &vp);
844
845 std::vector<int> m_tile_noshow_index_array;
846 std::vector<int> m_tile_yesshow_index_array;
847 std::vector<int> m_quilt_noshow_index_array;
848
849 std::vector<int> GetQuiltNoshowIindexArray() {
850 return m_quilt_noshow_index_array;
851 }
861 double GetDisplayScale() { return m_displayScale; }
862 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
863 NotificationsList *GetNotificationsList() { return m_NotificationsList; }
864
865 int PrepareContextSelections(double lat, double lon);
866
867 RoutePoint *GetFoundRoutepoint() { return m_pFoundRoutePoint; }
868
874
875 bool m_inPinch;
876
877private:
891 void DoZoomCanvas(double factor, bool can_zoom_to_cursor = true);
892
893 int AdjustQuiltRefChart();
894 bool UpdateS52State();
895 void CallPopupMenu(int x, int y);
896 bool IsTempMenuBarEnabled();
897 bool InvokeCanvasMenu(int x, int y, int seltype);
898 void OnMenuTimer(wxTimerEvent &event);
899 wxTimer m_menuTimer;
900 wxPoint m_menuPos;
901 bool m_inLongPress;
902
903 ViewPort VPoint;
904 void PositionConsole(void);
905 wxWindow *m_nmea_log;
906
907 wxColour PredColor();
908 wxColour ShipColor();
909
910 void ComputeShipScaleFactor(float icon_hdt, int ownShipWidth,
911 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
912 wxPoint &GpsOffsetPixels,
913 wxPoint2DDouble lGPSPoint, float &scale_factor_x,
914 float &scale_factor_y);
915
916 void ShipDrawLargeScale(ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
917 void ShipIndicatorsDraw(ocpnDC &dc, int img_height, wxPoint GPSOffsetPixels,
918 wxPoint2DDouble lGPSPoint);
919
920 ChInfoWin *m_pCIWin;
921
922 bool m_bShowCurrent;
923 bool m_bShowTide;
924 int cursor_region;
925 bool m_bTCupdate;
926 wxString m_scaleText;
927 double m_scaleValue;
928 bool m_bShowScaleInStatusBar;
929 wxRect bbRect;
930
931 wxPoint LastShipPoint;
932 wxPoint LastPredPoint;
933 bool m_bDrawingRoute;
934 bool m_bRouteEditing;
935 bool m_bMarkEditing;
936 bool m_bRoutePoinDragging;
937 bool m_bIsInRadius;
938 bool m_bMayToggleMenuBar;
939
940 RoutePoint *m_pRoutePointEditTarget;
941 RoutePoint *m_lastRoutePointEditTarget;
942 SelectItem *m_pFoundPoint;
943 bool m_bChartDragging;
944 Route *m_pSelectedRoute;
945 Track *m_pSelectedTrack;
946 wxArrayPtrVoid *m_pEditRouteArray;
947 RoutePoint *m_pFoundRoutePoint;
948
949 int m_FoundAIS_MMSI;
950
951 wxCursor *pCursorLeft;
952 wxCursor *pCursorRight;
953 wxCursor *pCursorUp;
954 wxCursor *pCursorDown;
955
956 wxCursor *pCursorUpLeft;
957 wxCursor *pCursorUpRight;
958 wxCursor *pCursorDownLeft;
959 wxCursor *pCursorDownRight;
960
961 int popx, popy;
962
963 wxBitmap *pThumbDIBShow;
964 wxBitmap *pThumbShowing;
965
966 bool bShowingCurrent;
967 bool bShowingTide;
968
975 double m_canvas_scale_factor;
977 double m_pix_per_mm;
978 double m_display_size_mm;
979
980 double m_absolute_min_scale_ppm;
981
982 bool singleClickEventIsValid;
983 wxMouseEvent singleClickEvent;
984
985 std::vector<s57Sector_t> extendedSectorLegs;
986 wxFont m_overzoomFont;
987 int m_overzoomTextWidth;
988 int m_overzoomTextHeight;
989
990 // Methods
991 void OnActivate(wxActivateEvent &event);
992 void OnSize(wxSizeEvent &event);
993 void MouseTimedEvent(wxTimerEvent &event);
994 void MouseEvent(wxMouseEvent &event);
995 void ShipDraw(ocpnDC &dc);
996 void DrawArrow(ocpnDC &dc, int x, int y, double rot_angle, double scale);
997 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
998 void FindRoutePointsAtCursor(float selectRadius, bool setBeingEdited);
999
1000 void RotateTimerEvent(wxTimerEvent &event);
1001 void PanTimerEvent(wxTimerEvent &event);
1002 void MovementTimerEvent(wxTimerEvent &);
1003 void MovementStopTimerEvent(wxTimerEvent &);
1004 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1005
1006 void MovementVPTimerEvent(wxTimerEvent &event);
1007
1008 void DrawAllTracksInBBox(ocpnDC &dc, LLBBox &BltBBox);
1009 void DrawActiveTrackInBBox(ocpnDC &dc, LLBBox &BltBBox);
1010 void DrawAllRoutesInBBox(ocpnDC &dc, LLBBox &BltBBox);
1011 void DrawActiveRouteInBBox(ocpnDC &dc, LLBBox &BltBBox);
1012 void DrawAllWaypointsInBBox(ocpnDC &dc, LLBBox &BltBBox);
1013 void DrawAnchorWatchPoints(ocpnDC &dc);
1014 double GetAnchorWatchRadiusPixels(RoutePoint *pAnchorWatchPoint);
1015
1016 void DrawAllTidesInBBox(ocpnDC &dc, LLBBox &BBox);
1017 void DrawAllCurrentsInBBox(ocpnDC &dc, LLBBox &BBox);
1018 void RebuildTideSelectList(LLBBox &BBox);
1019 void RebuildCurrentSelectList(LLBBox &BBox);
1020 IDX_entry *FindBestCurrentObject(double lat, double lon);
1021
1022 void RenderAllChartOutlines(ocpnDC &dc, ViewPort &vp);
1023 void RenderChartOutline(ocpnDC &dc, int dbIndex, ViewPort &vp);
1024 void RenderRouteLegs(ocpnDC &dc);
1025 void RenderVisibleSectorLights(ocpnDC &dc);
1026
1027 void AlertDraw(ocpnDC &dc); // pjotrc 2010.02.22
1028
1029 void GridDraw(ocpnDC &dc); // Display lat/lon Grid in chart display
1030 void ScaleBarDraw(ocpnDC &dc);
1031
1032 void DrawOverlayObjects(ocpnDC &dc, const wxRegion &ru);
1033 void RenderShipToActive(ocpnDC &dc, bool Use_Opengl);
1034
1035 emboss_data *EmbossDepthScale();
1036 emboss_data *CreateEmbossMapData(wxFont &font, int width, int height,
1037 const wxString &str, ColorScheme cs);
1038 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1039 wxBitmap CreateDimBitmap(wxBitmap &Bitmap, double factor);
1040
1041 void CreateOZEmbossMapData(ColorScheme cs);
1042 emboss_data *EmbossOverzoomIndicator(ocpnDC &dc);
1043 void SetOverzoomFont();
1044
1045 // void CreateCM93OffsetEmbossMapData(ColorScheme cs);
1046 // void EmbossCM93Offset ( wxMemoryDC *pdc);
1047
1048 void DrawEmboss(ocpnDC &dc, emboss_data *pemboss);
1049
1050 void ShowBrightnessLevelTimedPopup(int brightness, int min, int max);
1051 void HandleNotificationMouseClick();
1052
1053 // Data
1055 int m_canvas_width;
1057 int m_canvas_height;
1058
1059 int xr_margin; // chart scroll margins, control cursor, etc.
1060 int xl_margin;
1061 int yt_margin;
1062 int yb_margin;
1063
1064 wxPoint last_drag;
1065 wxPoint m_last_touch_down_pos;
1066
1067 wxMemoryDC *pmemdc;
1068
1069 int warp_x, warp_y;
1070 bool warp_flag;
1071
1072 wxTimer *
1073 pPanTimer; // This timer used for auto panning on route creation and edit
1074 wxTimer *
1075 pMovementTimer; // This timer used for smooth movement in non-opengl mode
1076 wxTimer *pMovementStopTimer; // This timer used to stop movement if a keyup
1077 // event is lost
1078 wxTimer *pCurTrackTimer; // This timer used to update the status window on
1079 // mouse idle
1080 wxTimer *pRotDefTimer; // This timer used to control rotaion rendering on
1081 // mouse moves
1082 wxTimer *m_DoubleClickTimer;
1083 wxTimer m_routeFinishTimer;
1084
1085 wxTimer m_RolloverPopupTimer;
1086
1087 wxTimer m_VPMovementTimer;
1088
1089 int m_wheelzoom_stop_oneshot;
1090 int m_last_wheel_dir;
1091 wxStopWatch m_wheelstopwatch;
1092 double m_zoom_target;
1093
1094 int m_curtrack_timer_msec;
1095 int m_rollover_popup_timer_msec;
1096
1097 GSHHSChart *pWorldBackgroundChart;
1098
1099 ChartBaseBSB *pCBSB;
1100 wxBitmap *pss_overlay_bmp;
1101 wxMask *pss_overlay_mask;
1102
1103 wxRect ship_draw_rect;
1104 wxRect ship_draw_last_rect;
1105 wxRect ais_draw_rect;
1106 wxRect alert_draw_rect; // pjotrc 2010.02.22
1107
1108 wxBitmap *proute_bm; // a bitmap and dc used to calculate route bounding box
1109 wxMemoryDC m_dc_route; // seen in mouse->edit->route
1110
1111 emboss_data *m_pEM_Feet; // maps for depth unit emboss pattern
1112 emboss_data *m_pEM_Meters;
1113 emboss_data *m_pEM_Fathoms;
1114
1115 emboss_data *m_pEM_OverZoom;
1116 // emboss_data *m_pEM_CM93Offset; // Flav
1117
1133 double m_true_scale_ppm;
1134
1135 ownship_state_t m_ownship_state;
1136
1137 ColorScheme m_cs;
1138
1139 wxBitmap m_bmTideDay;
1140 wxBitmap m_bmTideDusk;
1141 wxBitmap m_bmTideNight;
1142 wxBitmap m_bmCurrentDay;
1143 wxBitmap m_bmCurrentDusk;
1144 wxBitmap m_bmCurrentNight;
1145 wxBitmap m_cTideBitmap;
1146 wxBitmap m_cCurrentBitmap;
1147
1148 RolloverWin *m_pRouteRolloverWin;
1149 RolloverWin *m_pTrackRolloverWin;
1150 RolloverWin *m_pAISRolloverWin;
1151
1152 TimedPopupWin *m_pBrightPopup;
1153
1154 wxImage m_os_image_red_day;
1155 wxImage m_os_image_red_dusk;
1156 wxImage m_os_image_red_night;
1157 wxImage m_os_image_grey_day;
1158 wxImage m_os_image_grey_dusk;
1159 wxImage m_os_image_grey_night;
1160 wxImage m_os_image_yellow_day;
1161 wxImage m_os_image_yellow_dusk;
1162 wxImage m_os_image_yellow_night;
1163
1164 wxImage *m_pos_image_red;
1165 wxImage *m_pos_image_grey;
1166 wxImage *m_pos_image_yellow;
1167
1168 wxImage *m_pos_image_user;
1169 wxImage *m_pos_image_user_grey;
1170 wxImage *m_pos_image_user_yellow;
1171
1172 wxImage *m_pos_image_user_day;
1173 wxImage *m_pos_image_user_dusk;
1174 wxImage *m_pos_image_user_night;
1175 wxImage *m_pos_image_user_grey_day;
1176 wxImage *m_pos_image_user_grey_dusk;
1177 wxImage *m_pos_image_user_grey_night;
1178 wxImage *m_pos_image_user_yellow_day;
1179 wxImage *m_pos_image_user_yellow_dusk;
1180 wxImage *m_pos_image_user_yellow_night;
1181
1182 wxImage m_ship_pix_image; // cached ship draw image for high overzoom
1183 int m_cur_ship_pix;
1184 bool m_cur_ship_pix_isgrey;
1185 ColorScheme m_ship_cs;
1186
1187 ViewPort m_cache_vp;
1188 wxBitmap *m_prot_bm;
1189 wxPoint m_roffset;
1190
1191 bool m_b_rot_hidef;
1192
1193 SelectItem *m_pRolloverRouteSeg;
1194 SelectItem *m_pRolloverTrackSeg;
1195
1196 double m_wheel_lat, m_wheel_lon;
1197 int m_wheel_x, m_wheel_y;
1198
1199 ViewPort m_bm_cache_vp;
1200 wxBitmap m_working_bm; // Used to build quilt in OnPaint()
1201 wxBitmap m_cached_chart_bm; // A cached copy of the fully drawn quilt
1202
1203 bool m_bbrightdir;
1204 int m_brightmod;
1205
1206 bool m_bzooming, m_bzooming_to_cursor;
1207 IDX_entry *m_pIDXCandidate;
1208
1209 // #ifdef ocpnUSE_GL
1210 glChartCanvas *m_glcc;
1211 // #endif
1212
1213 // Smooth movement member variables
1214 wxPoint m_pan_drag;
1215 int m_panx, m_pany, m_modkeys;
1216 double m_panspeed;
1217 bool m_bmouse_key_mod;
1218 double m_zoom_factor, m_rotation_speed;
1224 int m_mustmove;
1225
1226 wxDateTime m_last_movement_time;
1227
1228 int m_AISRollover_MMSI;
1229 bool m_bsectors_shown;
1230 bool m_bedge_pan;
1231 double m_displayed_scale_factor;
1232
1233 wxColour m_fog_color;
1234 bool m_disable_edge_pan;
1235 wxFont *m_pgridFont;
1236
1237 bool m_dragoffsetSet;
1238
1239 bool m_bautofind;
1240 bool m_bFirstAuto;
1241 double m_vLat, m_vLon;
1242 ChartStack *m_pCurrentStack;
1243 Piano *m_Piano;
1244 bool m_bpersistent_quilt;
1245
1246 wxMenu *m_piano_ctx_menu;
1247 int menu_selected_dbIndex, menu_selected_index;
1248
1249 ocpnCompass *m_Compass;
1250 bool m_bShowGPS;
1255 bool m_mouseWasInCompass;
1256
1257 wxRect m_mainlast_tb_rect;
1258 int m_restore_dbindex;
1259 int m_restore_group;
1260
1261 MUIBar *m_muiBar;
1262 wxSize m_muiBarHOSize;
1263
1264 bool m_bShowOutlines;
1265 bool m_bDisplayGrid;
1266 bool m_bShowDepthUnits;
1267 bool m_bShowAIS;
1268 bool m_bShowAISScaled;
1269
1270 // S52PLib state storage
1271 long m_s52StateHash;
1272 bool m_encShowText;
1273 bool m_encShowDepth;
1274 bool m_encShowLightDesc;
1275 bool m_encShowBuoyLabels;
1276 int m_encDisplayCategory;
1277 bool m_encShowLights;
1278 bool m_encShowAnchor;
1279 bool m_encShowDataQual;
1280
1281 wxTimer m_deferredFocusTimer;
1282 float m_focus_indicator_pix;
1283 bool m_bENCGroup;
1284 bool m_last_TBviz;
1285
1286 double m_OSoffsetx, m_OSoffsety;
1287 bool m_MouseDragging;
1288
1289 wxString m_alertString;
1290 wxRect m_scaleBarRect;
1291 bool m_bShowCompassWin;
1292 bool m_pianoFrozen;
1293
1294 double m_sector_glat, m_sector_glon;
1295 std::vector<s57Sector_t> m_sectorlegsVisible;
1296 bool m_bShowVisibleSectors;
1298 double m_displayScale;
1299 bool m_show_focus_bar;
1300
1301 double m_panx_target_final;
1302 double m_pany_target_final;
1303 double m_panx_target_now;
1304 double m_pany_target_now;
1305
1306 double m_start_lat, m_start_lon;
1307 double m_target_lat, m_target_lon;
1308 double m_run_lat, m_run_lon;
1309 bool m_timed_move_vp_active;
1310 int m_timedVP_step;
1311 int m_stvpc;
1312
1313 double meters_to_shift = 0;
1314 double dir_to_shift = 0;
1315
1316 // Chart drag inertia support
1317 wxTimer m_chart_drag_inertia_timer;
1318 void OnChartDragInertiaTimer(wxTimerEvent &event);
1319
1320 uint64_t m_last_drag_time;
1321 int m_chart_drag_total_x;
1322 int m_chart_drag_total_y;
1323 double m_chart_drag_total_time;
1324 double m_chart_drag_velocity_x;
1325 double m_chart_drag_velocity_y;
1326 wxLongLong m_chart_drag_inertia_time;
1327 wxLongLong m_chart_drag_inertia_start_time;
1328 bool m_chart_drag_inertia_active;
1329 double m_last_elapsed;
1330 std::vector<int> m_drag_vec_x;
1331 std::vector<int> m_drag_vec_y;
1332 std::vector<double> m_drag_vec_t;
1333 int m_inertia_last_drag_x;
1334 int m_inertia_last_drag_y;
1335
1336 // For Jump animation
1337 wxTimer m_easeTimer;
1338 wxLongLong m_animationStart;
1339 wxLongLong m_animationDuration; // e.g. 300 ms
1340 double m_startLat, m_startLon, m_startScale;
1341 double m_endLat, m_endLon, m_endScale;
1342 bool m_animationActive;
1343 void OnJumpEaseTimer(wxTimerEvent &event);
1344 bool StartSmoothJump(double lat, double lon, double scale_ppm);
1345 bool m_disable_adjust_on_zoom;
1346
1347 NotificationButton *m_notification_button;
1348 NotificationsList *m_NotificationsList;
1349 ObservableListener evt_notificationlist_change_listener;
1350
1351 wxStopWatch m_sw_left_down;
1352 wxStopWatch m_sw_left_up;
1353 long m_sw_down_time;
1354 long m_sw_up_time;
1355 wxTimer m_tap_timer;
1356 wxPoint m_lastTapPos;
1357 int m_tap_count;
1358 void OnTapTimer(wxTimerEvent &event);
1359 int m_DragTrigger;
1360 uint64_t m_DragTriggerStartTime;
1361
1362 DECLARE_EVENT_TABLE()
1363};
1364
1365// CUSTOMIZATION - FORMAT MINUTES
1366
1367wxString minutesToHoursDays(float timeInMinutes);
1368
1369// END OF CUSTOMIZATION - FORMAT MINUTES
1370
1375#ifndef wxCLOSE_BOX
1376#define wxCLOSE_BOX 0x1000
1377#endif
1378#ifndef wxFIXED_MINSIZE
1379#define wxFIXED_MINSIZE 0
1380#endif
1381
1382#endif // _CHCANV_H__
Canvas context (right click) menu handler.
Chart info panel.
Charts database management
BSB chart management.
ChartCanvas * g_focusCanvas
Global instance.
Definition chcanv.cpp:1310
ChartCanvas * g_overlayCanvas
Global instance.
Definition chcanv.cpp:1309
Handles context menu events for the chart canvas.
Definition canvas_menu.h:49
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:125
ChartCanvas - Main chart display and interaction component.
Definition chcanv.h:157
void CloseTideDialog()
Close any open tide dialog.
Definition chcanv.cpp:13665
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:4518
float GetVPChartScale()
Return the ViewPort chart scale denominator (e.g., 50000 for a 1:50000 scale).
Definition chcanv.h:476
void OnPaint(wxPaintEvent &event)
Definition chcanv.cpp:11709
bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) rounded to nearest integer.
Definition chcanv.cpp:4514
void DoMovement(long dt)
Performs a step of smooth movement animation on the chart canvas.
Definition chcanv.cpp:3612
void ShowSingleTideDialog(int x, int y, void *pvIDX)
Display tide/current dialog with single-instance management.
Definition chcanv.cpp:13624
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:4464
double m_cursor_lat
The latitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:782
double GetCanvasScaleFactor()
Return the number of logical pixels per meter for the screen.
Definition chcanv.h:485
double GetPixPerMM()
Get the number of logical pixels per millimeter on the screen.
Definition chcanv.h:516
double GetDisplaySizeMM()
Get the width of the screen in millimeters.
Definition chcanv.h:245
double GetDisplayScale()
Get the ratio of physical to logical pixel for the display.
Definition chcanv.h:861
void SetDisplaySizeMM(double size)
Set the width of the screen in millimeters.
Definition chcanv.cpp:2338
int PrepareContextSelections(double lat, double lon)
Definition chcanv.cpp:7950
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)
Definition chcanv.cpp:7759
bool PanCanvas(double dx, double dy)
Pans (moves) the canvas by the specified physical pixels in x and y directions.
Definition chcanv.cpp:5046
float GetVPScale()
Return the ViewPort scale factor, in physical pixels per meter.
Definition chcanv.h:473
EventVar json_msg
Notified with message targeting all plugins.
Definition chcanv.h:873
void ZoomCanvasSimple(double factor)
Perform an immediate zoom operation without smooth transitions.
Definition chcanv.cpp:4595
bool SetVPScale(double sc, bool b_refresh=true)
Sets the viewport scale while maintaining the center point.
Definition chcanv.cpp:5326
double m_cursor_lon
The longitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:766
void GetCanvasPixPoint(double x, double y, double &lat, double &lon)
Convert canvas pixel coordinates (physical pixels) to latitude/longitude.
Definition chcanv.cpp:4539
bool IsTideDialogOpen() const
Definition chcanv.cpp:13663
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:4601
void DrawTCWindow(int x, int y, void *pIDX)
Legacy tide dialog creation method.
Definition chcanv.cpp:13620
void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) with double precision.
Definition chcanv.cpp:4459
bool SetViewPoint(double lat, double lon)
Centers the view on a specific lat/lon position.
Definition chcanv.cpp:5345
bool MouseEventProcessCanvas(wxMouseEvent &event)
Processes mouse events for core chart panning and zooming operations.
Definition chcanv.cpp:10119
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:61
Main application frame.
Definition ocpn_frame.h:139
Keeps listening over its lifespan, removes itself on destruction.
Definition observable.h:155
Definition piano.h:60
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:44
Represents a track, which is a series of connected track points.
Definition track.h:117
Definition undo.h:58
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.
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.
OpenCPN top window.
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.