OpenCPN Partial API docs
|
Public Member Functions | |
grib_pi (void *ppimgr) | |
int | Init (void) |
Initialize the plugin and declare its capabilities. | |
bool | DeInit (void) |
Clean up plugin resources. | |
int | GetAPIVersionMajor () |
Returns the major version number of the plugin API that this plugin supports. | |
int | GetAPIVersionMinor () |
Returns the minor version number of the plugin API that this plugin supports. | |
int | GetPlugInVersionMajor () |
Returns the major version number of the plugin itself. | |
int | GetPlugInVersionMinor () |
Returns the minor version number of the plugin itself. | |
wxBitmap * | GetPlugInBitmap () |
Get the plugin's icon bitmap. | |
wxString | GetCommonName () |
Get the plugin's common (short) name. | |
wxString | GetShortDescription () |
Get a brief description of the plugin. | |
wxString | GetLongDescription () |
Get detailed plugin information. | |
bool | MouseEventHook (wxMouseEvent &event) |
Handles mouse events from chart window. | |
bool | RenderOverlay (wxDC &dc, PlugIn_ViewPort *vp) |
bool | RenderOverlayMultiCanvas (wxDC &dc, PlugIn_ViewPort *vp, int canvasIndex) |
Renders plugin overlay graphics in standard DC mode for multi-canvas support. | |
void | SetCursorLatLon (double lat, double lon) |
Receives cursor lat/lon position updates. | |
void | OnContextMenuItemCallback (int id) |
Handles context menu item selection. | |
void | SetPluginMessage (wxString &message_id, wxString &message_body) |
bool | RenderGLOverlay (wxGLContext *pcontext, PlugIn_ViewPort *vp) |
Renders plugin overlay graphics in OpenGL mode for single canvas. | |
bool | RenderGLOverlayMultiCanvas (wxGLContext *pcontext, PlugIn_ViewPort *vp, int canvasIndex) |
Renders plugin overlay graphics in OpenGL mode for multi-canvas support. | |
void | SendTimelineMessage (wxDateTime time) |
void | SetDefaults (void) |
Sets plugin default options. | |
int | GetToolBarToolCount (void) |
void | ShowPreferencesDialog (wxWindow *parent) |
Shows the plugin preferences dialog. | |
void | OnToolbarToolCallback (int id) |
Handles toolbar tool clicks. | |
bool | QualifyCtrlBarPosition (wxPoint position, wxSize size) |
void | MoveDialog (wxDialog *dialog, wxPoint position) |
void | SetPositionFixEx (PlugIn_Position_Fix_Ex &pfix) |
Updates plugin with extended position fix data at regular intervals. | |
void | SetCtrlBarXY (wxPoint p) |
void | SetCursorDataXY (wxPoint p) |
void | SetCtrlBarSizeXY (wxSize p) |
void | SetColorScheme (PI_ColorScheme cs) |
Updates plugin color scheme. | |
void | SetDialogFont (wxWindow *window, wxFont *font=OCPNGetFont(_("Dialog"))) |
void | SetCurrentViewPort (PlugIn_ViewPort &vp) |
Callback invoked by OpenCPN core whenever the current ViewPort changes or through periodic updates. | |
PlugIn_ViewPort & | GetCurrentViewPort () |
void | OnGribCtrlBarClose () |
wxPoint | GetCtrlBarXY () |
wxPoint | GetCursorDataXY () |
int | GetStartOptions () |
bool | GetCopyFirstCumRec () |
Returns true if cumulative parameters like precipitation and cloud cover should initialize their start values from the first record. | |
bool | GetCopyMissWaveRec () |
Returns true if wave data should be propagated across time periods where wave records are missing. | |
GRIBOverlayFactory * | GetGRIBOverlayFactory () |
void | UpdatePrefs (GribPreferencesDialog *Pref) |
![]() | |
opencpn_plugin_116 (void *pmgr) | |
virtual void | PrepareContextMenu (int canvasIndex) |
Prepares plugin context menu items. | |
![]() | |
opencpn_plugin_115 (void *pmgr) | |
![]() | |
opencpn_plugin_114 (void *pmgr) | |
![]() | |
opencpn_plugin_113 (void *pmgr) | |
virtual bool | KeyboardEventHook (wxKeyEvent &event) |
Handles keyboard events from main window. | |
virtual void | OnToolbarToolDownCallback (int id) |
Handles toolbar button press. | |
virtual void | OnToolbarToolUpCallback (int id) |
Handles toolbar button release. | |
![]() | |
opencpn_plugin_112 (void *pmgr) | |
virtual void | SendVectorChartObjectInfo (wxString &chart, wxString &feature, wxString &objname, double lat, double lon, double scale, int nativescale) |
Receives vector chart object information. | |
![]() | |
opencpn_plugin_111 (void *pmgr) | |
![]() | |
opencpn_plugin_110 (void *pmgr) | |
virtual void | LateInit (void) |
![]() | |
opencpn_plugin_19 (void *pmgr) | |
virtual void | OnSetupOptions (void) |
Allows plugin to add pages to global Options dialog. | |
![]() | |
opencpn_plugin_18 (void *pmgr) | |
virtual bool | RenderOverlay (wxMemoryDC *pmdc, PlugIn_ViewPort *vp) |
Render plugin overlay graphics using standard device context. | |
![]() | |
opencpn_plugin (void *pmgr) | |
virtual int | GetToolbarToolCount (void) |
Returns the number of toolbar tools this plugin provides. | |
virtual int | GetToolboxPanelCount (void) |
Returns the number of preference pages this plugin provides. | |
virtual void | SetupToolboxPanel (int page_sel, wxNotebook *pnotebook) |
Creates a plugin preferences page. | |
virtual void | OnCloseToolboxPanel (int page_sel, int ok_apply_cancel) |
Handles preference page closure. | |
virtual void | SetPositionFix (PlugIn_Position_Fix &pfix) |
Updates plugin with current position fix data at regular intervals. | |
virtual void | SetNMEASentence (wxString &sentence) |
Receive all NMEA 0183 sentences from OpenCPN. | |
virtual void | SetAISSentence (wxString &sentence) |
Receive all AIS sentences from OpenCPN. | |
virtual void | ProcessParentResize (int x, int y) |
Handles parent window resize events. | |
virtual void | UpdateAuiStatus (void) |
Updates AUI manager status. | |
virtual wxArrayString | GetDynamicChartClassNameArray (void) |
Returns array of dynamically loaded chart class names. | |
Public Attributes | |
GRIBOverlayFactory * | m_pGRIBOverlayFactory |
int | m_MenuItem |
bool | m_DialogStyleChanged |
wxSize | m_coreToolbarSize |
wxPoint | m_coreToolbarPosn |
bool | m_bZoomToCenterAtInit |
wxString | m_local_sources_catalog |
double | m_boat_lat |
double | m_boat_lon |
double | m_boat_cog |
double | m_boat_sog |
time_t | m_boat_time |
grib_pi::grib_pi | ( | void * | ppimgr | ) |
Definition at line 73 of file grib_pi.cpp.
grib_pi::~grib_pi | ( | void | ) |
Definition at line 93 of file grib_pi.cpp.
|
virtual |
Clean up plugin resources.
Called by OpenCPN when plugin is disabled. Shall release any resources allocated by the plugin. Good place to persist plugin configuration.
Reimplemented from opencpn_plugin.
Definition at line 174 of file grib_pi.cpp.
|
virtual |
Returns the major version number of the plugin API that this plugin supports.
This method must be implemented by all plugins to declare compatibility with a specific major version of the OpenCPN plugin API.
Reimplemented from opencpn_plugin.
Definition at line 190 of file grib_pi.cpp.
|
virtual |
Returns the minor version number of the plugin API that this plugin supports.
This method must be implemented by all plugins to declare compatibility with a specific minor version of the OpenCPN plugin API.
Reimplemented from opencpn_plugin.
Definition at line 192 of file grib_pi.cpp.
|
virtual |
Get the plugin's common (short) name.
This required method should return a short name used to identify the plugin in lists and menus.
Reimplemented from opencpn_plugin.
Definition at line 200 of file grib_pi.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Get detailed plugin information.
This required method should return a longer description including:
Reimplemented from opencpn_plugin.
Definition at line 204 of file grib_pi.cpp.
|
virtual |
Get the plugin's icon bitmap.
FIXME static wxBitmap* LoadSVG(const wxString filename, unsigned int width, unsigned int height) { if (!gFrame) return new wxBitmap(width, height); // We are headless.
This method should return a wxBitmap containing the plugin's icon for display in the plugin manager and other UI elements.
#ifdef ANDROID return loadAndroidSVG(filename, width, height); #elif defined(ocpnUSE_SVG) wxSVGDocument svgDoc; if (svgDoc.Load(filename)) return new wxBitmap(svgDoc.Render(width, height, NULL, true, true)); else return new wxBitmap(width, height); #else return new wxBitmap(width, height); #endif }
wxBitmap* opencpn_plugin::GetPlugInBitmap() { auto bitmap = PluginLoader::GetInstance()->GetPluginDefaultIcon(); return const_cast<wxBitmap*>(bitmap); }
Reimplemented from opencpn_plugin.
Definition at line 198 of file grib_pi.cpp.
|
virtual |
Returns the major version number of the plugin itself.
This method should return the plugin's own major version number, which is used by OpenCPN for plugin version management and display.
Reimplemented from opencpn_plugin.
Definition at line 194 of file grib_pi.cpp.
|
virtual |
Returns the minor version number of the plugin itself.
This method should return the plugin's own minor version number, which is used by OpenCPN for plugin version management and display.
Reimplemented from opencpn_plugin.
Definition at line 196 of file grib_pi.cpp.
|
virtual |
Get a brief description of the plugin.
This required method should return a short description (1-2 sentences) explaining the plugin's basic functionality.
Reimplemented from opencpn_plugin.
Definition at line 202 of file grib_pi.cpp.
int grib_pi::GetToolBarToolCount | ( | void | ) |
Definition at line 225 of file grib_pi.cpp.
|
virtual |
Initialize the plugin and declare its capabilities.
This required method is called by OpenCPN during plugin loading. It should:
Reimplemented from opencpn_plugin.
Definition at line 99 of file grib_pi.cpp.
|
virtual |
Handles mouse events from chart window.
Called for mouse events in the chart display area. Must be implemented if plugin declares WANTS_MOUSE_EVENTS capability.
event | The mouse event |
Reimplemented from opencpn_plugin_112.
Definition at line 227 of file grib_pi.cpp.
void grib_pi::MoveDialog | ( | wxDialog * | dialog, |
wxPoint | position | ||
) |
Definition at line 398 of file grib_pi.cpp.
|
virtual |
Handles context menu item selection.
Called when user selects a plugin's context menu item. Must be implemented if plugin adds items via AddCanvasContextMenuItem().
id | The menu item ID assigned when item was added |
Reimplemented from opencpn_plugin.
Definition at line 621 of file grib_pi.cpp.
void grib_pi::OnGribCtrlBarClose | ( | ) |
Definition at line 526 of file grib_pi.cpp.
|
virtual |
Handles toolbar tool clicks.
Called when the user clicks a plugin's toolbar button. Must be implemented if plugin declares WANTS_TOOLBAR_CALLBACK capability.
id | The tool ID assigned when tool was added via InsertPlugInTool() |
Reimplemented from opencpn_plugin.
Definition at line 420 of file grib_pi.cpp.
bool grib_pi::QualifyCtrlBarPosition | ( | wxPoint | position, |
wxSize | size | ||
) |
Definition at line 365 of file grib_pi.cpp.
|
virtual |
Renders plugin overlay graphics in OpenGL mode for single canvas.
Legacy method for OpenGL overlay rendering that predates multi-canvas and priority support. This method renders overlays at OVERLAY_LEGACY priority level (0) on the primary canvas only.
Both RenderOverlay() and RenderGLOverlay() use the same piDC device context abstraction for drawing, but RenderGLOverlay() provides direct access to the OpenGL context for advanced OpenGL operations.
Plugins render in their load order within the plugin array for overlays at the same priority level.
pcontext | OpenGL context for direct GL drawing commands and piDC operations |
vp | Current viewport settings including scale, position, rotation |
Reimplemented from opencpn_plugin_18.
Definition at line 574 of file grib_pi.cpp.
|
virtual |
Renders plugin overlay graphics in OpenGL mode for multi-canvas support.
Legacy version of RenderGLOverlayMultiCanvas without priority control. This method is called for backward compatibility with plugins that haven't upgraded to the priority-aware API. The overlay is rendered at OVERLAY_LEGACY priority level (0), appearing behind ships and other high-priority elements.
pcontext | OpenGL context for drawing operations |
vp | Current viewport parameters including position, scale, rotation |
canvasIndex | Index of the target canvas (0-based) |
Reimplemented from opencpn_plugin_116.
Definition at line 606 of file grib_pi.cpp.
|
virtual |
Reimplemented from opencpn_plugin_18.
Definition at line 551 of file grib_pi.cpp.
|
virtual |
Renders plugin overlay graphics in standard DC mode for multi-canvas support.
Legacy version of RenderOverlayMultiCanvas without priority control. This method is called for backward compatibility with plugins that haven't upgraded to the priority-aware API. The overlay is rendered at OVERLAY_LEGACY priority level (0), appearing behind ships and other high-priority elements.
dc | Device context for drawing operations |
vp | Current viewport parameters including position, scale, rotation |
canvasIndex | Index of the target canvas (0-based) |
Reimplemented from opencpn_plugin_116.
Definition at line 611 of file grib_pi.cpp.
void grib_pi::SendTimelineMessage | ( | wxDateTime | time | ) |
Definition at line 839 of file grib_pi.cpp.
|
virtual |
Updates plugin color scheme.
Called when OpenCPN's color scheme changes between day, dusk and night modes. Plugins should update their UI colors to match the new scheme.
cs | New color scheme to use:
|
Reimplemented from opencpn_plugin.
Definition at line 829 of file grib_pi.cpp.
|
inlinevirtual |
Callback invoked by OpenCPN core whenever the current ViewPort changes or through periodic updates.
In multi-canvas configurations, each canvas triggers a viewport update.
Reimplemented from opencpn_plugin.
|
virtual |
Receives cursor lat/lon position updates.
This method is called when the cursor moves over the chart. Must be implemented if plugin sets WANTS_CURSOR_LATLON flag.
lat | Cursor latitude in decimal degrees |
lon | Cursor longitude in decimal degrees |
Reimplemented from opencpn_plugin.
Definition at line 616 of file grib_pi.cpp.
|
virtual |
Sets plugin default options.
This method is called when a plugin is enabled via the user preferences dialog. It provides an opportunity to set up any default options and behaviors.
Reimplemented from opencpn_plugin.
Definition at line 223 of file grib_pi.cpp.
void grib_pi::SetDialogFont | ( | wxWindow * | window, |
wxFont * | font = OCPNGetFont(_("Dialog")) |
||
) |
Definition at line 626 of file grib_pi.cpp.
|
virtual |
Reimplemented from opencpn_plugin_18.
Definition at line 639 of file grib_pi.cpp.
|
virtual |
Updates plugin with extended position fix data at regular intervals.
Called by OpenCPN approximately once per second (1 Hz), regardless of how frequently new position data is actually received from GPS/NMEA sources. This provides plugins with a steady, predictable update rate for navigation calculations and display updates.
Extends SetPositionFix() by adding magnetic and true heading information when available from HDM/HDT NMEA sentences.
pfix | Extended position fix data containing:
|
Reimplemented from opencpn_plugin_18.
Definition at line 864 of file grib_pi.cpp.
|
virtual |
Shows the plugin preferences dialog.
This method is called when the user requests the plugin preferences through the OpenCPN options dialog. Must be implemented if plugin sets WANTS_PREFERENCES flag.
parent | Parent window to use for dialog |
Reimplemented from opencpn_plugin.
Definition at line 233 of file grib_pi.cpp.
void grib_pi::UpdatePrefs | ( | GribPreferencesDialog * | Pref | ) |
Definition at line 293 of file grib_pi.cpp.
GRIBOverlayFactory* grib_pi::m_pGRIBOverlayFactory |