39#include <wx/bmpbuttn.h>
40#include <wx/clrpicker.h>
41#include <wx/colordlg.h>
43#include <wx/colourdata.h>
45#include <wx/filedlg.h>
47#include <wx/stdpaths.h>
49#include <wx/validate.h>
52#include "base_platform.h"
73 static bool hasInternalGPS(wxString profile = _T(
""));
75 static bool hasInternalBT(wxString profile = _T(
""));
76 bool startBluetoothScan();
77 wxArrayString getBluetoothScanResults();
78 bool stopBluetoothScan();
83 static void Initialize_1(
void);
86 void Initialize_2(
void);
90 void Initialize_3(
void);
93 static void Initialize_4(
void);
95 static void OnExit_1(
void);
96 static void OnExit_2(
void);
98 void SetDefaultOptions(
void);
99 void SetUpgradeOptions(wxString vString, wxString vStringConfig);
101 void applyExpertMode(
bool mode);
106 static void ShowBusySpinner(
void);
107 static void HideBusySpinner(
void);
108 double getFontPointsperPixel(
void);
109 wxSize getDisplaySize();
110 double GetDisplaySizeMM();
111 double GetDisplayAreaCM2();
112 virtual double GetDisplayDPmm();
114 void SetDisplaySizeMM(
double size);
115 unsigned int GetSelectRadiusPix();
116 double GetToolbarScaleFactor(
int GUIScaleFactor);
117 double GetCompassScaleFactor(
int GUIScaleFactor);
119 wxFileDialog *AdjustFileDialogFont(wxWindow *container, wxFileDialog *dlg);
120 wxDirDialog *AdjustDirDialogFont(wxWindow *container, wxDirDialog *dlg);
122 void PositionAISAlert(wxWindow *alert_window);
123 float GetChartScaleFactorExp(
float scale_linear);
124 float GetMarkScaleFactorExp(
float scale_linear);
126 int GetStatusBarFieldCount();
127 bool GetFullscreen();
128 bool SetFullscreen(
bool bFull);
129 bool AllowAlertDialog(
const wxString &class_name);
130 double GetDisplayDensityFactor();
131 double m_pt_per_pixel;
132 long GetDefaultToolbarOrientation();
139 wxString GetSupplementalLicenseString();
141 int DoFileSelectorDialog(wxWindow *parent, wxString *file_spec,
142 wxString Title, wxString initDir,
143 wxString suggestedName, wxString wildcard);
144 int DoDirSelectorDialog(wxWindow *parent, wxString *file_spec, wxString Title,
145 wxString initDir,
bool b_addFiles =
true);
151 void setChartTypeMaskSel(
int mask, wxString &indicator);
152 bool isPlatformCapable(
int flag);
153 void LaunchLocalHelp();
154 void DoHelpDialog(
void);
156 int platformApplyPrivateSettingsString(wxString settings,
157 ArrayOfCDI *pDirArray);
158 void platformLaunchDefaultBrowser(wxString URL);
160 void SetLocaleSearchPrefixes(
void);
161 wxString GetDefaultSystemLocale();
164 wxString GetAdjustedAppLocale();
165 wxString ChangeLocale(wxString &newLocaleID, wxLocale *presentLocale,
166 wxLocale **newLocale);
172 bool BuildGLCaps(
void *pbuf);
176 wxString m_SData_Dir;
188 const wxColour &initial = *wxBLACK,
189 const wxPoint &pos = wxDefaultPosition,
190 const wxSize &size = wxDefaultSize,
long style = 0,
191 const wxValidator &validator = wxDefaultValidator,
192 const wxString &name = _T(
""));
194 bool Create(wxWindow *parent, wxWindowID
id,
195 const wxColour &initial = *wxBLACK,
196 const wxPoint &pos = wxDefaultPosition,
197 const wxSize &size = wxDefaultSize,
long style = 0,
198 const wxValidator &validator = wxDefaultValidator,
199 const wxString &name = _T(
""));
201 void OnButtonClick(wxCommandEvent &WXUNUSED(ev));
202 void InitColourData();
203 void SetColour(wxColour &c);
204 wxColour GetColour(
void);
207 virtual void UpdateColour();
208 wxSize DoGetBestSize()
const;
210 void OnPaint(wxPaintEvent &event);
212 DECLARE_EVENT_TABLE();
217 wxColourData ms_data;