31#include <unordered_map>
37#include <wx/dcmemory.h>
39#include <wx/glcanvas.h>
40#include <wx/notebook.h>
44#include "ocpn_plugin.h"
46extern wxWindow* gFrame;
79 static wxBitmap* bitmap = 0;
80 if (!bitmap) bitmap =
new wxBitmap(1,1);
84opencpn_plugin::~opencpn_plugin() {}
86int opencpn_plugin::Init(
void) {
return 0; }
88bool opencpn_plugin::DeInit(
void) {
return true; }
90int opencpn_plugin::GetAPIVersionMajor() {
return 1; }
92int opencpn_plugin::GetAPIVersionMinor() {
return 2; }
94int opencpn_plugin::GetPlugInVersionMajor() {
return 1; }
96int opencpn_plugin::GetPlugInVersionMinor() {
return 0; }
98wxString opencpn_plugin::GetCommonName() {
return "BaseClassCommonName"; }
100wxString opencpn_plugin::GetShortDescription() {
101 return "OpenCPN PlugIn Base Class";
104wxString opencpn_plugin::GetLongDescription() {
105 return "OpenCPN PlugIn Base Class\n\
106PlugInManager created this base class";
111void opencpn_plugin::SetNMEASentence(wxString& sentence) {}
113void opencpn_plugin::SetAISSentence(wxString& sentence) {}
115int opencpn_plugin::GetToolbarToolCount(
void) {
return 0; }
117int opencpn_plugin::GetToolboxPanelCount(
void) {
return 0; }
119void opencpn_plugin::SetupToolboxPanel(
int page_sel, wxNotebook* pnotebook) {}
121void opencpn_plugin::OnCloseToolboxPanel(
int page_sel,
int ok_apply_cancel) {}
123void opencpn_plugin::ShowPreferencesDialog(wxWindow* parent) {}
125void opencpn_plugin::OnToolbarToolCallback(
int id) {}
127void opencpn_plugin::OnContextMenuItemCallback(
int id) {}
129bool opencpn_plugin::RenderOverlay(wxMemoryDC* dc,
PlugIn_ViewPort* vp) {
133void opencpn_plugin::SetCursorLatLon(
double lat,
double lon) {}
137void opencpn_plugin::SetDefaults(
void) {}
139void opencpn_plugin::ProcessParentResize(
int x,
int y) {}
141void opencpn_plugin::SetColorScheme(PI_ColorScheme cs) {}
143void opencpn_plugin::UpdateAuiStatus(
void) {}
145wxArrayString opencpn_plugin::GetDynamicChartClassNameArray() {
151opencpn_plugin_16::opencpn_plugin_16(
void* pmgr) :
opencpn_plugin(pmgr) {}
153opencpn_plugin_16::~opencpn_plugin_16(
void) {}
159void opencpn_plugin_16::SetPluginMessage(wxString& message_id,
160 wxString& message_body) {}
163opencpn_plugin_17::opencpn_plugin_17(
void* pmgr) :
opencpn_plugin(pmgr) {}
165opencpn_plugin_17::~opencpn_plugin_17(
void) {}
171bool opencpn_plugin_17::RenderGLOverlay(wxGLContext* pcontext,
176void opencpn_plugin_17::SetPluginMessage(wxString& message_id,
177 wxString& message_body) {}
180opencpn_plugin_18::opencpn_plugin_18(
void* pmgr) :
opencpn_plugin(pmgr) {}
182opencpn_plugin_18::~opencpn_plugin_18(
void) {}
188bool opencpn_plugin_18::RenderGLOverlay(wxGLContext* pcontext,
193void opencpn_plugin_18::SetPluginMessage(wxString& message_id,
194 wxString& message_body) {}
201opencpn_plugin_19::~opencpn_plugin_19(
void) {}
203void opencpn_plugin_19::OnSetupOptions(
void) {}
208opencpn_plugin_110::~opencpn_plugin_110(
void) {}
210void opencpn_plugin_110::LateInit(
void) {}
215opencpn_plugin_111::~opencpn_plugin_111(
void) {}
220opencpn_plugin_112::~opencpn_plugin_112(
void) {}
222bool opencpn_plugin_112::MouseEventHook(wxMouseEvent& event) {
return false; }
224void opencpn_plugin_112::SendVectorChartObjectInfo(
225 wxString& chart, wxString& feature, wxString& objname,
double lat,
226 double lon,
double scale,
int nativescale) {}
231opencpn_plugin_113::~opencpn_plugin_113(
void) {}
233bool opencpn_plugin_113::KeyboardEventHook(wxKeyEvent& event) {
return false; }
235void opencpn_plugin_113::OnToolbarToolDownCallback(
int id) {}
236void opencpn_plugin_113::OnToolbarToolUpCallback(
int id) {}
241opencpn_plugin_114::~opencpn_plugin_114(
void) {}
246opencpn_plugin_115::~opencpn_plugin_115(
void) {}
251opencpn_plugin_116::~opencpn_plugin_116(
void) {}
253bool opencpn_plugin_116::RenderGLOverlayMultiCanvas(wxGLContext* pcontext,
259bool opencpn_plugin_116::RenderOverlayMultiCanvas(wxDC& dc,
PlugIn_ViewPort* vp,
264void opencpn_plugin_116::PrepareContextMenu(
int canvasIndex) {
return; }
269int opencpn_plugin_117::GetPlugInVersionPatch() {
return 0; };
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 RenderOverlayMultiCanvas(wxDC &dc, PlugIn_ViewPort *vp, int canvasIndex, int priority=-1)
Render plugin overlay over chart canvas in non-OpenGL mode.
virtual bool RenderGLOverlayMultiCanvas(wxGLContext *pcontext, PlugIn_ViewPort *vp, int canvasIndex, int priority=-1)
Render plugin overlay over chart canvas in OpenGL mode.
virtual wxBitmap * GetPlugInBitmap()
FIXME static wxBitmap* LoadSVG(const wxString filename, unsigned int width, ...