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<PI_PointContext> GetCanvasContextAtPoint(int x, int y);
322
335 void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r);
349 void GetDoubleCanvasPointPixVP(ViewPort &vp, double rlat, double rlon,
350 wxPoint2DDouble *r);
351
368 bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r);
369
390 bool GetCanvasPointPixVP(ViewPort &vp, double rlat, double rlon, wxPoint *r);
391
407 void GetCanvasPixPoint(double x, double y, double &lat, double &lon);
408 void WarpPointerDeferred(int x, int y);
409 void UpdateShips();
410 void UpdateAIS();
411 void UpdateAlerts(); // pjotrc 2010.02.22
412 void ToggleCPAWarn();
413
414 bool IsMeasureActive() { return m_bMeasure_Active; }
415 wxBitmap &GetTideBitmap() { return m_cTideBitmap; }
416 Undo *undo;
417
418 int GetUpMode() { return m_upMode; }
419 bool GetLookahead() { return m_bLookAhead; }
420
421 void UnlockQuilt();
422 void SetQuiltMode(bool b_quilt);
423 bool GetQuiltMode(void);
424 std::vector<int> GetQuiltIndexArray(void);
425 bool IsQuiltDelta(void);
426 void SetQuiltChartHiLiteIndex(int dbIndex);
427 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
428 void ClearQuiltChartHiLiteIndexArray();
429 int GetQuiltReferenceChartIndex(void);
430 double GetBestStartScale(int dbi_hint, const ViewPort &vp);
431 void ConfigureChartBar();
432
433 int GetNextContextMenuId();
434
435 TCWin *getTCWin() { return pCwin; }
436
437 bool StartTimedMovement(bool stoptimer = true);
438 void DoTimedMovement();
451 void DoMovement(long dt);
452 void StopMovement();
453
454 void StartTimedMovementVP(double target_lat, double target_lon, int nstep);
455 void DoTimedMovementVP();
456 void StopMovementVP();
457
458 void StartTimedMovementTarget();
459 void DoTimedMovementTarget();
460 void StopMovementTarget();
461
462 void SetColorScheme(ColorScheme cs);
463 ColorScheme GetColorScheme() { return m_cs; }
464
465 void CanvasApplyLocale();
466 void RebuildCursors();
467
468 // Accessors
469 int GetCanvasWidth() { return m_canvas_width; }
470 int GetCanvasHeight() { return m_canvas_height; }
472 float GetVPScale() { return GetVP().view_scale_ppm; }
475 float GetVPChartScale() { return GetVP().chart_scale; }
484 double GetCanvasScaleFactor() { return m_canvas_scale_factor; }
485 /*chcanv*
486 * Return the physical pixels per meter at chart center, accounting for
487 * latitude distortion.
488 */
489 double GetCanvasTrueScale() { return m_true_scale_ppm; }
490 double GetAbsoluteMinScalePpm() { return m_absolute_min_scale_ppm; }
491 ViewPort *GetpVP() { return &VPoint; }
492 void SetVP(ViewPort &);
493 ChartBase *GetChartAtCursor();
494 ChartBase *GetOverlayChartAtCursor();
495 Piano *GetPiano() { return m_Piano; }
496 int GetPianoHeight();
497
498 bool isRouteEditing(void) {
499 return m_bRouteEditing && m_pRoutePointEditTarget;
500 }
501 bool isMarkEditing(void) { return m_bMarkEditing && m_pRoutePointEditTarget; }
502
503 GSHHSChart *GetWorldBackgroundChart() { return pWorldBackgroundChart; }
504 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
505
506 void SetbTCUpdate(bool f) { m_bTCupdate = f; }
507 bool GetbTCUpdate() { return m_bTCupdate; }
508 void SetbShowCurrent(bool f) { m_bShowCurrent = f; }
509 bool GetbShowCurrent() { return m_bShowCurrent; }
510 void SetbShowTide(bool f) { m_bShowTide = f; }
511 bool GetbShowTide() { return m_bShowTide; }
512 void SetShowVisibleSectors(bool val) { m_bShowVisibleSectors = val; }
513 bool GetShowVisibleSectors() { return m_bShowVisibleSectors; }
515 double GetPixPerMM() { return m_pix_per_mm; }
516
517 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
518 void SetCursorStatus(double cursor_lat, double cursor_lon);
519 void GetCursorLatLon(double *lat, double *lon);
522 bool PanCanvas(double dx, double dy);
523 void StopAutoPan(void);
524 bool IsOwnshipOnScreen();
525 void DisableQuiltAdjustOnZoom(bool disable) {
526 m_disable_adjust_on_zoom = disable;
527 }
528
547 void ZoomCanvas(double factor, bool can_zoom_to_cursor = true,
548 bool stoptimer = true);
549
562 void ZoomCanvasSimple(double factor);
563
564 void RotateCanvas(double dir);
565 void DoRotateCanvas(double rotation);
566 void DoTiltCanvas(double tilt);
567
568 void ShowAISTargetList(void);
569
570 void ShowGoToPosition(void);
571 void HideGlobalToolbar();
572 void ShowGlobalToolbar();
573
574 bool GetShowDepthUnits() { return m_bShowDepthUnits; }
575 void SetShowDepthUnits(bool show) { m_bShowDepthUnits = show; }
576 bool GetShowGrid() { return m_bDisplayGrid; }
577 void SetShowGrid(bool show) { m_bDisplayGrid = show; }
578 bool GetShowOutlines() { return m_bShowOutlines; }
579 void SetShowOutlines(bool show) { m_bShowOutlines = show; }
580 bool GetShowChartbar() { return true; }
581 wxRect GetMUIBarRect();
582 void SetMUIBarPosition();
583 void DestroyMuiBar();
584 void CreateMUIBar();
585
586 void ToggleChartOutlines(void);
587 void ToggleCanvasQuiltMode(void);
588
589 wxString GetScaleText() { return m_scaleText; }
590 double GetScaleValue() { return m_scaleValue; }
591 bool GetShowAIS() { return m_bShowAIS; }
592 void SetShowAIS(bool show);
593 bool GetAttenAIS() { return m_bShowAISScaled; }
594 void SetAttenAIS(bool show);
595 void SetShowFocusBar(bool enable) { m_show_focus_bar = enable; }
596 bool GetShowFocusBar() { return m_show_focus_bar; }
597 MUIBar *GetMUIBar() { return m_muiBar; }
598 void SetAlertString(wxString str) { m_alertString = str; }
599 wxString GetAlertString() { return m_alertString; }
600 bool GetShowENCText() { return m_encShowText; }
601 void SetShowENCText(bool show);
602
603 bool GetShowENCDepth() { return m_encShowDepth; }
604 void SetShowENCDepth(bool show);
605
606 bool GetShowENCLightDesc() { return m_encShowLightDesc; }
607 void SetShowENCLightDesc(bool show);
608
609 bool GetShowENCBuoyLabels() { return m_encShowBuoyLabels; }
610 void SetShowENCBuoyLabels(bool show);
611
612 bool GetShowENCLights() { return m_encShowLights; }
613 void SetShowENCLights(bool show);
614
615 int GetENCDisplayCategory() { return m_encDisplayCategory; }
616 void SetENCDisplayCategory(int category);
617
618 bool GetShowENCAnchor() { return m_encShowAnchor; }
619 void SetShowENCAnchor(bool show);
620
621 bool GetShowENCDataQual() { return m_encShowDataQual; }
622 void SetShowENCDataQual(bool show);
623
624 void JaggyCircle(ocpnDC &dc, wxPen pen, int x, int y, int radius);
625 int m_canvasIndex;
626 void ShowTides(bool bShow);
627 void ShowCurrents(bool bShow);
628 void SetUpMode(int mode);
629 void ToggleLookahead();
630 void SetShowGPS(bool show);
631 void UpdateFollowButtonState(void);
632 void InvalidateGL();
633 bool IsTileOverlayIndexInYesShow(int index);
634 bool IsTileOverlayIndexInNoShow(int index);
635 void AddTileOverlayIndexToNoShow(int index);
636 int m_groupIndex;
637 Route *m_pMouseRoute;
638 bool m_bMeasure_Active;
639 ViewPort &GetVP();
640 ChartBase *m_singleChart;
641 Quilt *m_pQuilt;
642 wxString FindValidUploadPort();
643 wxString m_active_upload_port;
644
645 // protected:
646
647 // private:
648 ChartBase *GetLargestScaleQuiltChart();
649 ChartBase *GetFirstQuiltChart();
650 ChartBase *GetNextQuiltChart();
651 int GetQuiltChartCount();
652 void InvalidateAllQuiltPatchs(void);
653 void SetQuiltRefChart(int dbIndex);
654 std::vector<int> GetQuiltCandidatedbIndexArray(bool flag1 = true,
655 bool flag2 = true);
656 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
657 std::vector<int> &GetQuiltFullScreendbIndexArray();
658 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
659 int GetQuiltRefChartdbIndex(void);
660 void InvalidateQuilt(void);
661 double GetQuiltMaxErrorFactor();
662 bool IsChartQuiltableRef(int db_index);
663 bool IsChartLargeEnoughToRender(ChartBase *chart, ViewPort &vp);
664 int GetCanvasChartNativeScale();
665 int FindClosestCanvasChartdbIndex(int scale);
666 void UpdateCanvasOnGroupChange(void);
667
668 void ShowObjectQueryWindow(int x, int y, float zlat, float zlon);
669 void ShowMarkPropertiesDialog(RoutePoint *markPoint);
670 void ShowRoutePropertiesDialog(wxString title, Route *selected);
671 void ShowTrackPropertiesDialog(Track *selected);
674 void DrawTCWindow(int x, int y, void *pIDX);
675
688 void ShowSingleTideDialog(int x, int y, void *pvIDX);
689
691 bool IsTideDialogOpen() const;
692
694 void CloseTideDialog();
695
696 void UpdateGPSCompassStatusBox(bool b_force_new);
697 ocpnCompass *GetCompass() { return m_Compass; }
698
699 wxColour GetFogColor() { return m_fog_color; }
700
701 void ShowChartInfoWindow(int x, int dbIndex);
702 void HideChartInfoWindow(void);
703 void ShowCompositeInfoWindow(int x, int n_charts, int scale,
704 const std::vector<int> &index_vector);
705
706 void StartMeasureRoute();
707 void CancelMeasureRoute();
708
709 bool DoCanvasUpdate(void);
710 void SelectQuiltRefdbChart(int db_index, bool b_autoscale = true);
711 void SelectQuiltRefChart(int selected_index);
712 double GetBestVPScale(ChartBase *pchart);
713 void selectCanvasChartDisplay(int type, int family);
714 void RemoveChartFromQuilt(int dbIndex);
715
716 void HandlePianoClick(int selected_index,
717 const std::vector<int> &selected_dbIndex_array);
718 void HandlePianoRClick(int x, int y, int selected_index,
719 const std::vector<int> &selected_dbIndex_array);
720 void HandlePianoRollover(int selected_index,
721 const std::vector<int> &selected_dbIndex_array,
722 int n_charts, int scale);
723 void ClearPianoRollover();
724 void UpdateCanvasControlBar(void);
725 void FormatPianoKeys(void);
726 void PianoPopupMenu(int x, int y, int selected_index,
727 const std::vector<int> &selected_dbIndex_array);
728 void OnPianoMenuDisableChart(wxCommandEvent &event);
729 void OnPianoMenuEnableChart(wxCommandEvent &event);
730
731 bool IsPianoContextMenuActive() { return m_piano_ctx_menu != 0; }
732 bool DoCanvasCOGSet(void);
733 void ApplyGlobalSettings();
734 void SetShowGPSCompassWindow(bool bshow);
735 bool GetShowGPSCompassWindow() { return m_bShowCompassWin; }
736 void FreezePiano() { m_pianoFrozen = true; }
737 void ThawPiano() { m_pianoFrozen = false; }
738 void StartChartDragInertia();
739 void SetupGridFont();
740
741 // Todo build more accessors
742 bool m_bFollow;
743 wxCursor *pCursorPencil;
744 wxCursor *pCursorArrow;
745 wxCursor *pCursorCross;
746 wxCursor *pPlugIn_Cursor;
747 TCWin *pCwin;
748 wxBitmap *pscratch_bm;
749 bool m_brepaint_piano;
782 wxPoint r_rband;
783 double m_prev_rlat;
784 double m_prev_rlon;
785 RoutePoint *m_prev_pMousePoint;
786 bool m_bShowNavobjects;
787 int m_routeState;
788 int m_upMode;
789 bool m_bLookAhead;
790
791#ifdef HAVE_WX_GESTURE_EVENTS
792 double m_oldVPSScale;
793 bool m_popupWanted;
794 bool m_leftdown;
795 wxPoint m_zoomStartPoint;
796#endif /* HAVE_WX_GESTURE_EVENTS */
797
798 void DrawBlinkObjects(void);
799
800 void StartRoute(void);
801 wxString FinishRoute(void);
802
803#ifdef ocpnUSE_GL
804 glChartCanvas *GetglCanvas() { return m_glcc; }
805#endif
806
807 bool CheckEdgePan(int x, int y, bool bdragging, int margin, int delta);
808
809 bool m_FinishRouteOnKillFocus;
810 bool m_bMeasure_DistCircle;
811 bool m_bAppendingRoute;
812 int m_nMeasureState;
813 Route *m_pMeasureRoute;
814 MyFrame *parent_frame;
815 CanvasMenuHandler *m_canvasMenu;
816 int GetMinAvailableGshhgQuality() {
817 return pWorldBackgroundChart->GetMinAvailableQuality();
818 }
819 int GetMaxAvailableGshhgQuality() {
820 return pWorldBackgroundChart->GetMaxAvailableQuality();
821 }
822 Route *GetSelectedRoute() const { return m_pSelectedRoute; }
823 Track *GetSelectedTrack() const { return m_pSelectedTrack; }
824 RoutePoint *GetSelectedRoutePoint() const { return m_pFoundRoutePoint; }
825
826 void SetAISCanvasDisplayStyle(int StyleIndx);
827 void TouchAISToolActive(void);
828 void UpdateAISTBTool(void);
829
830 void SelectChartFromStack(int index, bool bDir = false,
831 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
832 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
833 void SelectdbChart(int dbindex);
834
835 void DoCanvasStackDelta(int direction);
836
837 void ProcessNewGUIScale();
838
839 bool m_b_paint_enable;
840
841 wxRect GetScaleBarRect() { return m_scaleBarRect; }
842 void RenderAlertMessage(wxDC &dc, const ViewPort &vp);
843
844 std::vector<int> m_tile_noshow_index_array;
845 std::vector<int> m_tile_yesshow_index_array;
846 std::vector<int> m_quilt_noshow_index_array;
847
848 std::vector<int> GetQuiltNoshowIindexArray() {
849 return m_quilt_noshow_index_array;
850 }
860 double GetDisplayScale() { return m_displayScale; }
861 void ResetOwnshipOffset() { m_OSoffsetx = m_OSoffsety = 0; }
862 NotificationsList *GetNotificationsList() { return m_NotificationsList; }
863
864 int PrepareContextSelections(double lat, double lon);
865
866 RoutePoint *GetFoundRoutepoint() { return m_pFoundRoutePoint; }
867
873
874 bool m_inPinch;
875
876private:
890 void DoZoomCanvas(double factor, bool can_zoom_to_cursor = true);
891
892 int AdjustQuiltRefChart();
893 bool UpdateS52State();
894 void CallPopupMenu(int x, int y);
895 bool IsTempMenuBarEnabled();
896 bool InvokeCanvasMenu(int x, int y, int seltype);
897 void OnMenuTimer(wxTimerEvent &event);
898 wxTimer m_menuTimer;
899 wxPoint m_menuPos;
900 bool m_inLongPress;
901
902 ViewPort VPoint;
903 void PositionConsole(void);
904 wxWindow *m_nmea_log;
905
906 wxColour PredColor();
907 wxColour ShipColor();
908
909 void ComputeShipScaleFactor(float icon_hdt, int ownShipWidth,
910 int ownShipLength, wxPoint2DDouble &lShipMidPoint,
911 wxPoint &GpsOffsetPixels,
912 wxPoint2DDouble lGPSPoint, float &scale_factor_x,
913 float &scale_factor_y);
914
915 void ShipDrawLargeScale(ocpnDC &dc, wxPoint2DDouble lShipMidPoint);
916 void ShipIndicatorsDraw(ocpnDC &dc, int img_height, wxPoint GPSOffsetPixels,
917 wxPoint2DDouble lGPSPoint);
918
919 ChInfoWin *m_pCIWin;
920
921 bool m_bShowCurrent;
922 bool m_bShowTide;
923 int cursor_region;
924 bool m_bTCupdate;
925 wxString m_scaleText;
926 double m_scaleValue;
927 bool m_bShowScaleInStatusBar;
928 wxRect bbRect;
929
930 wxPoint LastShipPoint;
931 wxPoint LastPredPoint;
932 bool m_bDrawingRoute;
933 bool m_bRouteEditing;
934 bool m_bMarkEditing;
935 bool m_bRoutePoinDragging;
936 bool m_bIsInRadius;
937 bool m_bMayToggleMenuBar;
938
939 RoutePoint *m_pRoutePointEditTarget;
940 RoutePoint *m_lastRoutePointEditTarget;
941 SelectItem *m_pFoundPoint;
942 bool m_bChartDragging;
943 Route *m_pSelectedRoute;
944 Track *m_pSelectedTrack;
945 wxArrayPtrVoid *m_pEditRouteArray;
946 RoutePoint *m_pFoundRoutePoint;
947
948 int m_FoundAIS_MMSI;
949
950 wxCursor *pCursorLeft;
951 wxCursor *pCursorRight;
952 wxCursor *pCursorUp;
953 wxCursor *pCursorDown;
954
955 wxCursor *pCursorUpLeft;
956 wxCursor *pCursorUpRight;
957 wxCursor *pCursorDownLeft;
958 wxCursor *pCursorDownRight;
959
960 int popx, popy;
961
962 wxBitmap *pThumbDIBShow;
963 wxBitmap *pThumbShowing;
964
965 bool bShowingCurrent;
966 bool bShowingTide;
967
974 double m_canvas_scale_factor;
976 double m_pix_per_mm;
977 double m_display_size_mm;
978
979 double m_absolute_min_scale_ppm;
980
981 bool singleClickEventIsValid;
982 wxMouseEvent singleClickEvent;
983
984 std::vector<s57Sector_t> extendedSectorLegs;
985 wxFont m_overzoomFont;
986 int m_overzoomTextWidth;
987 int m_overzoomTextHeight;
988
989 // Methods
990 void OnActivate(wxActivateEvent &event);
991 void OnSize(wxSizeEvent &event);
992 void MouseTimedEvent(wxTimerEvent &event);
993 void MouseEvent(wxMouseEvent &event);
994 void ShipDraw(ocpnDC &dc);
995 void DrawArrow(ocpnDC &dc, int x, int y, double rot_angle, double scale);
996 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
997 void FindRoutePointsAtCursor(float selectRadius, bool setBeingEdited);
998
999 void RotateTimerEvent(wxTimerEvent &event);
1000 void PanTimerEvent(wxTimerEvent &event);
1001 void MovementTimerEvent(wxTimerEvent &);
1002 void MovementStopTimerEvent(wxTimerEvent &);
1003 void OnCursorTrackTimerEvent(wxTimerEvent &event);
1004
1005 void MovementVPTimerEvent(wxTimerEvent &event);
1006
1007 void DrawAllTracksInBBox(ocpnDC &dc, LLBBox &BltBBox);
1008 void DrawActiveTrackInBBox(ocpnDC &dc, LLBBox &BltBBox);
1009 void DrawAllRoutesInBBox(ocpnDC &dc, LLBBox &BltBBox);
1010 void DrawActiveRouteInBBox(ocpnDC &dc, LLBBox &BltBBox);
1011 void DrawAllWaypointsInBBox(ocpnDC &dc, LLBBox &BltBBox);
1012 void DrawAnchorWatchPoints(ocpnDC &dc);
1013 double GetAnchorWatchRadiusPixels(RoutePoint *pAnchorWatchPoint);
1014
1015 void DrawAllTidesInBBox(ocpnDC &dc, LLBBox &BBox);
1016 void DrawAllCurrentsInBBox(ocpnDC &dc, LLBBox &BBox);
1017 void RebuildTideSelectList(LLBBox &BBox);
1018 void RebuildCurrentSelectList(LLBBox &BBox);
1019
1020 void RenderAllChartOutlines(ocpnDC &dc, ViewPort &vp);
1021 void RenderChartOutline(ocpnDC &dc, int dbIndex, ViewPort &vp);
1022 void RenderRouteLegs(ocpnDC &dc);
1023 void RenderVisibleSectorLights(ocpnDC &dc);
1024
1025 void AlertDraw(ocpnDC &dc); // pjotrc 2010.02.22
1026
1027 void GridDraw(ocpnDC &dc); // Display lat/lon Grid in chart display
1028 void ScaleBarDraw(ocpnDC &dc);
1029
1030 void DrawOverlayObjects(ocpnDC &dc, const wxRegion &ru);
1031 void RenderShipToActive(ocpnDC &dc, bool Use_Opengl);
1032
1033 emboss_data *EmbossDepthScale();
1034 emboss_data *CreateEmbossMapData(wxFont &font, int width, int height,
1035 const wxString &str, ColorScheme cs);
1036 void CreateDepthUnitEmbossMaps(ColorScheme cs);
1037 wxBitmap CreateDimBitmap(wxBitmap &Bitmap, double factor);
1038
1039 void CreateOZEmbossMapData(ColorScheme cs);
1040 emboss_data *EmbossOverzoomIndicator(ocpnDC &dc);
1041 void SetOverzoomFont();
1042
1043 // void CreateCM93OffsetEmbossMapData(ColorScheme cs);
1044 // void EmbossCM93Offset ( wxMemoryDC *pdc);
1045
1046 void DrawEmboss(ocpnDC &dc, emboss_data *pemboss);
1047
1048 void ShowBrightnessLevelTimedPopup(int brightness, int min, int max);
1049 void HandleNotificationMouseClick();
1050
1051 // Data
1053 int m_canvas_width;
1055 int m_canvas_height;
1056
1057 int xr_margin; // chart scroll margins, control cursor, etc.
1058 int xl_margin;
1059 int yt_margin;
1060 int yb_margin;
1061
1062 wxPoint last_drag;
1063 wxPoint m_last_touch_down_pos;
1064
1065 wxMemoryDC *pmemdc;
1066
1067 int warp_x, warp_y;
1068 bool warp_flag;
1069
1070 wxTimer *
1071 pPanTimer; // This timer used for auto panning on route creation and edit
1072 wxTimer *
1073 pMovementTimer; // This timer used for smooth movement in non-opengl mode
1074 wxTimer *pMovementStopTimer; // This timer used to stop movement if a keyup
1075 // event is lost
1076 wxTimer *pCurTrackTimer; // This timer used to update the status window on
1077 // mouse idle
1078 wxTimer *pRotDefTimer; // This timer used to control rotaion rendering on
1079 // mouse moves
1080 wxTimer *m_DoubleClickTimer;
1081 wxTimer m_routeFinishTimer;
1082
1083 wxTimer m_RolloverPopupTimer;
1084
1085 wxTimer m_VPMovementTimer;
1086
1087 int m_wheelzoom_stop_oneshot;
1088 int m_last_wheel_dir;
1089 wxStopWatch m_wheelstopwatch;
1090 double m_zoom_target;
1091
1092 int m_curtrack_timer_msec;
1093 int m_rollover_popup_timer_msec;
1094
1095 GSHHSChart *pWorldBackgroundChart;
1096
1097 ChartBaseBSB *pCBSB;
1098 wxBitmap *pss_overlay_bmp;
1099 wxMask *pss_overlay_mask;
1100
1101 wxRect ship_draw_rect;
1102 wxRect ship_draw_last_rect;
1103 wxRect ais_draw_rect;
1104 wxRect alert_draw_rect; // pjotrc 2010.02.22
1105
1106 wxBitmap *proute_bm; // a bitmap and dc used to calculate route bounding box
1107 wxMemoryDC m_dc_route; // seen in mouse->edit->route
1108
1109 emboss_data *m_pEM_Feet; // maps for depth unit emboss pattern
1110 emboss_data *m_pEM_Meters;
1111 emboss_data *m_pEM_Fathoms;
1112
1113 emboss_data *m_pEM_OverZoom;
1114 // emboss_data *m_pEM_CM93Offset; // Flav
1115
1131 double m_true_scale_ppm;
1132
1133 ownship_state_t m_ownship_state;
1134
1135 ColorScheme m_cs;
1136
1137 wxBitmap m_bmTideDay;
1138 wxBitmap m_bmTideDusk;
1139 wxBitmap m_bmTideNight;
1140 wxBitmap m_bmCurrentDay;
1141 wxBitmap m_bmCurrentDusk;
1142 wxBitmap m_bmCurrentNight;
1143 wxBitmap m_cTideBitmap;
1144 wxBitmap m_cCurrentBitmap;
1145
1146 RolloverWin *m_pRouteRolloverWin;
1147 RolloverWin *m_pTrackRolloverWin;
1148 RolloverWin *m_pAISRolloverWin;
1149
1150 TimedPopupWin *m_pBrightPopup;
1151
1152 wxImage m_os_image_red_day;
1153 wxImage m_os_image_red_dusk;
1154 wxImage m_os_image_red_night;
1155 wxImage m_os_image_grey_day;
1156 wxImage m_os_image_grey_dusk;
1157 wxImage m_os_image_grey_night;
1158 wxImage m_os_image_yellow_day;
1159 wxImage m_os_image_yellow_dusk;
1160 wxImage m_os_image_yellow_night;
1161
1162 wxImage *m_pos_image_red;
1163 wxImage *m_pos_image_grey;
1164 wxImage *m_pos_image_yellow;
1165
1166 wxImage *m_pos_image_user;
1167 wxImage *m_pos_image_user_grey;
1168 wxImage *m_pos_image_user_yellow;
1169
1170 wxImage *m_pos_image_user_day;
1171 wxImage *m_pos_image_user_dusk;
1172 wxImage *m_pos_image_user_night;
1173 wxImage *m_pos_image_user_grey_day;
1174 wxImage *m_pos_image_user_grey_dusk;
1175 wxImage *m_pos_image_user_grey_night;
1176 wxImage *m_pos_image_user_yellow_day;
1177 wxImage *m_pos_image_user_yellow_dusk;
1178 wxImage *m_pos_image_user_yellow_night;
1179
1180 wxImage m_ship_pix_image; // cached ship draw image for high overzoom
1181 int m_cur_ship_pix;
1182 bool m_cur_ship_pix_isgrey;
1183 ColorScheme m_ship_cs;
1184
1185 ViewPort m_cache_vp;
1186 wxBitmap *m_prot_bm;
1187 wxPoint m_roffset;
1188
1189 bool m_b_rot_hidef;
1190
1191 SelectItem *m_pRolloverRouteSeg;
1192 SelectItem *m_pRolloverTrackSeg;
1193
1194 double m_wheel_lat, m_wheel_lon;
1195 int m_wheel_x, m_wheel_y;
1196
1197 ViewPort m_bm_cache_vp;
1198 wxBitmap m_working_bm; // Used to build quilt in OnPaint()
1199 wxBitmap m_cached_chart_bm; // A cached copy of the fully drawn quilt
1200
1201 bool m_bbrightdir;
1202 int m_brightmod;
1203
1204 bool m_bzooming, m_bzooming_to_cursor;
1205 IDX_entry *m_pIDXCandidate;
1206
1207 // #ifdef ocpnUSE_GL
1208 glChartCanvas *m_glcc;
1209 // #endif
1210
1211 // Smooth movement member variables
1212 wxPoint m_pan_drag;
1213 int m_panx, m_pany, m_modkeys;
1214 double m_panspeed;
1215 bool m_bmouse_key_mod;
1216 double m_zoom_factor, m_rotation_speed;
1222 int m_mustmove;
1223
1224 wxDateTime m_last_movement_time;
1225
1226 int m_AISRollover_MMSI;
1227 bool m_bsectors_shown;
1228 bool m_bedge_pan;
1229 double m_displayed_scale_factor;
1230
1231 wxColour m_fog_color;
1232 bool m_disable_edge_pan;
1233 wxFont *m_pgridFont;
1234
1235 bool m_dragoffsetSet;
1236
1237 bool m_bautofind;
1238 bool m_bFirstAuto;
1239 double m_vLat, m_vLon;
1240 ChartStack *m_pCurrentStack;
1241 Piano *m_Piano;
1242 bool m_bpersistent_quilt;
1243
1244 wxMenu *m_piano_ctx_menu;
1245 int menu_selected_dbIndex, menu_selected_index;
1246
1247 ocpnCompass *m_Compass;
1248 bool m_bShowGPS;
1253 bool m_mouseWasInCompass;
1254
1255 wxRect m_mainlast_tb_rect;
1256 int m_restore_dbindex;
1257 int m_restore_group;
1258
1259 MUIBar *m_muiBar;
1260 wxSize m_muiBarHOSize;
1261
1262 bool m_bShowOutlines;
1263 bool m_bDisplayGrid;
1264 bool m_bShowDepthUnits;
1265 bool m_bShowAIS;
1266 bool m_bShowAISScaled;
1267
1268 // S52PLib state storage
1269 long m_s52StateHash;
1270 bool m_encShowText;
1271 bool m_encShowDepth;
1272 bool m_encShowLightDesc;
1273 bool m_encShowBuoyLabels;
1274 int m_encDisplayCategory;
1275 bool m_encShowLights;
1276 bool m_encShowAnchor;
1277 bool m_encShowDataQual;
1278
1279 wxTimer m_deferredFocusTimer;
1280 float m_focus_indicator_pix;
1281 bool m_bENCGroup;
1282 bool m_last_TBviz;
1283
1284 double m_OSoffsetx, m_OSoffsety;
1285 bool m_MouseDragging;
1286
1287 wxString m_alertString;
1288 wxRect m_scaleBarRect;
1289 bool m_bShowCompassWin;
1290 bool m_pianoFrozen;
1291
1292 double m_sector_glat, m_sector_glon;
1293 std::vector<s57Sector_t> m_sectorlegsVisible;
1294 bool m_bShowVisibleSectors;
1296 double m_displayScale;
1297 bool m_show_focus_bar;
1298
1299 double m_panx_target_final;
1300 double m_pany_target_final;
1301 double m_panx_target_now;
1302 double m_pany_target_now;
1303
1304 double m_start_lat, m_start_lon;
1305 double m_target_lat, m_target_lon;
1306 double m_run_lat, m_run_lon;
1307 bool m_timed_move_vp_active;
1308 int m_timedVP_step;
1309 int m_stvpc;
1310
1311 double meters_to_shift = 0;
1312 double dir_to_shift = 0;
1313
1314 // Chart drag inertia support
1315 wxTimer m_chart_drag_inertia_timer;
1316 void OnChartDragInertiaTimer(wxTimerEvent &event);
1317
1318 uint64_t m_last_drag_time;
1319 int m_chart_drag_total_x;
1320 int m_chart_drag_total_y;
1321 double m_chart_drag_total_time;
1322 double m_chart_drag_velocity_x;
1323 double m_chart_drag_velocity_y;
1324 wxLongLong m_chart_drag_inertia_time;
1325 wxLongLong m_chart_drag_inertia_start_time;
1326 bool m_chart_drag_inertia_active;
1327 double m_last_elapsed;
1328 std::vector<int> m_drag_vec_x;
1329 std::vector<int> m_drag_vec_y;
1330 std::vector<double> m_drag_vec_t;
1331 int m_inertia_last_drag_x;
1332 int m_inertia_last_drag_y;
1333
1334 // For Jump animation
1335 wxTimer m_easeTimer;
1336 wxLongLong m_animationStart;
1337 wxLongLong m_animationDuration; // e.g. 300 ms
1338 double m_startLat, m_startLon, m_startScale;
1339 double m_endLat, m_endLon, m_endScale;
1340 bool m_animationActive;
1341 void OnJumpEaseTimer(wxTimerEvent &event);
1342 bool StartSmoothJump(double lat, double lon, double scale_ppm);
1343 bool m_disable_adjust_on_zoom;
1344
1345 NotificationButton *m_notification_button;
1346 NotificationsList *m_NotificationsList;
1347 ObservableListener evt_notificationlist_change_listener;
1348
1349 wxStopWatch m_sw_left_down;
1350 wxStopWatch m_sw_left_up;
1351 long m_sw_down_time;
1352 long m_sw_up_time;
1353 wxTimer m_tap_timer;
1354 wxPoint m_lastTapPos;
1355 int m_tap_count;
1356 void OnTapTimer(wxTimerEvent &event);
1357
1358 DECLARE_EVENT_TABLE()
1359};
1360
1361// CUSTOMIZATION - FORMAT MINUTES
1362
1363wxString minutesToHoursDays(float timeInMinutes);
1364
1365// END OF CUSTOMIZATION - FORMAT MINUTES
1366
1371#ifndef wxCLOSE_BOX
1372#define wxCLOSE_BOX 0x1000
1373#endif
1374#ifndef wxFIXED_MINSIZE
1375#define wxFIXED_MINSIZE 0
1376#endif
1377
1378#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:1309
ChartCanvas * g_overlayCanvas
Global instance.
Definition chcanv.cpp:1308
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:13671
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:4508
float GetVPChartScale()
Return the ViewPort chart scale denominator (e.g., 50000 for a 1:50000 scale).
Definition chcanv.h:475
void OnPaint(wxPaintEvent &event)
Definition chcanv.cpp:11715
bool GetCanvasPointPix(double rlat, double rlon, wxPoint *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) rounded to nearest integer.
Definition chcanv.cpp:4504
void DoMovement(long dt)
Performs a step of smooth movement animation on the chart canvas.
Definition chcanv.cpp:3602
void ShowSingleTideDialog(int x, int y, void *pvIDX)
Display tide/current dialog with single-instance management.
Definition chcanv.cpp:13630
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:4454
double m_cursor_lat
The latitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:781
double GetCanvasScaleFactor()
Return the number of logical pixels per meter for the screen.
Definition chcanv.h:484
double GetPixPerMM()
Get the number of logical pixels per millimeter on the screen.
Definition chcanv.h:515
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:860
void SetDisplaySizeMM(double size)
Set the width of the screen in millimeters.
Definition chcanv.cpp:2337
int PrepareContextSelections(double lat, double lon)
Definition chcanv.cpp:8002
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)
Definition chcanv.cpp:7812
bool PanCanvas(double dx, double dy)
Pans (moves) the canvas by the specified physical pixels in x and y directions.
Definition chcanv.cpp:5036
float GetVPScale()
Return the ViewPort scale factor, in physical pixels per meter.
Definition chcanv.h:472
EventVar json_msg
Notified with message targeting all plugins.
Definition chcanv.h:872
void ZoomCanvasSimple(double factor)
Perform an immediate zoom operation without smooth transitions.
Definition chcanv.cpp:4585
bool SetVPScale(double sc, bool b_refresh=true)
Sets the viewport scale while maintaining the center point.
Definition chcanv.cpp:5316
double m_cursor_lon
The longitude in degrees corresponding to the most recently processed cursor position.
Definition chcanv.h:765
void GetCanvasPixPoint(double x, double y, double &lat, double &lon)
Convert canvas pixel coordinates (physical pixels) to latitude/longitude.
Definition chcanv.cpp:4529
bool IsTideDialogOpen() const
Definition chcanv.cpp:13669
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:4591
void DrawTCWindow(int x, int y, void *pIDX)
Legacy tide dialog creation method.
Definition chcanv.cpp:13626
void GetDoubleCanvasPointPix(double rlat, double rlon, wxPoint2DDouble *r)
Convert latitude/longitude to canvas pixel coordinates (physical pixels) with double precision.
Definition chcanv.cpp:4449
bool SetViewPoint(double lat, double lon)
Centers the view on a specific lat/lon position.
Definition chcanv.cpp:5335
bool MouseEventProcessCanvas(wxMouseEvent &event)
Processes mouse events for core chart panning and zooming operations.
Definition chcanv.cpp:10142
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.