OpenCPN Partial API docs
config_vars.cpp
1 /******************************************************************************
2  *
3  * Project: OpenCPN
4  *
5  ***************************************************************************
6  * Copyright (C) 2023 Alec Leamas *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22  ***************************************************************************
23  */
24 #include "model/config_vars.h"
25 #include "config.h"
26 
27 bool g_bAISRolloverShowClass = false;
28 bool g_bAISRolloverShowCOG = false;
29 bool g_bAISRolloverShowCPA = false;
30 bool g_bAllowShipToActive = false;
31 bool g_benableUDPNullHeader = false;
32 bool g_bOverruleScaMin = false;
33 bool g_bGarminHostUpload = false;
34 bool g_bInlandEcdis = false;
35 bool g_bMagneticAPB = false;
36 bool g_bShowWptName = false;
37 bool g_bUserIconsFirst = true;
38 bool g_btouch = false;
39 bool g_bShowMag = false;
40 bool g_bShowTrue = false;
41 bool g_bTrackDaily = false;
42 bool g_bUseWptScaMin = false;
43 bool g_bWplUsePosition = false;
44 bool g_persist_active_route = false;
45 
46 double g_n_arrival_circle_radius = 0.0;
47 double g_PlanSpeed = 0.0;
48 double g_TrackDeltaDistance = 0.0;
49 double g_UserVar = 0.0;
50 
51 float g_fWaypointRangeRingsStep = 0.0;
52 float g_GLMinSymbolLineWidth = 0.0;
53 float g_selection_radius_mm = 2.0;
54 float g_selection_radius_touch_mm = 10.0;
55 
56 int g_iDistanceFormat = 0;
57 int g_iSDMMFormat = 0;
58 int g_iSpeedFormat = 0;
59 int g_iWindSpeedFormat = 0;
60 int g_iTempFormat = 0;
61 int g_iWpt_ScaMin = 0;
62 int g_iWaypointRangeRingsNumber = 0;
63 int g_iWaypointRangeRingsStepUnits = 0;
64 int g_maxWPNameLength;
65 int g_mbtilesMaxLayers = 2;
66 int g_NMEAAPBPrecision = 3;
67 int g_nCOMPortCheck = 32;
68 int g_nDepthUnitDisplay = 0;
69 int g_nNMEADebug = 0;
70 int g_nTrackPrecision = 0;
71 int g_route_line_width = 0;
72 int g_track_line_width = 0;
73 int g_trackFilterMax = 0;
74 int g_WplAction = 0;
75 int gps_watchdog_timeout_ticks = 0;
76 int sat_watchdog_timeout_ticks = 12;
77 
78 wxString g_active_route;
79 wxString g_catalog_channel;
80 wxString g_catalog_custom_url;
81 wxString g_compatOS = PKG_TARGET;
82 wxString g_compatOsVersion = PKG_TARGET_VERSION;
83 wxString g_default_routepoint_icon;
84 wxString g_GPS_Ident;
85 wxString g_hostname;
86 wxString g_SART_sound_file;
87 wxString g_TalkerIdText;
88 wxString g_winPluginDir;
89 
90 static wxConfigBase* the_base_config = 0;
91 
92 wxConfigBase* TheBaseConfig() {
93  wxASSERT_MSG(the_base_config != 0, "Uninitialized the_base_config");
94  return the_base_config;
95 }
96 void InitBaseConfig(wxConfigBase* cfg) { the_base_config = cfg; }