OpenCPN Partial API docs
|
PluginLoader is a backend module without any direct GUI functionality. More...
#include <plugin_loader.h>
Public Member Functions | |
bool | LoadAllPlugIns (bool enabled_plugins) |
void | SetPluginDefaultIcon (const wxBitmap *bitmap) |
const wxBitmap * | GetPluginDefaultIcon () |
bool | UnLoadPlugIn (size_t ix) |
Unload, delete and remove item ix in GetPlugInArray(). More... | |
bool | UnLoadAllPlugIns () |
bool | DeactivateAllPlugIns () |
bool | DeactivatePlugIn (PlugInContainer *pic) |
bool | UpdatePlugIns () |
void | UpdateManagedPlugins () |
PlugInContainer * | LoadPlugIn (wxString plugin_file) |
PlugInContainer * | LoadPlugIn (wxString plugin_file, PlugInContainer *pic) |
ArrayOfPlugIns * | GetPlugInArray () |
bool | IsPlugInAvailable (wxString commonName) |
bool | CheckPluginCompatibility (wxString plugin_file) |
Static Public Member Functions | |
static PluginLoader * | getInstance () |
Public Attributes | |
EventVar | evt_blacklisted_plugin |
EventVar | evt_deactivate_plugin |
Receives a malloc'ed copy of a PlugInContainer owned by listener. More... | |
EventVar | evt_incompatible_plugin |
EventVar | evt_load_directory |
EventVar | evt_load_plugin |
EventVar | evt_plugin_unload |
EventVar | evt_pluglist_change |
EventVar | evt_unreadable_plugin |
EventVar | evt_update_chart_types |
EventVar | evt_plugin_loadall_finalize |
EventVar | evt_version_incompatible_plugin |
PluginLoader is a backend module without any direct GUI functionality.
Instead, it generates events listed here. Each event is mirrored by a public variable, by convention having the same name in lower case.
The general usage pattern to process events, here using EVT_LOAD_PLUGIN:
PluginLoader::getInstance()->evt_load_plugin.listen(this, EVT_LOAD_PLUGIN) Bind(EVT_LOAD_PLUGIN, [&](wxCommandEvent ev) { code to run on event... });
The code in plugin_loader uses evt_load_plugin.notify() to trigger the event. notify() might have a string or void* argument; these are available as ev.GetString() or ev.GetClientData() in the Bind() lambda function.
Examples: PlugInManager::PlugInManager() in pluginmanager.cpp
Definition at line 141 of file plugin_loader.h.
|
inlinevirtual |
Definition at line 160 of file plugin_loader.h.
bool PluginLoader::CheckPluginCompatibility | ( | wxString | plugin_file | ) |
Definition at line 989 of file plugin_loader.cpp.
bool PluginLoader::DeactivateAllPlugIns | ( | ) |
Definition at line 812 of file plugin_loader.cpp.
bool PluginLoader::DeactivatePlugIn | ( | PlugInContainer * | pic | ) |
Definition at line 548 of file plugin_loader.cpp.
|
static |
Definition at line 185 of file plugin_loader.cpp.
|
inline |
Definition at line 177 of file plugin_loader.h.
const wxBitmap * PluginLoader::GetPluginDefaultIcon | ( | ) |
Definition at line 216 of file plugin_loader.cpp.
bool PluginLoader::IsPlugInAvailable | ( | wxString | commonName | ) |
Definition at line 195 of file plugin_loader.cpp.
bool PluginLoader::LoadAllPlugIns | ( | bool | enabled_plugins | ) |
Definition at line 228 of file plugin_loader.cpp.
PlugInContainer * PluginLoader::LoadPlugIn | ( | wxString | plugin_file | ) |
Definition at line 1161 of file plugin_loader.cpp.
PlugInContainer * PluginLoader::LoadPlugIn | ( | wxString | plugin_file, |
PlugInContainer * | pic | ||
) |
Definition at line 1170 of file plugin_loader.cpp.
void PluginLoader::SetPluginDefaultIcon | ( | const wxBitmap * | bitmap | ) |
Definition at line 222 of file plugin_loader.cpp.
bool PluginLoader::UnLoadAllPlugIns | ( | ) |
Definition at line 802 of file plugin_loader.cpp.
bool PluginLoader::UnLoadPlugIn | ( | size_t | ix | ) |
Unload, delete and remove item ix in GetPlugInArray().
Definition at line 606 of file plugin_loader.cpp.
void PluginLoader::UpdateManagedPlugins | ( | ) |
Definition at line 624 of file plugin_loader.cpp.
bool PluginLoader::UpdatePlugIns | ( | ) |
Definition at line 487 of file plugin_loader.cpp.
EventVar PluginLoader::evt_blacklisted_plugin |
Definition at line 143 of file plugin_loader.h.
EventVar PluginLoader::evt_deactivate_plugin |
Receives a malloc'ed copy of a PlugInContainer owned by listener.
Definition at line 146 of file plugin_loader.h.
EventVar PluginLoader::evt_incompatible_plugin |
Definition at line 148 of file plugin_loader.h.
EventVar PluginLoader::evt_load_directory |
Definition at line 149 of file plugin_loader.h.
EventVar PluginLoader::evt_load_plugin |
Definition at line 150 of file plugin_loader.h.
EventVar PluginLoader::evt_plugin_loadall_finalize |
Definition at line 155 of file plugin_loader.h.
EventVar PluginLoader::evt_plugin_unload |
Definition at line 151 of file plugin_loader.h.
EventVar PluginLoader::evt_pluglist_change |
Definition at line 152 of file plugin_loader.h.
EventVar PluginLoader::evt_unreadable_plugin |
Definition at line 153 of file plugin_loader.h.
EventVar PluginLoader::evt_update_chart_types |
Definition at line 154 of file plugin_loader.h.
EventVar PluginLoader::evt_version_incompatible_plugin |
Definition at line 156 of file plugin_loader.h.