OpenCPN Partial API docs
|
Public Member Functions | |
chartdldr_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. | |
void | OnSetupOptions (void) |
Allows plugin to add pages to global Options dialog. | |
void | OnCloseToolboxPanel (int page_sel, int ok_apply_cancel) |
Handles preference page closure. | |
void | ShowPreferencesDialog (wxWindow *parent) |
Shows the plugin preferences dialog. | |
bool | SaveConfig (void) |
bool | ProcessFile (const wxString &aFile, const wxString &aTargetDir, bool aStripPath=true, wxDateTime aMTime=wxDateTime::Now()) |
bool | ExtractZipFiles (const wxString &aZipFile, const wxString &aTargetDir, bool aStripPath=true, wxDateTime aMTime=wxDateTime::Now(), bool aRemoveZip=false) |
bool | ExtractUnarrFiles (const wxString &aRarFile, const wxString &aTargetDir, bool aStripPath=true, wxDateTime aMTime=wxDateTime::Now(), bool aRemoveRar=false) |
void | UpdatePrefs (ChartDldrPrefsDlgImpl *dialog) |
void | SetSourceId (int id) |
int | GetSourceId () |
wxString | GetBaseChartDir () |
![]() | |
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 bool | MouseEventHook (wxMouseEvent &event) |
Handles mouse events from chart window. | |
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) | |
![]() | |
opencpn_plugin_18 (void *pmgr) | |
virtual bool | RenderOverlay (wxDC &dc, PlugIn_ViewPort *vp) |
virtual bool | RenderGLOverlay (wxGLContext *pcontext, PlugIn_ViewPort *vp) |
Renders plugin overlay graphics in OpenGL mode. | |
virtual void | SetPluginMessage (wxString &message_id, wxString &message_body) |
virtual void | SetPositionFixEx (PlugIn_Position_Fix_Ex &pfix) |
Updates plugin with extended position fix data. | |
virtual bool | RenderOverlay (wxMemoryDC *pmdc, PlugIn_ViewPort *vp) |
Render plugin overlay graphics using standard device context. | |
![]() | |
opencpn_plugin (void *pmgr) | |
virtual void | SetDefaults (void) |
Sets plugin default options. | |
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 | SetCursorLatLon (double lat, double lon) |
Receives cursor lat/lon position updates. | |
virtual void | SetCurrentViewPort (PlugIn_ViewPort &vp) |
Notifies plugin of viewport changes. | |
virtual void | SetPositionFix (PlugIn_Position_Fix &pfix) |
Updates plugin with current position fix data. | |
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 | SetColorScheme (PI_ColorScheme cs) |
Updates plugin color scheme. | |
virtual void | OnToolbarToolCallback (int id) |
Handles toolbar tool clicks. | |
virtual void | OnContextMenuItemCallback (int id) |
Handles context menu item selection. | |
virtual void | UpdateAuiStatus (void) |
Updates AUI manager status. | |
virtual wxArrayString | GetDynamicChartClassNameArray (void) |
Returns array of dynamically loaded chart class names. | |
Public Attributes | |
std::vector< std::unique_ptr< ChartSource > > | m_ChartSources |
wxWindow * | m_parent_window |
ChartCatalog | m_pChartCatalog |
ChartSource * | m_pChartSource |
bool | m_preselect_new |
bool | m_preselect_updated |
bool | m_allow_bulk_update |
Definition at line 70 of file chartdldr_pi.h.
chartdldr_pi::chartdldr_pi | ( | void * | ppimgr | ) |
Definition at line 162 of file chartdldr_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 213 of file chartdldr_pi.cpp.
bool chartdldr_pi::ExtractUnarrFiles | ( | const wxString & | aRarFile, |
const wxString & | aTargetDir, | ||
bool | aStripPath = true , |
||
wxDateTime | aMTime = wxDateTime::Now() , |
||
bool | aRemoveRar = false |
||
) |
Definition at line 1907 of file chartdldr_pi.cpp.
bool chartdldr_pi::ExtractZipFiles | ( | const wxString & | aZipFile, |
const wxString & | aTargetDir, | ||
bool | aStripPath = true , |
||
wxDateTime | aMTime = wxDateTime::Now() , |
||
bool | aRemoveZip = false |
||
) |
Definition at line 1996 of file chartdldr_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 231 of file chartdldr_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 233 of file chartdldr_pi.cpp.
|
inline |
Definition at line 125 of file chartdldr_pi.h.
|
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 241 of file chartdldr_pi.cpp.
|
virtual |
Get detailed plugin information.
This required method should return a longer description including:
Reimplemented from opencpn_plugin.
Definition at line 247 of file chartdldr_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 239 of file chartdldr_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 235 of file chartdldr_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 237 of file chartdldr_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 243 of file chartdldr_pi.cpp.
|
inline |
Definition at line 124 of file chartdldr_pi.h.
|
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 180 of file chartdldr_pi.cpp.
|
virtual |
Handles preference page closure.
This method is called when plugin preference pages are closed. Use it to save settings changes or cleanup resources.
page_sel | Index of page being closed |
ok_apply_cancel | Result:
|
Reimplemented from opencpn_plugin.
Definition at line 275 of file chartdldr_pi.cpp.
|
virtual |
Allows plugin to add pages to global Options dialog.
Called during plugin loading step, after Init(). Plugin can add its own pages to the Options dialog.
Reimplemented from opencpn_plugin_19.
Definition at line 254 of file chartdldr_pi.cpp.
bool chartdldr_pi::ProcessFile | ( | const wxString & | aFile, |
const wxString & | aTargetDir, | ||
bool | aStripPath = true , |
||
wxDateTime | aMTime = wxDateTime::Now() |
||
) |
Definition at line 1679 of file chartdldr_pi.cpp.
bool chartdldr_pi::SaveConfig | ( | void | ) |
Definition at line 318 of file chartdldr_pi.cpp.
|
inline |
Definition at line 123 of file chartdldr_pi.h.
|
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 395 of file chartdldr_pi.cpp.
void chartdldr_pi::UpdatePrefs | ( | ChartDldrPrefsDlgImpl * | dialog | ) |
Definition at line 425 of file chartdldr_pi.cpp.
bool chartdldr_pi::m_allow_bulk_update |
Definition at line 128 of file chartdldr_pi.h.
std::vector<std::unique_ptr<ChartSource> > chartdldr_pi::m_ChartSources |
Definition at line 119 of file chartdldr_pi.h.
wxWindow* chartdldr_pi::m_parent_window |
Definition at line 120 of file chartdldr_pi.h.
ChartCatalog chartdldr_pi::m_pChartCatalog |
Definition at line 121 of file chartdldr_pi.h.
ChartSource* chartdldr_pi::m_pChartSource |
Definition at line 122 of file chartdldr_pi.h.
bool chartdldr_pi::m_preselect_new |
Definition at line 126 of file chartdldr_pi.h.
bool chartdldr_pi::m_preselect_updated |
Definition at line 127 of file chartdldr_pi.h.