33#include <wx/fileconf.h>
40#include "jsonreader.h"
41#include "jsonwriter.h"
44#include "wmm_ui_dialog.h"
45#include "wxWTranslateCatalog.h"
47#define MY_API_VERSION_MAJOR 1
48#define MY_API_VERSION_MINOR 9
50#define WMM_TOOL_POSITION -1
62 const wxString &title =
"WMM",
63 const wxPoint &pos = wxDefaultPosition,
64 const wxSize &size = wxSize(250, 495),
65 long style = wxCAPTION | wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL |
66 wxFRAME_FLOAT_ON_PARENT | wxFRAME_NO_TASKBAR)
72 void EnablePlotChanged(wxCommandEvent &event)
override;
73 void PlotSettings(wxCommandEvent &event)
override;
79 const wxString &title = _(
"Magnetic Plot Settings"),
80 const wxPoint &pos = wxDefaultPosition,
81 const wxSize &size = wxSize(375, 180),
82 long style = wxDEFAULT_DIALOG_STYLE)
86 void About(wxCommandEvent &event)
override;
87 void Save(wxCommandEvent &event)
override { EndDialog(wxID_OK); }
88 void Cancel(wxCommandEvent &event)
override { EndDialog(wxID_CANCEL); }
115 void RecomputePlot();
124 void SetPluginMessage(wxString &message_id, wxString &message_body)
override;
126 void SetShowPlot(
bool showplot) { m_bShowPlot = showplot; }
129 void SetWmmDialogX(
int x) { m_wmm_dialog_x = x; };
130 void SetWmmDialogY(
int x) { m_wmm_dialog_y = x; }
145 wxWindow *m_parent_window;
151 wxFileConfig *m_pconfig;
155 int m_wmm_dialog_x, m_wmm_dialog_y;
156 int m_display_width, m_display_height;
158 bool m_bShowPlotOptions;
159 bool m_bShowAtCursor;
160 bool m_bShowLiveIcon;
166 int m_leftclick_tool_id;
168 wxString AngleToText(
double angle);
170 bool m_bCachedPlotOk, m_bShowPlot;
171 MagneticPlotMap m_DeclinationMap, m_InclinationMap, m_FieldStrengthMap;
172 wxDateTime m_MapDate;
174 int m_MapPoleAccuracy;
176 void RearrangeWindow();
179 bool m_buseable, m_busegeoid;
181 void SendVariationAt(
double lat,
double lon,
int year,
int month,
int day);
182 void SendBoatVariation();
183 void SendCursorVariation();
184 void SendBoatVarHVD(
double d_var);
185 void SendPGN127258(
double d_var);
186 [[nodiscard]]
unsigned char ComputeChecksum(wxString sentence)
const;
191 bool m_bComputingPlot;
194 wxString m_shareLocn;
The OpenCPN About dialog displaying information including version, authors, license,...
Basic position fix information.
Contains view parameters and status information for a chart display viewport.
int GetAPIVersionMinor() override
Returns the minor version number of the plugin API that this plugin supports.
wxString GetShortDescription() override
Get a brief description of the plugin.
int GetPlugInVersionMajor() override
Returns the major version number of the plugin itself.
wxString GetLongDescription() override
Get detailed plugin information.
bool RenderGLOverlay(wxGLContext *pcontext, PlugIn_ViewPort *vp) override
Renders plugin overlay graphics in OpenGL mode for single canvas.
int Init() override
Initialize the plugin and declare its capabilities.
void ShowPreferencesDialog(wxWindow *parent) override
Shows the plugin preferences dialog.
void SetCursorLatLon(double lat, double lon) override
Receives cursor lat/lon position updates.
int GetAPIVersionMajor() override
Returns the major version number of the plugin API that this plugin supports.
bool DeInit() override
Clean up plugin resources.
void OnToolbarToolCallback(int id) override
Handles toolbar tool clicks.
void SetColorScheme(PI_ColorScheme cs) override
Updates plugin color scheme.
wxBitmap * GetPlugInBitmap() override
Get the plugin's icon bitmap.
int GetPlugInVersionMinor() override
Returns the minor version number of the plugin itself.
wxString GetCommonName() override
Get the plugin's common (short) name.
void SetPositionFix(PlugIn_Position_Fix &pfix) override
Updates plugin with current position fix data at regular intervals.
int GetToolbarToolCount() override
Returns the number of toolbar tools this plugin provides.
Class WmmPlotSettingsDialogBase.
WMM plugin magnetic plotmap utility.
PlugIn Object Definition/API.
PI_ColorScheme
Color schemes for different lighting conditions.
std::string DriverHandle
Plugin API supporting direct access to comm drivers for output purposes.
Graphics abstraction layer on top of wxDC or OpenGL.