30#include <wx/confbase.h>
31#include <wx/fileconf.h>
35#include <wx/msw/regconf.h>
36#include <wx/msw/iniconf.h>
44#include "model/select_item.h"
46#include "model/navutil_base.h"
48extern bool LogMessageOnce(
const wxString &msg);
49extern double fromUsrDistance(
double usr_distance,
int unit = -1);
50extern double fromUsrSpeed(
double usr_speed,
int unit = -1);
51extern double fromUsrWindSpeed(
double usr_wspeed,
int unit = -1);
52extern double fromUsrTemp(
double usr_temp,
int unit = -1);
53extern wxString getUsrTempUnit();
54extern wxString formatAngle(
double angle);
60#define GLOBAL_SETTINGS_INPUT \
78wxDateTime toUsrDateTime(
const wxDateTime ts,
const int format,
79 const double lon = INFINITY - INFINITY);
94wxDateTime fromUsrDateTime(
const wxDateTime ts,
const int format,
95 const double lon = INFINITY - INFINITY);
97extern void AlphaBlending(
ocpnDC &dc,
int x,
int y,
int size_x,
int size_y,
98 float radius, wxColour color,
99 unsigned char transparency);
102void DimeControl(wxWindow *ctrl);
103void DimeControl(wxWindow *ctrl, wxColour col, wxColour col1,
104 wxColour back_color, wxColour text_color, wxColour uitext,
105 wxColour udkrd, wxColour gridline);
106wxColor GetDimedColor(
const wxColor &c);
109class NavObjectCollection;
110class wxGenericProgressDialog;
139RoutePoint *WaypointExists(
const wxString &name,
double lat,
double lon);
140RoutePoint *WaypointExists(
const wxString &guid);
141Route *RouteExists(
const wxString &guid);
143Track *TrackExists(
const wxString &guid);
145void ExportGPX(wxWindow *parent,
bool bviz_only =
false,
bool blayer =
false);
146void UI_ImportGPX(wxWindow *parent,
bool islayer =
false,
147 wxString dirpath = _T(
""),
bool isdirectory =
true,
148 bool isPersistent =
false);
150bool ExportGPXRoutes(wxWindow *parent, RouteList *pRoutes,
151 const wxString suggestedName = _T(
"routes"));
152bool ExportGPXTracks(wxWindow *parent, std::vector<Track *> *pRoutes,
153 const wxString suggestedName = _T(
"tracks"));
154bool ExportGPXWaypoints(wxWindow *parent, RoutePointList *pRoutePoints,
155 const wxString suggestedName = _T(
"waypoints"));
161 return (2.0 / 100) *
static_cast<double>(slider_pos) + 1.02;
166 return std::round((100.0 * (
static_cast<double>(value) - 1.02)) / 2.0);
175 MyConfig(
const wxString &LocalFileName);
179 void LoadS57Config();
181 virtual void CreateConfigGroups(ChartGroupArray *pGroupArray);
182 virtual void DestroyConfigGroups(
void);
183 virtual void LoadConfigGroups(ChartGroupArray *pGroupArray);
185 virtual void LoadCanvasConfigs(
bool bApplyAsTemplate =
false);
186 virtual void LoadConfigCanvas(
canvasConfig *cConfig,
bool bApplyAsTemplate);
188 virtual void SaveCanvasConfigs();
191 virtual bool UpdateChartDirs(ArrayOfCDI &dirarray);
192 virtual bool LoadChartDirArray(ArrayOfCDI &ChartDirArray);
193 virtual void UpdateSettings();
195 bool LoadLayers(wxString &path);
196 int LoadMyConfigRaw(
bool bAsTemplate =
false);
201void SwitchInlandEcdisMode(
bool Switch);
static int config_to_ui(double value)
Convert configuration 1.02..3.0 value to slider scale 1..100.
static double ui_to_config(int slider_pos)
Convert a slider scale 1-100 value to configuration value 1.02..3.0.
Represents a waypoint or mark within the navigation system.
Represents a navigational route in the navigation system.
Represents a single point in a track.
Represents a track, which is a series of connected track points.
Encapsulates persistent canvas configuration.
Device context class that can use either wxDC or OpenGL for drawing.