OpenCPN Partial API docs
Loading...
Searching...
No Matches
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
37class ChartCanvas;
38class wxFileConfig;
39
46public:
48 canvasConfig(int index);
50
57 void Reset();
58 void LoadFromLegacyConfig(wxFileConfig *conf);
59
60 int configIndex;
62 double iLat;
63 double iLon;
64 double iScale;
65 double iRotation;
66 int DBindex;
67 int GroupID;
68 bool bFollow;
69 bool bQuilt;
72 wxSize canvasSize;
73 bool bShowGrid;
76 bool bCourseUp;
77 bool bHeadUp;
79 bool bShowAIS;
80 bool bAttenAIS;
81 // ENC options
83 int nENCDisplayCategory;
84 bool bShowENCDepths;
85 bool bShowENCBuoyLabels;
86 bool bShowENCLightDescriptions;
87 bool bShowENCLights;
88 bool bShowENCVisibleSectorLights;
89 bool bShowENCAnchorInfo;
90 bool bShowENCDataQuality;
91};
92
93WX_DEFINE_ARRAY_PTR(canvasConfig *, arrayofCanvasConfigPtr);
94
95#endif
Chart display canvas.
Definition chcanv.h:135
Encapsulates persistent canvas configuration.
double iLat
Latitude of the center of the chart, in degrees.
bool bShowOutlines
Display chart outlines.
wxSize canvasSize
Canvas dimensions.
void Reset()
Resets all configuration options to default values.
bool bShowDepthUnits
Display depth unit indicators.
double iLon
Longitude of the center of the chart, in degrees.
double iRotation
Initial rotation angle in radians.
bool bCourseUp
Orient display to course up.
bool bQuilt
Enable chart quilting.
bool bFollow
Enable vessel following mode.
double iScale
Initial chart scale factor.
bool bShowENCText
Display ENC text elements.
bool bShowAIS
Display AIS targets.
bool bShowGrid
Display coordinate grid.
ChartCanvas * canvas
Pointer to associated chart canvas.
bool bShowCurrents
Display current information.
bool bShowTides
Display tide information.
bool bLookahead
Enable lookahead mode.
bool bHeadUp
Orient display to heading up.
bool bAttenAIS
Enable AIS target attenuation.