OpenCPN Partial API docs
Loading...
Searching...
No Matches
config_vars.cpp
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2023 - 2025 Alec Leamas *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#include <vector>
25
26#include "model/config_vars.h"
27#include "config.h"
28
30bool g_bAISRolloverShowClass = false;
31bool g_bAISRolloverShowCOG = false;
32bool g_bAISRolloverShowCPA = false;
33bool g_bAllowShipToActive = false;
34bool g_bAutoAnchorMark = false;
35bool g_bAutoHideToolbar = false;
36bool g_bBasicMenus = false;
37bool g_bConfirmObjectDelete = false;
38bool g_bCourseUp = false;
39bool g_bDebugCM93 = false;
40bool g_bDebugOGL = false;
41bool g_bDisplayGrid = false;
42bool g_bEmailCrashReport = false;
43bool g_benable_rotate = false;
44bool g_benableUDPNullHeader = false;
45bool g_bEnableZoomToCursor = false;
46bool g_bfilter_cogsog = false;
47bool g_bframemax = false;
48bool g_bFullscreen = false;
49bool g_bFullScreenQuilt = true;
50bool g_bFullscreenToolbar = false;
51bool g_bGarminHostUpload = false;
52bool g_bGLexpert = false;
53bool g_bHighliteTracks = false;
54bool g_bInlandEcdis = false;
55bool g_bLookAhead = false;
56bool g_bMagneticAPB = false;
57bool g_bopengl = false;
58bool g_bOverruleScaMin = false;
59bool g_bPermanentMOBIcon = false;
60bool g_bPlayShipsBells = false;
61bool g_bPreserveScaleOnX = false;
62bool g_bQuiltEnable = false;
63bool g_bQuiltStart = false;
64bool g_bresponsive = false;
65bool g_bRollover = false;
66bool g_bShowActiveRouteHighway = false;
67bool g_bShowChartBar = false;
68bool g_bShowCompassWin = false;
69bool g_bShowDepthUnits = false;
70bool g_bShowDetailSlider = false;
71bool g_bShowLayers = false;
72bool g_bShowLiveETA = false;
73bool g_bShowMag = false;
74bool g_bShowMenuBar = false;
75bool g_bShowOutlines = false;
76bool g_bShowRouteTotal = false;
77bool g_bShowShipToActive = false;
78bool g_bShowStatusBar = false;
79bool g_bShowTrackPointTime = false;
80bool g_bShowTrue = false;
81bool g_bShowWptName = false;
82bool g_bsimplifiedScalebar = false;
83bool g_bskew_comp = false;
84bool g_bsmoothpanzoo = false;
85bool g_bsmoothpanzoom = false;
86bool g_bSoftwareGL = false;
87bool g_bSpaceDropMark = false;
88bool g_btenhertz = false;
89bool g_btouch = false;
90bool g_bTrackDaily = false;
91bool g_bUIexpert = false;
92bool g_bUseGLL = true;
93bool g_bUserIconsFirst = true;
94bool g_bUseWptScaMin = false;
95bool g_bWayPointPreventDragging = false;
96bool g_bWplUsePosition = false;
97bool g_config_display_size_manual = false;
98bool g_enable_root_menu_debug = false;
99bool g_own_ship_sog_cog_calc = false;
100bool g_persist_active_route = false;
101bool g_useMUI = false;
102bool s_bSetSystemTime = false;
103
104double g_COGAvg = 0.0;
105double g_defaultBoatSpeed = 0.0;
106double g_display_size_mm = 0.0;
107double g_mouse_zoom_sensitivity = 0.0;
108double g_n_arrival_circle_radius = 0.0;
109double g_n_gps_antenna_offset_x = 0.0;
110double g_n_gps_antenna_offset_y = 0.0;
111double g_n_ownship_beam_meters = 0.0;
112double g_n_ownship_length_meters = 0.0;
113double g_ownship_HDTpredictor_miles = 0.0;
114double g_ownship_predictor_minutes = 0.0;
115double g_PlanSpeed = 0.0;
116double g_plus_minus_zoom_factor = 0.0;
117double g_TrackDeltaDistance = 0.0;
118double g_TrackIntervalSeconds = 0.0;
119double g_UserVar = 0.0;
120
121float g_fNavAidRadarRingsStep = 0.0;
122float g_fWaypointRangeRingsStep = 0.0;
123float g_GLMinSymbolLineWidth = 0.0;
124float g_selection_radius_mm = 2.0;
125float g_selection_radius_touch_mm = 10.0;
126float g_ShipScaleFactorExp = 0.0;
127
128int g_ais_cog_predictor_width = 0;
129int g_ChartScaleFactor = 0;
130int g_chart_zoom_modifier_raster = 0;
131int g_chart_zoom_modifier_vector = 0;
132int g_cm93_zoom_factor = 0;
133int g_COGAvgSec = 15;
134int g_COGFilterSec = 1;
135int g_cog_predictor_endmarker = 0;
136int g_cog_predictor_style = 0;
137int g_cog_predictor_width = 0;
138int g_default_font_size = 0;
139int g_detailslider_dialog_x = 0;
140int g_detailslider_dialog_y = 0;
141int g_ENCSoundingScaleFactor = 0;
142int g_ENCTextScaleFactor = 0;
143int g_GUIScaleFactor = 0;
144int g_iDistanceFormat = 0;
145int g_iENCToolbarPosX = 0;
146int g_iENCToolbarPosY = 0;
147int g_iNavAidRadarRingsNumberVisible = 0;
148int g_iSDMMFormat = 0;
149int g_iSoundDeviceIndex = 0;
150int g_iSpeedFormat = 0;
151int g_iTempFormat = 0;
152int g_iWaypointRangeRingsNumber = 0;
153int g_iWaypointRangeRingsStepUnits = 0;
154int g_iWindSpeedFormat = 0;
155int g_iWpt_ScaMin = 0;
156int g_lastClientRecth = 0;
157int g_lastClientRectw = 0;
158int g_lastClientRectx = 0;
159int g_lastClientRecty = 0;
160int g_maintoolbar_x = 0;
161int g_maintoolbar_y = 0;
162int g_maxWPNameLength;
163int g_maxzoomin = 0;
164int g_mbtilesMaxLayers = 2;
165int g_memCacheLimit = 0;
166int g_MemFootMB = 0;
167int g_nAutoHideToolbar = 0;
168int g_navobjbackups = 1;
169int g_nAWDefault = 0;
170int g_nAWMax = 0;
171int g_nbrightness = 100;
172int g_nCacheLimit = 0;
173int g_nCOMPortCheck = 32;
174int g_nDepthUnitDisplay = 0;
175int g_netmask_bits = 24;
176int g_nframewin_posx = 0;
177int g_nframewin_posy = 0;
178int g_nframewin_x = 0;
179int g_nframewin_y = 0;
180int g_NMEAAPBPrecision = 3;
181int g_nNMEADebug = 0;
182int g_n_ownship_min_mm = 0;
183int g_nTrackPrecision = 0;
184int g_ownship_HDTpredictor_endmarker = 0;
185int g_ownship_HDTpredictor_style = 0;
186int g_ownship_HDTpredictor_width = 0;
187int g_OwnShipIconType = 0;
188int g_own_ship_sog_cog_calc_damp_sec = 0;
189int g_pNavAidRadarRingsStepUnits = 0;
190int gps_watchdog_timeout_ticks = 0;
191int g_restore_dbindex = 0;
192int g_restore_stackindex = 0;
193int g_route_line_width = 0;
194int g_S57_dialog_sx = 0;
195int g_S57_dialog_sy = 0;
196int g_SENC_LOD_pixels = 0;
197int g_ShipScaleFactor = 0;
198int g_shipToActiveColor = 0;
199int g_shipToActiveStyle = 0;
200int g_SkewCompUpdatePeriod = 0;
201int g_SOGFilterSec = 0;
202int g_trackFilterMax = 0;
203int g_track_line_width = 0;
204int g_WplAction = 0;
205int sat_watchdog_timeout_ticks = 12;
206
207long g_maintoolbar_orient = 0L;
208
209unsigned g_canvasConfig = 0;
210
211wxString g_active_route;
212wxString g_AW1GUID;
213wxString g_AW2GUID;
214wxString g_catalog_channel;
215wxString g_catalog_custom_url;
216wxString g_compatOS = PKG_TARGET;
217wxString g_compatOsVersion = PKG_TARGET_VERSION;
219wxString g_default_routepoint_icon;
220wxString g_default_wp_icon;
221wxString g_GPS_Ident;
222wxString g_gpx_path;
223wxString g_hostname;
224wxString g_SART_sound_file;
225wxString g_TalkerIdText;
227wxString gWorldMapLocation;
228wxString gWorldShapefileLocation;
229wxString g_uploadConnection;
230wxString g_cog_predictor_color;
231wxString g_ownship_HDTpredictor_color;
232wxString g_CmdSoundString;
233wxString g_ObjQFileExt;
234wxString g_toolbarConfig = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
235wxString g_locale;
236wxString g_localeOverride;
237wxString g_UserPresLibData;
238wxString g_TCData_Dir;
239wxString g_uiStyle;
240
241static wxConfigBase* the_base_config = 0;
242
243wxConfigBase* TheBaseConfig() {
244 wxASSERT_MSG(the_base_config != 0, "Uninitialized the_base_config");
245 return the_base_config;
246}
247void InitBaseConfig(wxConfigBase* cfg) { the_base_config = cfg; }
248
249std::vector<size_t> g_config_display_size_mm;
wxString g_datetime_format
Date/time format to use when formatting date/time strings.
bool g_always_send_rmb_rmc
Always send RMB and RMC n0183 messages even if there is no active route.
bool g_bsmoothpanzoom
Controls how the chart panning and zooming smoothing is done during user interactions.
wxString g_winPluginDir
Base plugin directory on Windows.
bool g_bRollover
enable/disable mouse rollover GUI effects
double g_COGAvg
Debug only usage.
int g_COGAvgSec
COG average period for Course Up Mode (sec)
std::vector< size_t > g_config_display_size_mm
g_config_display_size_mm: Size of pysical screen in millimeters.
bool g_bDisplayGrid
Should lat/lon grid be displayed ?
double g_display_size_mm
Physical display width (mm)
Global variables stored in configuration file.