44#include <wx/glcanvas.h>
47#include "jsonreader.h"
48#include "jsonwriter.h"
55#define PLUGIN_VERSION_MAJOR 5
56#define PLUGIN_VERSION_MINOR 0
58#define MY_API_VERSION_MAJOR 1
59#define MY_API_VERSION_MINOR 16
65#define GRIB_TOOL_POSITION (-1)
66#define STARTING_STATE_STYLE 9999
69#define ATTACHED_HAS_CAPTION 0
70#define ATTACHED_NO_CAPTION 1
71#define SEPARATED_HORIZONTAL 2
72#define SEPARATED_VERTICAL 3
110 int canvasIndex)
override;
113 void SetPluginMessage(wxString &message_id, wxString &message_body)
override;
116 int canvasIndex)
override;
117 void SendTimelineMessage(wxDateTime time);
119 int GetToolBarToolCount();
122 bool QualifyCtrlBarPosition(wxPoint position, wxSize size);
123 void MoveDialog(wxDialog *dialog, wxPoint position);
127 void SetCtrlBarXY(wxPoint p) { m_CtrlBarxy = p; }
128 void SetCursorDataXY(wxPoint p) { m_CursorDataxy = p; }
129 void SetCtrlBarSizeXY(wxSize p) { m_CtrlBar_Sizexy = p; }
131 void SetDialogFont(wxWindow *window, wxFont *font =
OCPNGetFont(_(
"Dialog")));
141 void OnGribCtrlBarClose();
143 wxPoint GetCtrlBarXY() {
return m_CtrlBarxy; }
144 wxPoint GetCursorDataXY() {
return m_CursorDataxy; }
145 [[nodiscard]]
int GetStartOptions()
const {
return m_bStartOptions; }
164 return m_pGRIBOverlayFactory;
170 bool m_DialogStyleChanged;
172 wxSize m_coreToolbarSize;
173 wxPoint m_coreToolbarPosn;
174 bool m_bZoomToCenterAtInit;
175 wxString m_local_sources_catalog;
176 double m_boat_lat, m_boat_lon;
177 double m_boat_cog, m_boat_sog;
188 wxFileConfig *m_pconfig;
189 wxWindow *m_parent_window;
193 int m_display_width, m_display_height;
194 int m_leftclick_tool_id;
196 wxPoint m_CtrlBarxy, m_CursorDataxy;
197 wxSize m_CtrlBar_Sizexy;
200 wxCheckBox *m_pGRIBUseHiDef;
201 wxCheckBox *m_pGRIBUseGradualColors;
206 bool m_bGRIBUseHiDef;
207 bool m_bGRIBUseGradualColors;
208 bool m_bDrawBarbedArrowHead;
213 bool m_bCopyFirstCumRec;
218 bool m_bCopyMissWaveRec;
219 int m_bLoadLastOpenFile;
221 wxString m_RequestConfig;
222 wxString m_bMailToAddresses;
223 wxString m_bMailFromAddress;
224 wxString m_ZyGribLogin;
225 wxString m_ZyGribCode;
226 double m_GUIScaleFactor;
228 double m_GribIconsScaleFactor;
230 bool m_bGRIBShowIcon;
240 wxBitmap m_panelBitmap;
254 void OnOKClick(wxCommandEvent &event)
override;
257 void OnStartOptionChange(wxCommandEvent &event)
override;
Factory class for creating and managing GRIB data visualizations.
bool RenderOverlayMultiCanvas(wxDC &dc, PlugIn_ViewPort *vp, int canvasIndex) override
Renders plugin overlay graphics in standard DC mode for multi-canvas support.
void OnContextMenuItemCallback(int id) override
Handles context menu item selection.
bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext, PlugIn_ViewPort *vp, int canvasIndex) override
Renders plugin overlay graphics in OpenGL mode for multi-canvas support.
void SetDefaults() override
Sets plugin default options.
void ShowPreferencesDialog(wxWindow *parent) override
Shows the plugin preferences dialog.
int GetPlugInVersionMajor() override
Returns the major version number of the plugin itself.
bool GetCopyFirstCumRec() const
Returns true if cumulative parameters like precipitation and cloud cover should initialize their star...
wxString GetShortDescription() override
Get a brief description of the plugin.
wxString GetLongDescription() override
Get detailed plugin information.
bool MouseEventHook(wxMouseEvent &event) override
Handles mouse events from chart window.
void SetPositionFixEx(PlugIn_Position_Fix_Ex &pfix) override
Updates plugin with extended position fix data at regular intervals.
int GetAPIVersionMajor() override
Returns the major version number of the plugin API that this plugin supports.
bool GetCopyMissWaveRec() const
Returns true if wave data should be propagated across time periods where wave records are missing.
int GetAPIVersionMinor() override
Returns the minor version number of the plugin API that this plugin supports.
bool DeInit() override
Clean up plugin resources.
void SetColorScheme(PI_ColorScheme cs) override
Updates plugin color scheme.
void OnToolbarToolCallback(int id) override
Handles toolbar tool clicks.
wxBitmap * GetPlugInBitmap() override
Get the plugin's icon bitmap.
void SetCursorLatLon(double lat, double lon) override
Receives cursor lat/lon position updates.
int Init() override
Initialize the plugin and declare its capabilities.
wxString GetCommonName() override
Get the plugin's common (short) name.
bool RenderGLOverlay(wxGLContext *pcontext, PlugIn_ViewPort *vp) override
Renders plugin overlay graphics in OpenGL mode for single canvas.
int GetPlugInVersionMinor() override
Returns the minor version number of the plugin itself.
void SetCurrentViewPort(PlugIn_ViewPort &vp) override
Callback invoked by OpenCPN core whenever the current ViewPort changes or through periodic updates.
Class GribPreferencesDialogBase.
A specialized GribRecordSet that represents temporally interpolated weather data with isobar renderin...
Extended position fix information.
Contains view parameters and status information for a chart display viewport.
GRIB Data Visualization and Rendering Factory.
GRIB Display Settings Configuration Interface.
GRIB Weather Data Control Interface.
PlugIn Object Definition/API.
PI_ColorScheme
Color schemes for different lighting conditions.
wxFont * OCPNGetFont(wxString TextElement, int default_size)
Gets a font for UI elements.