OpenCPN Partial API docs
CanvasOptions.h
1 /******************************************************************************
2  *
3  * Project: OpenCPN
4  * Purpose: Canvas Options Window/Dialog
5  * Author: David Register
6  *
7  ***************************************************************************
8  * Copyright (C) 2018 by David S. Register *
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this program; if not, write to the *
22  * Free Software Foundation, Inc., *
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24  ***************************************************************************
25  */
26 
27 #ifndef __canvasoption_H__
28 #define __canvasoption_H__
29 
30 //----------------------------------------------------------------------------
31 // constants
32 //----------------------------------------------------------------------------
33 enum {
34  IDCO_SHOWDEPTHUNITSBOX1 = 31000,
35  IDCO_OUTLINECHECKBOX1,
36  IDCO_CHECK_DISPLAYGRID,
37  IDCO_ZTCCHECKBOX,
38  IDCO_SMOOTHPANZOOMBOX,
39  IDCO_PRESERVECHECKBOX,
40  IDCO_QUILTCHECKBOX1,
41  IDCO_CHECK_LOOKAHEAD,
42  IDCO_COURSEUPCHECKBOX,
43  IDCO_HEADUPCHECKBOX,
44  IDCO_TIDES_CHECKBOX,
45  IDCO_CURRENTS_CHECKBOX,
46  IDCO_ENCTEXT_CHECKBOX1,
47  ID_TOOLBARCHECKBOX,
48  ID_CODISPCAT,
49  IDCO_ENCDEPTH_CHECKBOX1,
50  IDCO_ENCBUOY_CHECKBOX1,
51  IDCO_ENCBUOYLABEL_CHECKBOX1,
52  IDCO_ENCANCHOR_CHECKBOX1,
53  IDCO_SHOW_AIS_CHECKBOX,
54  IDCO_ATTEN_AIS_CHECKBOX,
55  IDCO_ENCVISIBLESECTORS_CHECKBOX1,
56  IDCO_ENCDATAQUALITY_CHECKBOX,
57 };
58 
59 class MyFrame;
60 class ChartCanvas;
61 
62 //----------------------------------------------------------------------------
63 // CanvasOptions
64 //----------------------------------------------------------------------------
65 
66 class CanvasOptions : public wxDialog {
67 public:
68  CanvasOptions(wxWindow *parent);
69 
70  void OnClose(wxCloseEvent &event);
71  void OnOptionChange(wxCommandEvent &event);
72 
73  void RefreshControlValues(void);
74  void UpdateCanvasOptions(void);
75  void OnEraseBackground(wxEraseEvent &event);
76  void SetENCAvailable(bool avail);
77 
78 private:
79  int m_style;
80  bool m_ENCAvail;
81  wxScrolledWindow *m_sWindow;
82 
83  wxCheckBox *pShowStatusBar, *pShowMenuBar, *pShowChartBar, *pShowCompassWin;
84  wxCheckBox *pPrintShowIcon, *pCDOOutlines, *pSDepthUnits, *pSDisplayGrid;
85  wxCheckBox *pAutoAnchorMark, *pCDOQuilting, *pCBRaster, *pCBVector;
86  wxCheckBox *pCBCM93, *pCBLookAhead, *pSkewComp, *pOpenGL, *pSmoothPanZoom;
87  wxCheckBox *pFullScreenQuilt, *pMobile, *pResponsive, *pOverzoomEmphasis;
88  wxCheckBox *pOZScaleVector, *pToolbarAutoHideCB, *pInlandEcdis;
89  wxTextCtrl *pCOGUPUpdateSecs, *m_pText_OSCOG_Predictor, *pScreenMM;
90  wxTextCtrl *pToolbarHideSecs, *m_pText_OSHDT_Predictor;
91  wxChoice *m_pShipIconType, *m_pcTCDatasets;
92  wxSlider *m_pSlider_Zoom, *m_pSlider_GUI_Factor, *m_pSlider_Chart_Factor,
93  *m_pSlider_Ship_Factor;
94  wxSlider *m_pSlider_Zoom_Vector;
95  wxRadioButton *pCBCourseUp, *pCBNorthUp, *pCBHeadUp, *pRBSizeAuto,
96  *pRBSizeManual;
97  wxCheckBox *pEnableZoomToCursor, *pPreserveScale;
98 
99  wxCheckBox *pCDOTides, *pCDOCurrents;
100  wxCheckBox *pCDOENCText, *pCBToolbar;
101  wxChoice *m_pDispCat;
102  wxCheckBox *pCBENCDepth, *pCBENCLightDesc, *pCBENCBuoyLabels, *pCBENCLights,
103  *pCBENCAnchorDetails;
104  wxCheckBox *pCBShowAIS, *pCBAttenAIS, *pCBENCVisibleSectors, *pCBENCDataQuality;
105 
106  DECLARE_EVENT_TABLE()
107 };
108 
109 #endif // guard