OpenCPN Partial API docs
CanvasConfig.h
1 /***************************************************************************
2  *
3  * Project: OpenCPN
4  * Purpose: Canvas Configuration
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 #ifndef __CANVCONFIG_H__
27 #define __CANVCONFIG_H__
28 
29 #include "wx/wxprec.h"
30 
31 #ifndef WX_PRECOMP
32 #include "wx/wx.h"
33 #endif
34 
35 #include "s52s57.h"
36 
37 class ChartCanvas;
38 class wxFileConfig;
39 
40 // Class to encapsulate persistant canvas configuration(s)
41 class canvasConfig {
42 public:
43  canvasConfig();
44  canvasConfig(int index);
45  ~canvasConfig();
46 
47  void Reset();
48  void LoadFromLegacyConfig(wxFileConfig *conf);
49 
50  int configIndex;
51  ChartCanvas *canvas;
52  double iLat, iLon, iScale, iRotation;
53  int DBindex;
54  int GroupID;
55  bool bFollow;
56  bool bQuilt;
57  bool bShowTides;
58  bool bShowCurrents;
59  wxSize canvasSize;
60  bool bShowGrid;
61  bool bShowOutlines;
62  bool bShowDepthUnits;
63  bool bCourseUp;
64  bool bHeadUp;
65  bool bLookahead;
66  bool bShowAIS;
67  bool bAttenAIS;
68  // ENC options
69  bool bShowENCText;
70  int nENCDisplayCategory;
71  bool bShowENCDepths;
72  bool bShowENCBuoyLabels;
73  bool bShowENCLightDescriptions;
74  bool bShowENCLights;
75  bool bShowENCVisibleSectorLights;
76  bool bShowENCAnchorInfo;
77  bool bShowENCDataQuality;
78 };
79 
80 WX_DEFINE_ARRAY_PTR(canvasConfig *, arrayofCanvasConfigPtr);
81 
82 #endif