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 {
43 public:
44     canvasConfig();
45     canvasConfig(int index);
46     ~canvasConfig();
47 
48     void Reset();
49     void LoadFromLegacyConfig( wxFileConfig *conf );
50 
51     int configIndex;
52     ChartCanvas *canvas;
53     double iLat, iLon, iScale, iRotation;
54     int DBindex;
55     int GroupID;
56     bool bFollow;
57     bool bQuilt;
58     bool bShowTides;
59     bool bShowCurrents;
60     wxSize canvasSize;
61     bool bShowGrid;
62     bool bShowOutlines;
63     bool bShowDepthUnits;
64     bool bCourseUp;
65     bool bHeadUp;
66     bool bLookahead;
67     bool bShowAIS;
68     bool bAttenAIS;
69     // ENC options
70     bool bShowENCText;
71     int  nENCDisplayCategory;
72     bool bShowENCDepths;
73     bool bShowENCBuoyLabels;
74     bool bShowENCLightDescriptions;
75     bool bShowENCLights;
76 
77 
78 
79 };
80 
81 WX_DEFINE_ARRAY_PTR(canvasConfig*, arrayofCanvasConfigPtr);
82 
83 #endif
84