31#include <unordered_map>
36#include <wx/dcmemory.h>
38#include <wx/glcanvas.h>
39#include <wx/notebook.h>
45extern wxWindow* gFrame;
77 static wxBitmap* bitmap = 0;
78 if (!bitmap) bitmap =
new wxBitmap(1, 1);
82opencpn_plugin::~opencpn_plugin() {}
99 return "OpenCPN PlugIn Base Class";
103 return "OpenCPN PlugIn Base Class\n\
104PlugInManager created this base class";
149opencpn_plugin_16::opencpn_plugin_16(
void* pmgr) :
opencpn_plugin(pmgr) {}
151opencpn_plugin_16::~opencpn_plugin_16(
void) {}
158 wxString& message_body) {}
161opencpn_plugin_17::opencpn_plugin_17(
void* pmgr) :
opencpn_plugin(pmgr) {}
163opencpn_plugin_17::~opencpn_plugin_17(
void) {}
169bool opencpn_plugin_17::RenderGLOverlay(wxGLContext* pcontext,
174void opencpn_plugin_17::SetPluginMessage(wxString& message_id,
175 wxString& message_body) {}
178opencpn_plugin_18::opencpn_plugin_18(
void* pmgr) :
opencpn_plugin(pmgr) {}
180opencpn_plugin_18::~opencpn_plugin_18(
void) {}
191void opencpn_plugin_18::SetPluginMessage(wxString& message_id,
192 wxString& message_body) {}
199opencpn_plugin_19::~opencpn_plugin_19(
void) {}
206opencpn_plugin_110::~opencpn_plugin_110(
void) {}
208void opencpn_plugin_110::LateInit(
void) {}
213opencpn_plugin_111::~opencpn_plugin_111(
void) {}
218opencpn_plugin_112::~opencpn_plugin_112(
void) {}
223 wxString& chart, wxString& feature, wxString& objname,
double lat,
224 double lon,
double scale,
int nativescale) {}
229opencpn_plugin_113::~opencpn_plugin_113(
void) {}
239opencpn_plugin_114::~opencpn_plugin_114(
void) {}
244opencpn_plugin_115::~opencpn_plugin_115(
void) {}
249opencpn_plugin_116::~opencpn_plugin_116(
void) {}
Extended position fix information.
Basic position fix information.
Contains view parameters and status information for a chart display viewport.
Information about the currently active route leg.
virtual void SendVectorChartObjectInfo(wxString &chart, wxString &feature, wxString &objname, double lat, double lon, double scale, int nativescale)
Receives vector chart object information.
virtual bool MouseEventHook(wxMouseEvent &event)
Handles mouse events from chart window.
virtual void OnToolbarToolDownCallback(int id)
Handles toolbar button press.
virtual void OnToolbarToolUpCallback(int id)
Handles toolbar button release.
virtual bool KeyboardEventHook(wxKeyEvent &event)
Handles keyboard events from main window.
virtual void PrepareContextMenu(int canvasIndex)
Prepares plugin context menu items.
virtual bool RenderOverlayMultiCanvas(wxDC &dc, PlugIn_ViewPort *vp, int canvasIndex)
Renders plugin overlay graphics with canvas selection.
virtual bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext, PlugIn_ViewPort *vp, int canvasIndex)
Renders plugin overlay graphics in OpenGL mode with canvas selection.
virtual int GetPlugInVersionPatch()
Forms a semantic version together with GetPlugInVersionMajor() and GetPlugInVersionMinor().
virtual const char * GetPlugInVersionPre()
Pre-release tag version part, see GetPlugInVersionPatch()
virtual const char * GetPlugInVersionBuild()
Build version part see GetPlugInVersionPatch().
virtual int GetPlugInVersionPost()
Post-release version part, extends the semver spec.
virtual bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext, PlugIn_ViewPort *vp, int canvasIndex, int priority)
Render plugin overlay over chart canvas in OpenGL mode.
virtual bool RenderOverlayMultiCanvas(wxDC &dc, PlugIn_ViewPort *vp, int canvas_ix, int priority)
Render plugin overlay over chart canvas in non-OpenGL mode.
virtual void PreShutdownHook()
Called just before OpenCPN begins shutdown sequence.
virtual void SetPluginMessage(wxString &message_id, wxString &message_body)
Receives plugin-to-plugin messages.
virtual bool RenderOverlay(wxDC &dc, PlugIn_ViewPort *vp)
Renders plugin overlay graphics in standard (non-OpenGL) mode.
virtual bool RenderGLOverlay(wxGLContext *pcontext, PlugIn_ViewPort *vp)
Renders plugin overlay graphics in OpenGL mode.
virtual void SetPositionFixEx(PlugIn_Position_Fix_Ex &pfix)
Updates plugin with extended position fix data.
virtual void OnSetupOptions(void)
Allows plugin to add custom setup options.
Base class for OpenCPN plugins.
virtual void OnCloseToolboxPanel(int page_sel, int ok_apply_cancel)
Handles preference page closure.
virtual void SetCurrentViewPort(PlugIn_ViewPort &vp)
Notifies plugin of viewport changes.
virtual void OnContextMenuItemCallback(int id)
Handles context menu item selection.
virtual void UpdateAuiStatus(void)
Updates AUI manager status.
virtual void ShowPreferencesDialog(wxWindow *parent)
Shows the plugin preferences dialog.
virtual void SetColorScheme(PI_ColorScheme cs)
Updates plugin color scheme.
virtual wxBitmap * GetPlugInBitmap()
Get the plugin's icon bitmap.
virtual int Init(void)
Initialize the plugin and declare its capabilities.
virtual wxArrayString GetDynamicChartClassNameArray(void)
Returns array of dynamically loaded chart class names.
virtual void SetupToolboxPanel(int page_sel, wxNotebook *pnotebook)
Creates a plugin preferences page.
virtual bool DeInit(void)
Clean up plugin resources.
virtual void SetDefaults(void)
Sets plugin default options.
virtual wxString GetShortDescription()
Get a brief description of the plugin.
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 wxString GetCommonName()
Get the plugin's common (short) name.
virtual int GetPlugInVersionMajor()
Returns the major version number of the plugin itself.
virtual void SetPositionFix(PlugIn_Position_Fix &pfix)
Updates plugin with current position fix data.
virtual int GetAPIVersionMinor()
Returns the minor version number of the plugin API that this plugin supports.
virtual int GetAPIVersionMajor()
Returns the major version number of the plugin API that this plugin supports.
virtual void SetNMEASentence(wxString &sentence)
Receive all NMEA 0183 sentences from OpenCPN.
virtual bool RenderOverlay(wxMemoryDC *pmdc, PlugIn_ViewPort *vp)
Render plugin overlay graphics using standard device context.
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 SetCursorLatLon(double lat, double lon)
Receives cursor lat/lon position updates.
virtual wxString GetLongDescription()
Get detailed plugin information.
virtual void OnToolbarToolCallback(int id)
Handles toolbar tool clicks.
virtual int GetPlugInVersionMinor()
Returns the minor version number of the plugin itself.
PlugIn Object Definition/API.
PI_ColorScheme
Enumeration of color schemes.