32#include <wx/confbase.h>
33#include <wx/datetime.h>
34#include <wx/fileconf.h>
35#include <wx/progdlg.h>
40#include <wx/msw/regconf.h>
41#include <wx/msw/iniconf.h>
45#include "model/nav_object_database.h"
61#define GLOBAL_SETTINGS_INPUT 3
68bool LogMessageOnce(
const wxString &msg);
69double fromUsrSpeed(
double usr_speed,
int unit = -1);
70double fromUsrWindSpeed(
double usr_wspeed,
int unit = -1);
71double fromUsrTemp(
double usr_temp,
int unit = -1);
72wxString getUsrTempUnit();
73wxString formatAngle(
double angle);
74wxString GetLayerName(
int id);
78extern wxArrayString *pMessageOnceArray;
101wxDateTime
toUsrDateTime(
const wxDateTime ts,
const int format,
102 const double lon = INFINITY - INFINITY);
118 const double lon = INFINITY - INFINITY);
120extern void AlphaBlending(
ocpnDC &dc,
int x,
int y,
int size_x,
int size_y,
121 float radius, wxColour color,
122 unsigned char transparency);
125void DimeControl(wxWindow *ctrl);
126void DimeControl(wxWindow *ctrl, wxColour col, wxColour col1,
127 wxColour back_color, wxColour text_color, wxColour uitext,
128 wxColour udkrd, wxColour gridline);
131RoutePoint *WaypointExists(
const wxString &name,
double lat,
double lon);
132RoutePoint *WaypointExists(
const wxString &guid);
133Route *RouteExists(
const wxString &guid);
135Track *TrackExists(
const wxString &guid);
136int BackupDatabase(wxWindow *parent);
137void ExportGPX(wxWindow *parent,
bool bviz_only =
false,
bool blayer =
false);
138void UI_ImportGPX(wxWindow *parent,
bool islayer =
false, wxString dirpath =
"",
139 bool isdirectory =
true,
bool isPersistent =
false);
141bool ExportGPXRoutes(wxWindow *parent, RouteList *pRoutes,
142 const wxString suggestedName =
"routes");
143bool ExportGPXTracks(wxWindow *parent, std::vector<Track *> *pRoutes,
144 const wxString suggestedName =
"tracks");
145bool ExportGPXWaypoints(wxWindow *parent, RoutePointList *pRoutePoints,
146 const wxString suggestedName =
"waypoints");
147void ImportFileArray(
const wxArrayString &file_array,
bool islayer,
148 bool isPersistent, wxString dirpath);
154 return (2.0 / 100) *
static_cast<double>(slider_pos) + 1.02;
159 return std::round((100.0 * (
static_cast<double>(value) - 1.02)) / 2.0);
168 MyConfig(
const wxString &LocalFileName);
172 void LoadS57Config();
174 virtual void CreateConfigGroups(ChartGroupArray *pGroupArray);
175 virtual void DestroyConfigGroups(
void);
176 virtual void LoadConfigGroups(ChartGroupArray *pGroupArray);
178 virtual void LoadCanvasConfigs(
bool bApplyAsTemplate =
false);
179 virtual void LoadConfigCanvas(
canvasConfig *cConfig,
bool bApplyAsTemplate);
181 virtual void SaveCanvasConfigs();
184 virtual bool UpdateChartDirs(ArrayOfCDI &dirarray);
185 virtual bool LoadChartDirArray(ArrayOfCDI &ChartDirArray);
186 virtual void UpdateSettings();
188 bool LoadLayers(wxString &path);
189 int LoadMyConfigRaw(
bool bAsTemplate =
false);
194void SwitchInlandEcdisMode(
bool Switch);
Chart canvas configuration state
Basic chart info storage.
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 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.
wxDateTime toUsrDateTime(const wxDateTime ts, const int format, const double lon=INFINITY - INFINITY)
Converts a timestamp from UTC to the user's preferred time format.
MyConfig * pConfig
Global instance.
wxDateTime fromUsrDateTime(const wxDateTime ts, const int format, const double lon=INFINITY - INFINITY)
Converts a timestamp from a user's preferred time format to UTC.
Navigation Utility Functions without GUI dependencies.
Layer to use wxDC or opengl.
Waypoint or mark abstraction.
A single, selected generic item.
Recorded track abstraction.