43#include <wx/glcanvas.h>
46#define PLUGIN_VERSION_MAJOR 5
47#define PLUGIN_VERSION_MINOR 0
49#define MY_API_VERSION_MAJOR 1
50#define MY_API_VERSION_MINOR 16
54#include "wx/jsonreader.h"
55#include "wx/jsonwriter.h"
67#define GRIB_TOOL_POSITION -1
68#define STARTING_STATE_STYLE 9999
71#define ATTACHED_HAS_CAPTION 0
72#define ATTACHED_NO_CAPTION 1
73#define SEPARATED_HORIZONTAL 2
74#define SEPARATED_VERTICAL 3
112 void SetPluginMessage(wxString &message_id, wxString &message_body);
116 void SendTimelineMessage(wxDateTime time);
118 int GetToolBarToolCount(
void);
121 bool QualifyCtrlBarPosition(wxPoint position, wxSize size);
122 void MoveDialog(wxDialog *dialog, wxPoint position);
126 void SetCtrlBarXY(wxPoint p) { m_CtrlBarxy = p; }
127 void SetCursorDataXY(wxPoint p) { m_CursorDataxy = p; }
128 void SetCtrlBarSizeXY(wxSize p) { m_CtrlBar_Sizexy = p; }
130 void SetDialogFont(wxWindow *window, wxFont *font =
OCPNGetFont(_(
"Dialog")));
140 void OnGribCtrlBarClose();
142 wxPoint GetCtrlBarXY() {
return m_CtrlBarxy; }
143 wxPoint GetCursorDataXY() {
return m_CursorDataxy; }
144 int GetStartOptions() {
return m_bStartOptions; }
167 bool m_DialogStyleChanged;
169 wxSize m_coreToolbarSize;
170 wxPoint m_coreToolbarPosn;
171 bool m_bZoomToCenterAtInit;
172 wxString m_local_sources_catalog;
173 double m_boat_lat, m_boat_lon;
174 double m_boat_cog, m_boat_sog;
178 bool LoadConfig(
void);
179 bool SaveConfig(
void);
185 wxFileConfig *m_pconfig;
186 wxWindow *m_parent_window;
190 int m_display_width, m_display_height;
191 int m_leftclick_tool_id;
193 wxPoint m_CtrlBarxy, m_CursorDataxy;
194 wxSize m_CtrlBar_Sizexy;
197 wxCheckBox *m_pGRIBUseHiDef;
198 wxCheckBox *m_pGRIBUseGradualColors;
203 bool m_bGRIBUseHiDef;
204 bool m_bGRIBUseGradualColors;
205 bool m_bDrawBarbedArrowHead;
210 bool m_bCopyFirstCumRec;
215 bool m_bCopyMissWaveRec;
216 int m_bLoadLastOpenFile;
218 wxString m_RequestConfig;
219 wxString m_bMailToAddresses;
220 wxString m_bMailFromAddress;
221 wxString m_ZyGribLogin;
222 wxString m_ZyGribCode;
223 double m_GUIScaleFactor;
225 double m_GribIconsScaleFactor;
227 bool m_bGRIBShowIcon;
237 wxBitmap m_panelBitmap;
250 void OnOKClick(wxCommandEvent &event);
253 void OnStartOptionChange(wxCommandEvent &event);
GRIB Data Visualization and Rendering Factory.
GRIB Display Settings Configuration Interface.
GRIB Weather Data Control Interface.
Factory class for creating and managing GRIB data visualizations.
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.
void SetCursorLatLon(double lat, double lon)
Receives cursor lat/lon position updates.
bool RenderGLOverlay(wxGLContext *pcontext, PlugIn_ViewPort *vp)
Renders plugin overlay graphics in OpenGL mode.
wxString GetCommonName()
Get the plugin's common (short) name.
bool DeInit(void)
Clean up plugin resources.
void OnContextMenuItemCallback(int id)
Handles context menu item selection.
int Init(void)
Initialize the plugin and declare its capabilities.
void SetPositionFixEx(PlugIn_Position_Fix_Ex &pfix)
Updates plugin with extended position fix data.
int GetAPIVersionMinor()
Returns the minor version number of the plugin API that this plugin supports.
void SetCurrentViewPort(PlugIn_ViewPort &vp)
Callback invoked by OpenCPN core whenever the current ViewPort changes or through periodic updates.
int GetPlugInVersionMinor()
Returns the minor version number of the plugin itself.
void SetColorScheme(PI_ColorScheme cs)
Updates plugin color scheme.
void OnToolbarToolCallback(int id)
Handles toolbar tool clicks.
int GetPlugInVersionMajor()
Returns the major version number of the plugin itself.
bool MouseEventHook(wxMouseEvent &event)
Handles mouse events from chart window.
bool GetCopyFirstCumRec()
Returns true if cumulative parameters like precipitation and cloud cover should initialize their star...
wxString GetShortDescription()
Get a brief description of the plugin.
void ShowPreferencesDialog(wxWindow *parent)
Shows the plugin preferences dialog.
void SetDefaults(void)
Sets plugin default options.
wxBitmap * GetPlugInBitmap()
Get the plugin's icon bitmap.
bool RenderOverlayMultiCanvas(wxDC &dc, PlugIn_ViewPort *vp, int canvasIndex)
Renders plugin overlay graphics with canvas selection.
bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext, PlugIn_ViewPort *vp, int canvasIndex)
Renders plugin overlay graphics in OpenGL mode with canvas selection.
wxString GetLongDescription()
Get detailed plugin information.
bool GetCopyMissWaveRec()
Returns true if wave data should be propagated across time periods where wave records are missing.
int GetAPIVersionMajor()
Returns the major version number of the plugin API that this plugin supports.
PlugIn Object Definition/API.
PI_ColorScheme
Enumeration of color schemes.
wxFont * OCPNGetFont(wxString TextElement, int default_size)
Gets a font for UI elements.