OpenCPN Partial API docs
|
PlugIn Object Definition/API. More...
#include <wx/xml/xml.h>
#include <wx/dcmemory.h>
#include <wx/dialog.h>
#include <wx/event.h>
#include <wx/menuitem.h>
#include <wx/gdicmn.h>
#include <memory>
#include <vector>
#include <unordered_map>
Go to the source code of this file.
Classes | |
class | PlugIn_ViewPort |
Contains view parameters and status information for a chart display viewport. More... | |
class | PlugIn_Position_Fix |
Basic position fix information. More... | |
class | PlugIn_Position_Fix_Ex |
Extended position fix information. More... | |
class | Plugin_Active_Leg_Info |
Information about the currently active route leg. More... | |
class | PlugIn_AIS_Target |
AIS target information accessible to plugins. More... | |
struct | _ExtentPI |
Geographic extent structure defining a bounding box. More... | |
class | PlugInChartBase |
Base class for implementing custom chart types in OpenCPN plugins. More... | |
class | opencpn_plugin |
Base class for OpenCPN plugins. More... | |
class | opencpn_plugin_16 |
class | opencpn_plugin_17 |
class | opencpn_plugin_18 |
class | opencpn_plugin_19 |
class | opencpn_plugin_110 |
class | opencpn_plugin_111 |
class | opencpn_plugin_112 |
class | opencpn_plugin_113 |
class | opencpn_plugin_114 |
class | opencpn_plugin_115 |
class | opencpn_plugin_116 |
class | opencpn_plugin_117 |
class | opencpn_plugin_118 |
class | opencpn_plugin_119 |
class | opencpn_plugin_120 |
class | Plugin_Hyperlink |
Class representing a hyperlink associated with a waypoint or route. More... | |
class | PlugIn_Waypoint |
Plugin waypoint class providing core waypoint/mark functionality. More... | |
class | PlugIn_Route |
Plugin route class for managing ordered waypoint collections. More... | |
class | PlugIn_Track |
Plugin track class for managing recorded track data. More... | |
struct | DateTimeFormatOptions |
Configuration options for date and time formatting. More... | |
class | PlugInChartBaseGL |
OpenGL-optimized chart base class for plugin chart types. More... | |
class | PlugInChartBaseGLPlus2 |
Extended OpenGL-optimized chart base class with additional querying capabilities. More... | |
class | PlugInChartBaseExtended |
Extended chart base class with separated text rendering. More... | |
class | PlugInChartBaseExtendedPlus2 |
class | PI_line_segment_element |
Represents a line segment element for efficient vector chart rendering. More... | |
class | PI_S57Obj |
Class representing an S-57 chart object. More... | |
class | OCPN_downloadEvent |
class | PlugIn_Waypoint_Ex |
Extended waypoint class with additional navigation features. More... | |
class | PlugIn_Route_Ex |
Extended route class for managing complex route features. More... | |
class | ObservedEvt |
Custom event class for OpenCPN's notification system. More... | |
struct | NMEA2000Id |
Identifier for NMEA 2000 message types. More... | |
struct | NMEA0183Id |
Identifier for NMEA 0183 sentence types. More... | |
struct | SignalkId |
Identifier for Signal K paths. More... | |
struct | NavDataId |
Navigation data message identifier. More... | |
struct | PluginNavdata |
Basic navigation data structure. More... | |
struct | PluginMsgId |
Facade for NavAddrPluginMsg. More... | |
class | PI_Notification |
struct | NotificationMsgId |
Facade for NotificationMsg. More... | |
Macros | |
#define | DECL_EXP |
#define | DECL_IMP |
#define | API_VERSION_MAJOR 1 |
#define | API_VERSION_MINOR 20 |
#define | WANTS_OVERLAY_CALLBACK 0x00000001 |
Receive callbacks to render custom overlay graphics on the chart. | |
#define | WANTS_CURSOR_LATLON 0x00000002 |
Receive updates when cursor moves over chart. | |
#define | WANTS_TOOLBAR_CALLBACK 0x00000004 |
Receive notification when user left-clicks plugin's toolbar buttons. | |
#define | INSTALLS_TOOLBAR_TOOL 0x00000008 |
Plugin will add one or more toolbar buttons. | |
#define | WANTS_CONFIG 0x00000010 |
Plugin requires persistent configuration storage. | |
#define | INSTALLS_TOOLBOX_PAGE 0x00000020 |
Plugin will add pages to the toolbox/settings dialog. | |
#define | INSTALLS_CONTEXTMENU_ITEMS 0x00000040 |
Plugin will add items to chart context menu. | |
#define | WANTS_NMEA_SENTENCES 0x00000080 |
Receive raw NMEA 0183 sentences from all active ports. | |
#define | WANTS_NMEA_EVENTS 0x00000100 |
Receive decoded NMEA events with parsed data. | |
#define | WANTS_AIS_SENTENCES 0x00000200 |
Receive AIS target information and updates. | |
#define | USES_AUI_MANAGER 0x00000400 |
Plugin uses wxAuiManager for window management. | |
#define | WANTS_PREFERENCES 0x00000800 |
Plugin will add page(s) to global preferences dialog. | |
#define | INSTALLS_PLUGIN_CHART 0x00001000 |
Plugin provides new chart type for standard (non-GL) view. | |
#define | WANTS_ONPAINT_VIEWPORT 0x00002000 |
Receive callbacks during chart viewport painting. | |
#define | WANTS_PLUGIN_MESSAGING 0x00004000 |
Enable message passing between plugins. | |
#define | WANTS_OPENGL_OVERLAY_CALLBACK 0x00008000 |
#define | WANTS_DYNAMIC_OPENGL_OVERLAY_CALLBACK 0x00010000 |
#define | WANTS_LATE_INIT 0x00020000 |
Delay full plugin initialization until system is ready. | |
#define | INSTALLS_PLUGIN_CHART_GL 0x00040000 |
Plugin provides new chart type for OpenGL view. | |
#define | WANTS_MOUSE_EVENTS 0x00080000 |
Receive mouse events (clicks, movement, etc). | |
#define | WANTS_VECTOR_CHART_OBJECT_INFO 0x00100000 |
Receive information about vector chart objects. | |
#define | WANTS_KEYBOARD_EVENTS 0x00200000 |
Receive keyboard events from main window. | |
#define | WANTS_PRESHUTDOWN_HOOK 0x00400000 |
Receive notification just before OpenCPN shutdown. | |
#define | OVERLAY_LEGACY 0 |
#define | OVERLAY_OVER_SHIPS 64 |
#define | OVERLAY_OVER_EMBOSS 96 |
#define | OVERLAY_OVER_UI 128 |
#define | PI_FULL_INIT 0 |
Full chart initialization including all data needed for rendering and all operations. | |
#define | PI_HEADER_ONLY 1 |
Initialize only the chart header/metadata for chart database operations (faster, used for chart database building). | |
#define | PI_THUMB_ONLY 2 |
Initialize only what's needed to generate a thumbnail image. | |
#define | PLIB_CAPS_LINE_VBO 1 |
API 1.11 adds access to S52 Presentation library Types. | |
#define | PLIB_CAPS_LINE_BUFFER 1 << 1 |
Support for line vertex buffers Enables batched line rendering using vertex buffers. | |
#define | PLIB_CAPS_SINGLEGEO_BUFFER 1 << 2 |
Support for single geometry buffers Allows combining multiple geometries into a single buffer. | |
#define | PLIB_CAPS_OBJSEGLIST 1 << 3 |
Support for object segment lists Enables breaking complex geometries into optimized segments. | |
#define | PLIB_CAPS_OBJCATMUTATE 1 << 4 |
Support for object category mutation Allows dynamic changes to object display categories. | |
#define | ONLINE_CHECK_RETRY 30 |
#define | OBSERVABLE_EVT_H |
Typedefs | |
typedef enum ChartTypeEnumPI | _ChartTypeEnumPI |
Enumeration of chart types. | |
typedef enum ChartFamilyEnumPI | _ChartFamilyEnumPI |
Enumeration of chart families (broad categories). | |
typedef enum ChartDepthUnitTypePI | _ChartDepthUnitTypePI |
Enumeration of depth unit types used in charts. | |
typedef enum OcpnProjTypePI | _OcpnProjTypePI |
Enumeration of chart projection types. | |
typedef struct _ExtentPI | ExtentPI |
Geographic extent structure defining a bounding box. | |
typedef opencpn_plugin * | create_t(void *) |
typedef void | destroy_t(opencpn_plugin *) |
typedef enum OptionsParentPI | _OptionsParentPI |
Enum defining parent pages in OpenCPN options dialog where plugins can add panels. | |
typedef enum _PI_LUPname | PI_LUPname |
Name identifiers for S57 lookup table sets. | |
typedef enum _PI_DisCat | PI_DisCat |
Display categories for S52 chart features. | |
typedef enum _PI_DisPrio | PI_DisPrio |
Display priority levels for S52 chart objects. | |
typedef enum PI_InitReturn | _PI_InitReturn |
Return values for plugin initialization. | |
typedef enum _OCPN_DLStatus | OCPN_DLStatus |
Status codes for HTTP file download operations. | |
typedef enum _OCPN_DLCondition | OCPN_DLCondition |
Event types for HTTP file download operations. | |
typedef enum _OBJECT_LAYER_REQ | OBJECT_LAYER_REQ |
Filter options for object queries. | |
typedef std::string | DriverHandle |
Plugin API supporting direct access to comm drivers for output purposes. | |
typedef enum CommDriverResult | _CommDriverResult |
Error return values | |
typedef enum _PI_NavMode | PI_NavMode |
Navigation mode options for chart display orientation. | |
Functions | |
WX_DEFINE_ARRAY_PTR (PlugIn_AIS_Target *, ArrayOfPlugIn_AIS_Targets) | |
WX_DECLARE_LIST (Plugin_Hyperlink, Plugin_HyperlinkList) | |
WX_DECLARE_LIST (PlugIn_Waypoint, Plugin_WaypointList) | |
DECL_EXP int | InsertPlugInTool (wxString label, wxBitmap *bitmap, wxBitmap *bmpRollover, wxItemKind kind, wxString shortHelp, wxString longHelp, wxObject *clientData, int position, int tool_sel, opencpn_plugin *pplugin) |
Adds a tool to OpenCPN's toolbar. | |
DECL_EXP void | RemovePlugInTool (int tool_id) |
Removes a tool from OpenCPN's toolbar. | |
DECL_EXP void | SetToolbarToolViz (int item, bool viz) |
Temporarily changes toolbar tool visibility. | |
DECL_EXP void | SetToolbarItemState (int item, bool toggle) |
Sets toolbar item toggle state. | |
DECL_EXP void | SetToolbarToolBitmaps (int item, wxBitmap *bitmap, wxBitmap *bmpRollover) |
Updates toolbar tool bitmaps. | |
DECL_EXP int | InsertPlugInToolSVG (wxString label, wxString SVGfile, wxString SVGfileRollover, wxString SVGfileToggled, wxItemKind kind, wxString shortHelp, wxString longHelp, wxObject *clientData, int position, int tool_sel, opencpn_plugin *pplugin) |
Adds a tool using SVG graphics. | |
DECL_EXP void | SetToolbarToolBitmapsSVG (int item, wxString SVGfile, wxString SVGfileRollover, wxString SVGfileToggled) |
Updates SVG graphics for toolbar tool. | |
DECL_EXP int | AddCanvasContextMenuItem (wxMenuItem *pitem, opencpn_plugin *pplugin) |
Adds item to chart canvas context menu. | |
DECL_EXP void | RemoveCanvasContextMenuItem (int item) |
Removes a context menu item completely. | |
DECL_EXP void | SetCanvasContextMenuItemViz (int item, bool viz) |
Temporarily changes context menu item visibility. | |
DECL_EXP void | SetCanvasContextMenuItemGrey (int item, bool grey) |
Sets menu item enabled/disabled state. | |
DECL_EXP wxFileConfig * | GetOCPNConfigObject (void) |
Gets OpenCPN's configuration object. | |
DECL_EXP void | RequestRefresh (wxWindow *) |
Requests window refresh. | |
DECL_EXP bool | GetGlobalColor (wxString colorName, wxColour *pcolour) |
Gets a global color value. | |
DECL_EXP void | GetCanvasPixLL (PlugIn_ViewPort *vp, wxPoint *pp, double lat, double lon) |
Converts lat/lon to canvas physical pixel coordinates. | |
DECL_EXP void | GetCanvasLLPix (PlugIn_ViewPort *vp, wxPoint p, double *plat, double *plon) |
Converts canvas physical pixel coordinates to lat/lon. | |
DECL_EXP wxWindow * | GetOCPNCanvasWindow () |
Gets OpenCPN's main canvas window. | |
DECL_EXP wxFont * | OCPNGetFont (wxString TextElement, int default_size=0) |
Gets a font for UI elements. | |
DECL_EXP wxString * | GetpSharedDataLocation () |
Gets shared application data location. | |
DECL_EXP ArrayOfPlugIn_AIS_Targets * | GetAISTargetArray (void) |
Gets array of AIS targets. | |
DECL_EXP wxAuiManager * | GetFrameAuiManager (void) |
Gets main frame AUI manager. | |
DECL_EXP bool | AddLocaleCatalog (wxString catalog) |
Adds a locale catalog for translations. | |
DECL_EXP void | PushNMEABuffer (wxString str) |
Pushes NMEA sentence to the system. | |
DECL_EXP wxXmlDocument | GetChartDatabaseEntryXML (int dbIndex, bool b_getGeom) |
Gets chart database entry as XML. | |
DECL_EXP bool | UpdateChartDBInplace (wxArrayString dir_array, bool b_force_update, bool b_ProgressDialog) |
Updates chart database in place. | |
DECL_EXP wxArrayString | GetChartDBDirArrayString () |
Gets chart database directory list. | |
DECL_EXP void | SendPluginMessage (wxString message_id, wxString message_body) |
Sends message to other plugins. | |
DECL_EXP void | DimeWindow (wxWindow *) |
Applies system color scheme to window. | |
DECL_EXP void | JumpToPosition (double lat, double lon, double scale) |
Centers chart display on specified position at given scale. | |
DECL_EXP void | PositionBearingDistanceMercator_Plugin (double lat, double lon, double brg, double dist, double *dlat, double *dlon) |
Calculates destination point given start point, bearing and distance. | |
DECL_EXP void | DistanceBearingMercator_Plugin (double lat0, double lon0, double lat1, double lon1, double *brg, double *dist) |
Calculates bearing and distance between two points. | |
DECL_EXP double | DistGreatCircle_Plugin (double slat, double slon, double dlat, double dlon) |
Calculates great circle distance between two points. | |
DECL_EXP void | toTM_Plugin (float lat, float lon, float lat0, float lon0, double *x, double *y) |
Converts geographic coordinates to Transverse Mercator projection. | |
DECL_EXP void | fromTM_Plugin (double x, double y, double lat0, double lon0, double *lat, double *lon) |
Converts Transverse Mercator coordinates to geographic. | |
DECL_EXP void | toSM_Plugin (double lat, double lon, double lat0, double lon0, double *x, double *y) |
Converts geographic coordinates to Simple Mercator projection. | |
DECL_EXP void | fromSM_Plugin (double x, double y, double lat0, double lon0, double *lat, double *lon) |
Converts Simple Mercator coordinates to geographic. | |
DECL_EXP void | toSM_ECC_Plugin (double lat, double lon, double lat0, double lon0, double *x, double *y) |
Converts geographic coordinates to Elliptical Simple Mercator projection. | |
DECL_EXP void | fromSM_ECC_Plugin (double x, double y, double lat0, double lon0, double *lat, double *lon) |
Converts Elliptical Simple Mercator coordinates to geographic. | |
DECL_EXP bool | DecodeSingleVDOMessage (const wxString &str, PlugIn_Position_Fix_Ex *pos, wxString *acc) |
Decodes a single VDO (Own Ship AIS) message. | |
DECL_EXP int | GetChartbarHeight (void) |
Gets height of chart bar in pixels. | |
DECL_EXP bool | GetActiveRoutepointGPX (char *buffer, unsigned int buffer_length) |
Gets GPX representation of active route waypoint. | |
DECL_EXP wxScrolledWindow * | AddOptionsPage (OptionsParentPI parent, wxString title) |
Adds a new preferences page to OpenCPN options dialog. | |
DECL_EXP bool | DeleteOptionsPage (wxScrolledWindow *page) |
Removes a previously added options page. | |
DECL_EXP double | toUsrDistance_Plugin (double nm_distance, int unit=-1) |
Converts nautical miles to user's preferred distance unit. | |
DECL_EXP double | fromUsrDistance_Plugin (double usr_distance, int unit=-1) |
Converts from user's preferred distance unit to nautical miles. | |
DECL_EXP double | toUsrSpeed_Plugin (double kts_speed, int unit=-1) |
Converts knots to user's preferred speed unit. | |
DECL_EXP double | fromUsrSpeed_Plugin (double usr_speed, int unit=-1) |
Converts from user's preferred speed unit to knots. | |
DECL_EXP double | toUsrTemp_Plugin (double cel_temp, int unit=-1) |
Converts Celsius to user's preferred temperature unit. | |
DECL_EXP double | fromUsrTemp_Plugin (double usr_temp, int unit=-1) |
Converts from user's preferred temperature unit to Celsius. | |
DECL_EXP wxString | getUsrDistanceUnit_Plugin (int unit=-1) |
Gets display string for user's preferred distance unit. | |
DECL_EXP wxString | getUsrSpeedUnit_Plugin (int unit=-1) |
Gets display string for user's preferred speed unit. | |
DECL_EXP wxString | getUsrTempUnit_Plugin (int unit=-1) |
Gets display string for user's preferred temperature unit. | |
DECL_EXP wxString | getUsrWindSpeedUnit_Plugin (int unit=-1) |
Gets display string for user's preferred wind speed unit. | |
DECL_EXP double | toUsrWindSpeed_Plugin (double kts_wspeed, int unit=-1) |
Converts knots to user's preferred wind speed unit. | |
DECL_EXP double | fromUsrWindSpeed_Plugin (double usr_wspeed, int unit=-1) |
Converts from user's preferred wind speed unit to knots. | |
DECL_EXP wxString | getUsrDepthUnit_Plugin (int unit=-1) |
Gets display string for user's preferred depth unit. | |
DECL_EXP double | toUsrDepth_Plugin (double m_depth, int unit=-1) |
Converts meters to user's preferred depth unit. | |
DECL_EXP double | fromUsrDepth_Plugin (double usr_depth, int unit=-1) |
Converts from user's preferred depth unit to meters. | |
DECL_EXP double | fromDMM_PlugIn (wxString sdms) |
Parse a formatted coordinate string to get decimal degrees. | |
DECL_EXP wxString | toUsrDateTimeFormat_Plugin (const wxDateTime date_time, const DateTimeFormatOptions &options=DateTimeFormatOptions()) |
Format a date/time to a localized string representation, conforming to the global date/time format and timezone settings. | |
DECL_EXP wxString | GetNewGUID () |
Generates a new globally unique identifier (GUID). | |
DECL_EXP bool | PlugIn_GSHHS_CrossesLand (double lat1, double lon1, double lat2, double lon2) |
Checks if a great circle route crosses land. | |
DECL_EXP void | PlugInPlaySound (wxString &sound_file) |
Plays a sound file asynchronously. | |
DECL_EXP wxBitmap * | FindSystemWaypointIcon (wxString &icon_name) |
Finds built-in system waypoint icon. | |
DECL_EXP bool | AddCustomWaypointIcon (wxBitmap *pimage, wxString key, wxString description) |
Adds a custom waypoint icon. | |
DECL_EXP bool | AddSingleWaypoint (PlugIn_Waypoint *pwaypoint, bool b_permanent=true) |
Adds a single waypoint. | |
DECL_EXP bool | DeleteSingleWaypoint (wxString &GUID) |
Deletes a single waypoint. | |
DECL_EXP bool | UpdateSingleWaypoint (PlugIn_Waypoint *pwaypoint) |
Updates a single waypoint. | |
DECL_EXP bool | AddPlugInRoute (PlugIn_Route *proute, bool b_permanent=true) |
Adds a new route. | |
DECL_EXP bool | DeletePlugInRoute (wxString &GUID) |
Deletes a route. | |
DECL_EXP bool | UpdatePlugInRoute (PlugIn_Route *proute) |
Updates an existing route. | |
DECL_EXP bool | AddPlugInTrack (PlugIn_Track *ptrack, bool b_permanent=true) |
Adds a new track. | |
DECL_EXP bool | DeletePlugInTrack (wxString &GUID) |
Deletes a track. | |
DECL_EXP bool | UpdatePlugInTrack (PlugIn_Track *ptrack) |
Updates an existing track. | |
wxColour DECL_EXP | GetBaseGlobalColor (wxString colorName) |
Gets a global system color. | |
int DECL_EXP | OCPNMessageBox_PlugIn (wxWindow *parent, const wxString &message, const wxString &caption=_T("Message"), int style=wxOK, int x=-1, int y=-1) |
Shows a message box dialog. | |
DECL_EXP wxString | toSDMM_PlugIn (int NEflag, double a, bool hi_precision=true) |
Convert decimal degrees to a formatted string. | |
DECL_EXP wxString * | GetpPrivateApplicationDataLocation () |
Gets private application data directory. | |
DECL_EXP wxString | GetOCPN_ExePath (void) |
Gets OpenCPN executable path. | |
DECL_EXP wxString * | GetpPlugInLocation () |
Gets plugins directory location. | |
DECL_EXP wxString | GetPlugInPath (opencpn_plugin *pplugin) |
Gets the installation path for a specific plugin. | |
DECL_EXP int | AddChartToDBInPlace (wxString &full_path, bool b_RefreshCanvas) |
Adds a chart to the database without full rebuild. | |
DECL_EXP int | RemoveChartFromDBInPlace (wxString &full_path) |
Removes a chart from database without full rebuild. | |
DECL_EXP wxString | GetLocaleCanonicalName () |
Gets system locale canonical name. | |
WX_DECLARE_LIST (PI_S57Obj, ListOfPI_S57Obj) | |
wxString DECL_EXP | PI_GetPLIBColorScheme () |
Gets current color scheme used by S52 PLIB. | |
int DECL_EXP | PI_GetPLIBDepthUnitInt () |
Gets configured depth unit for S52 display. | |
int DECL_EXP | PI_GetPLIBSymbolStyle () |
Gets configured S52 symbol style. | |
int DECL_EXP | PI_GetPLIBBoundaryStyle () |
Gets configured S52 boundary style. | |
int DECL_EXP | PI_GetPLIBStateHash () |
Gets hash value representing current PLIB state. | |
double DECL_EXP | PI_GetPLIBMarinerSafetyContour () |
Gets configured safety contour depth. | |
bool DECL_EXP | PI_GetObjectRenderBox (PI_S57Obj *pObj, double *lat_min, double *lat_max, double *lon_min, double *lon_max) |
Gets geographic bounding box of S57 object. | |
void DECL_EXP | PI_UpdateContext (PI_S57Obj *pObj) |
Updates rendering context for S57 object. | |
bool DECL_EXP | PI_PLIBObjectRenderCheck (PI_S57Obj *pObj, PlugIn_ViewPort *vp) |
Checks if object should be rendered. | |
PI_LUPname DECL_EXP | PI_GetObjectLUPName (PI_S57Obj *pObj) |
Gets Look-Up Table (LUP) name for object. | |
PI_DisPrio DECL_EXP | PI_GetObjectDisplayPriority (PI_S57Obj *pObj) |
Gets display priority for object. | |
PI_DisCat DECL_EXP | PI_GetObjectDisplayCategory (PI_S57Obj *pObj) |
Gets display category for object. | |
void DECL_EXP | PI_PLIBSetLineFeaturePriority (PI_S57Obj *pObj, int prio) |
Sets rendering priority for line feature. | |
void DECL_EXP | PI_PLIBPrepareForNewRender (void) |
Prepares PLIB for new rendering pass. | |
void DECL_EXP | PI_PLIBFreeContext (void *pContext) |
Frees S52 PLIB context. | |
void DECL_EXP | PI_PLIBSetRenderCaps (unsigned int flags) |
Sets rendering capability flags. | |
bool DECL_EXP | PI_PLIBSetContext (PI_S57Obj *pObj) |
Sets S52 PLIB rendering context for an object. | |
int DECL_EXP | PI_PLIBRenderObjectToDC (wxDC *pdc, PI_S57Obj *pObj, PlugIn_ViewPort *vp) |
Renders an S57 object using standard device context. | |
int DECL_EXP | PI_PLIBRenderAreaToDC (wxDC *pdc, PI_S57Obj *pObj, PlugIn_ViewPort *vp, wxRect rect, unsigned char *pixbuf) |
Renders an S57 area object using standard device context. | |
int DECL_EXP | PI_PLIBRenderAreaToGL (const wxGLContext &glcc, PI_S57Obj *pObj, PlugIn_ViewPort *vp, wxRect &render_rect) |
Renders an S57 area object using OpenGL. | |
int DECL_EXP | PI_PLIBRenderObjectToGL (const wxGLContext &glcc, PI_S57Obj *pObj, PlugIn_ViewPort *vp, wxRect &render_rect) |
Renders any S57 object using OpenGL. | |
DECL_EXP bool | PlugInHasNormalizedViewPort (PlugIn_ViewPort *vp) |
Checks if viewport has been normalized. | |
DECL_EXP void | PlugInMultMatrixViewport (PlugIn_ViewPort *vp, float lat=0, float lon=0) |
Applies viewport transformation matrix. | |
DECL_EXP void | PlugInNormalizeViewport (PlugIn_ViewPort *vp, float lat=0, float lon=0) |
Normalizes viewport parameters. | |
DECL_EXP void | GetDoubleCanvasPixLL (PlugIn_ViewPort *vp, wxPoint2DDouble *pp, double lat, double lon) |
Converts lat/lon to canvas pixels with double precision. | |
DECL_EXP double | fromDMM_Plugin (wxString sdms) |
Converts degrees/decimal minutes string to decimal degrees. | |
DECL_EXP void | SetCanvasRotation (double rotation) |
Sets chart display rotation angle. | |
DECL_EXP void | SetCanvasProjection (int projection) |
Sets chart projection type. | |
DECL_EXP bool | GetSingleWaypoint (wxString GUID, PlugIn_Waypoint *pwaypoint) |
Gets waypoint data by GUID. | |
DECL_EXP bool | CheckEdgePan_PlugIn (int x, int y, bool dragging, int margin, int delta) |
Checks if chart should pan when cursor near edge. | |
DECL_EXP wxBitmap | GetIcon_PlugIn (const wxString &name) |
Gets icon bitmap by name. | |
DECL_EXP void | SetCursor_PlugIn (wxCursor *pPlugin_Cursor=NULL) |
Sets mouse cursor. | |
DECL_EXP wxFont * | GetOCPNScaledFont_PlugIn (wxString TextElement, int default_size=0) |
DECL_EXP wxFont | GetOCPNGUIScaledFont_PlugIn (wxString item) |
Gets a uniquely scaled font copy for responsive UI elements. | |
DECL_EXP double | GetOCPNGUIToolScaleFactor_PlugIn (int GUIScaledFactor) |
Gets GUI scaling factor for a specific scaling level. | |
DECL_EXP double | GetOCPNGUIToolScaleFactor_PlugIn () |
Gets current global GUI scaling factor. | |
DECL_EXP float | GetOCPNChartScaleFactor_Plugin () |
Gets chart rendering scale factor. | |
DECL_EXP wxColour | GetFontColour_PlugIn (wxString TextElement) |
Gets color configured for a UI text element. | |
DECL_EXP double | GetCanvasTilt () |
Gets current canvas tilt angle. | |
DECL_EXP void | SetCanvasTilt (double tilt) |
Gets current canvas tilt angle. | |
DECL_EXP bool | PlugInPlaySoundEx (wxString &sound_file, int deviceIndex=-1) |
Start playing a sound file asynchronously. | |
DECL_EXP void | AddChartDirectory (wxString &path) |
Adds a chart directory to OpenCPN's chart database. | |
DECL_EXP void | ForceChartDBUpdate () |
Forces an update of the chart database. | |
DECL_EXP void | ForceChartDBRebuild () |
Forces complete rebuild of chart database. | |
DECL_EXP wxString | GetWritableDocumentsDir (void) |
Returns the platform-specific default documents directory. | |
DECL_EXP wxDialog * | GetActiveOptionsDialog () |
Gets pointer to active options dialog. | |
DECL_EXP wxArrayString | GetWaypointGUIDArray (void) |
Gets array of all waypoint/marks GUIDs. | |
DECL_EXP wxArrayString | GetIconNameArray (void) |
Gets array of available waypoint icons. | |
DECL_EXP bool | AddPersistentFontKey (wxString TextElement) |
Registers a new font configuration element. | |
DECL_EXP wxString | GetActiveStyleName () |
Gets name of currently active style sheet. | |
DECL_EXP wxBitmap | GetBitmapFromSVGFile (wxString filename, unsigned int width, unsigned int height) |
Creates bitmap from SVG file. | |
DECL_EXP bool | IsTouchInterface_PlugIn (void) |
Checks if touch interface mode is enabled. | |
DECL_EXP int | PlatformDirSelectorDialog (wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir) |
Shows platform-optimized directory selector dialog. | |
DECL_EXP int | PlatformFileSelectorDialog (wxWindow *parent, wxString *file_spec, wxString Title, wxString initDir, wxString suggestedName, wxString wildcard) |
Shows platform-optimized file selector dialog. | |
DECL_EXP _OCPN_DLStatus | OCPN_downloadFile (const wxString &url, const wxString &outputFile, const wxString &title, const wxString &message, const wxBitmap &bitmap, wxWindow *parent, long style, int timeout_secs) |
Synchronously downloads a file with progress dialog. | |
DECL_EXP _OCPN_DLStatus | OCPN_downloadFileBackground (const wxString &url, const wxString &outputFile, wxEvtHandler *handler, long *handle) |
Asynchronously downloads a file in the background. | |
DECL_EXP void | OCPN_cancelDownloadFileBackground (long handle) |
Cancels a background download. | |
DECL_EXP _OCPN_DLStatus | OCPN_postDataHttp (const wxString &url, const wxString ¶meters, wxString &result, int timeout_secs) |
Performs HTTP POST request. | |
DECL_EXP bool | OCPN_isOnline () |
Checks internet connectivity. | |
DECL_EXP bool | LaunchDefaultBrowser_Plugin (wxString url) |
DECL_EXP void | PlugInAISDrawGL (wxGLCanvas *glcanvas, const PlugIn_ViewPort &vp) |
Renders AIS targets on a secondary OpenGL canvas. | |
DECL_EXP bool | PlugInSetFontColor (const wxString TextElement, const wxColour color) |
Sets text color for a UI element. | |
DECL_EXP double | PlugInGetDisplaySizeMM () |
Gets physical display size in millimeters. | |
DECL_EXP wxFont * | FindOrCreateFont_PlugIn (int point_size, wxFontFamily family, wxFontStyle style, wxFontWeight weight, bool underline=false, const wxString &facename=wxEmptyString, wxFontEncoding encoding=wxFONTENCODING_DEFAULT) |
Creates or finds a font in the font cache. | |
DECL_EXP int | PlugInGetMinAvailableGshhgQuality () |
Gets minimum available GSHHS coastline data quality. | |
DECL_EXP int | PlugInGetMaxAvailableGshhgQuality () |
Gets maximum available GSHHS coastline data quality. | |
DECL_EXP void | PlugInHandleAutopilotRoute (bool enable) |
Controls autopilot route handling. | |
DECL_EXP wxString | GetPluginDataDir (const char *plugin_name) |
Return the plugin data directory for a given directory name. | |
DECL_EXP bool | ShuttingDown (void) |
Checks if OpenCPN is in shutdown process. | |
DECL_EXP wxWindow * | PluginGetFocusCanvas () |
Gets the currently focused chart canvas. | |
DECL_EXP wxWindow * | PluginGetOverlayRenderCanvas () |
Gets the canvas currently designated for overlay rendering. | |
DECL_EXP void | CanvasJumpToPosition (wxWindow *canvas, double lat, double lon, double scale) |
Centers specified canvas on given position at given scale. | |
DECL_EXP int | AddCanvasMenuItem (wxMenuItem *pitem, opencpn_plugin *pplugin, const char *name="") |
Adds item to canvas context menu. | |
DECL_EXP void | RemoveCanvasMenuItem (int item, const char *name="") |
Removes a context menu item completely. | |
DECL_EXP void | SetCanvasMenuItemViz (int item, bool viz, const char *name="") |
Temporarily changes context menu item visibility. | |
DECL_EXP void | SetCanvasMenuItemGrey (int item, bool grey, const char *name="") |
Sets menu item enabled/disabled state. | |
DECL_EXP wxString | GetSelectedWaypointGUID_Plugin () |
Gets GUID of currently selected waypoint. | |
DECL_EXP wxString | GetSelectedRouteGUID_Plugin () |
Gets GUID of currently selected route. | |
DECL_EXP wxString | GetSelectedTrackGUID_Plugin () |
Gets GUID of currently selected track. | |
DECL_EXP std::unique_ptr< PlugIn_Waypoint > | GetWaypoint_Plugin (const wxString &) |
Gets waypoint details by GUID. | |
DECL_EXP std::unique_ptr< PlugIn_Route > | GetRoute_Plugin (const wxString &) |
Gets route details by GUID. | |
DECL_EXP std::unique_ptr< PlugIn_Track > | GetTrack_Plugin (const wxString &) |
Gets track details by GUID. | |
DECL_EXP wxWindow * | GetCanvasUnderMouse () |
Gets canvas window under mouse cursor. | |
DECL_EXP int | GetCanvasIndexUnderMouse () |
Gets index of chart canvas under mouse cursor. | |
DECL_EXP wxWindow * | GetCanvasByIndex (int canvasIndex) |
Gets chart canvas window by index. | |
DECL_EXP int | GetCanvasCount () |
Gets total number of chart canvases. | |
DECL_EXP bool | CheckMUIEdgePan_PlugIn (int x, int y, bool dragging, int margin, int delta, int canvasIndex) |
Checks if chart should pan when cursor near edge. | |
DECL_EXP void | SetMUICursor_PlugIn (wxCursor *pCursor, int canvasIndex) |
Sets mouse cursor for specific canvas. | |
DECL_EXP wxRect | GetMasterToolbarRect () |
Gets bounding rectangle of master toolbar. | |
DECL_EXP int | GetLatLonFormat (void) |
Gets currently selected latitude/longitude display format. | |
DECL_EXP void | ZeroXTE () |
Resets cross track error to zero. | |
WX_DECLARE_LIST (PlugIn_Waypoint_Ex, Plugin_WaypointExList) | |
DECL_EXP wxArrayString | GetRouteGUIDArray (void) |
Gets array of route GUIDs. | |
DECL_EXP wxArrayString | GetTrackGUIDArray (void) |
Gets array of track GUIDs. | |
DECL_EXP bool | GetSingleWaypointEx (wxString GUID, PlugIn_Waypoint_Ex *pwaypoint) |
Gets extended waypoint data by GUID. | |
DECL_EXP bool | AddSingleWaypointEx (PlugIn_Waypoint_Ex *pwaypoint, bool b_permanent=true) |
Adds a waypoint with extended properties. | |
DECL_EXP bool | UpdateSingleWaypointEx (PlugIn_Waypoint_Ex *pwaypoint) |
Updates an existing extended waypoint. | |
DECL_EXP bool | AddPlugInRouteEx (PlugIn_Route_Ex *proute, bool b_permanent=true) |
Adds a route with extended features. | |
DECL_EXP bool | UpdatePlugInRouteEx (PlugIn_Route_Ex *proute) |
Updates an existing extended route. | |
DECL_EXP std::unique_ptr< PlugIn_Waypoint_Ex > | GetWaypointEx_Plugin (const wxString &) |
Gets extended waypoint by GUID. | |
DECL_EXP std::unique_ptr< PlugIn_Route_Ex > | GetRouteEx_Plugin (const wxString &) |
Gets extended route by GUID. | |
DECL_EXP wxString | GetActiveWaypointGUID (void) |
Gets GUID of currently active waypoint. | |
DECL_EXP wxString | GetActiveRouteGUID (void) |
Gets GUID of currently active route. | |
DECL_EXP double | OCPN_GetDisplayContentScaleFactor () |
Gets content scaling factor for current display. | |
DECL_EXP double | OCPN_GetWinDIPScaleFactor () |
Gets Windows-specific DPI scaling factor. | |
DECL_EXP std::vector< std::string > | GetPriorityMaps () |
Gets list of configured priority mapping schemes. | |
DECL_EXP std::vector< std::string > | GetActivePriorityIdentifiers () |
Gets list of active priority identifiers. | |
DECL_EXP int | GetGlobalWatchdogTimoutSeconds () |
Gets global watchdog timeout value. | |
DECL_EXP wxArrayString | GetRouteGUIDArray (OBJECT_LAYER_REQ req) |
Gets array of route GUIDs with layer filtering. | |
DECL_EXP wxArrayString | GetTrackGUIDArray (OBJECT_LAYER_REQ req) |
Gets array of track GUIDs with layer filtering. | |
DECL_EXP wxArrayString | GetWaypointGUIDArray (OBJECT_LAYER_REQ req) |
Gets array of waypoint/track GUIDs with layer filtering. | |
wxDECLARE_EVENT (obsNOTIFY, ObservedEvt) | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NMEA2000Id id, wxEventType ev, wxEvtHandler *handler) |
Gets listener for NMEA 2000 messages. | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NMEA0183Id id, wxEventType ev, wxEvtHandler *handler) |
Gets listener for NMEA 0183 messages. | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (SignalkId id, wxEventType ev, wxEvtHandler *handler) |
Gets listener for Signal K updates. | |
DECL_EXP std::vector< uint8_t > | GetN2000Payload (NMEA2000Id id, ObservedEvt ev) |
Return N2K payload for a received n2000 message of type id in ev. | |
DECL_EXP std::shared_ptr< void > | GetSignalkPayload (ObservedEvt ev) |
Get SignalK status payload after receiving a message. | |
DECL_EXP std::string | GetN2000Source (NMEA2000Id id, ObservedEvt ev) |
Return source identifier (iface) of a received n2000 message of type id in ev. | |
DECL_EXP std::string | GetN0183Payload (NMEA0183Id id, ObservedEvt ev) |
Return payload in a received n0183 message of type id in ev. | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NavDataId id, wxEventType ev, wxEvtHandler *handler) |
Gets listener for navigation data updates. | |
DECL_EXP PluginNavdata | GetEventNavdata (ObservedEvt ev) |
Return BasicNavDataMsg decoded data available in ev. | |
DECL_EXP std::vector< DriverHandle > | GetActiveDrivers () |
Query OCPN core for a list of active drivers | |
DECL_EXP const std::unordered_map< std::string, std::string > | GetAttributes (DriverHandle handle) |
Query a specific driver for attributes. | |
DECL_EXP CommDriverResult | WriteCommDriver (DriverHandle handle, const std::shared_ptr< std::vector< uint8_t > > &payload) |
Send a non-NMEA2000 message. | |
DECL_EXP CommDriverResult | WriteCommDriverN2K (DriverHandle handle, int PGN, int destinationCANAddress, int priority, const std::shared_ptr< std::vector< uint8_t > > &payload) |
Send a PGN message to an NMEA2000 address. | |
DECL_EXP CommDriverResult | RegisterTXPGNs (DriverHandle handle, std::vector< int > &pgn_list) |
Register PGNs that this application intends to transmit for some NMEA 2000 adapters like Actisense NGT-1. | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (PluginMsgId id, wxEventType ev, wxEvtHandler *handler) |
Return listener for plugin messages, internal or received on the REST interface. | |
DECL_EXP std::string | GetPluginMsgPayload (PluginMsgId id, ObservedEvt ev) |
Retrieve the string in a plugin message, internal or received on the REST insterface. | |
DECL_EXP void | ExitOCPN () |
Exits OpenCPN application. | |
DECL_EXP void | RequestWindowRefresh (wxWindow *win, bool eraseBackground) |
Requests window refresh. | |
DECL_EXP bool | GetFullScreen () |
Gets full screen state. | |
DECL_EXP void | SetFullScreen (bool full_screen_on) |
Sets full screen mode. | |
DECL_EXP void | EnableTouchMode (bool enable) |
Enables/disables touch interface mode. | |
DECL_EXP bool | GetTouchMode () |
Gets touch interface mode state. | |
DECL_EXP void | SetGlobalColor (std::string table, std::string name, wxColor color) |
Sets a color in the global color scheme. | |
DECL_EXP wxColor | GetGlobalColorD (std::string map_name, std::string name) |
Gets a color from the global color scheme. | |
DECL_EXP void | EnableStatusBar (bool enable) |
Shows/hides the status bar. | |
DECL_EXP void | EnableMenu (bool enable) |
Shows/hides the main menu bar. | |
DECL_EXP bool | GetEnableStatusBar () |
Gets status bar visibility state. | |
DECL_EXP bool | GetEnableMenu () |
Gets menu bar visibility state. | |
DECL_EXP void | SetNavigationMode (PI_NavMode mode, int CanvasIndex) |
Sets the navigation mode for a specific chart canvas. | |
DECL_EXP PI_NavMode | GetNavigationMode (int CanvasIndex) |
Gets current navigation mode for a canvas. | |
DECL_EXP void | EnableLookaheadMode (bool enable, int CanvasIndex) |
Enables/disables look-ahead mode for a canvas. | |
DECL_EXP bool | GetEnableLookaheadMode (int CanvasIndex) |
Gets look-ahead mode state for a canvas. | |
DECL_EXP void | EnableMUIBar (bool enable, int CanvasIndex) |
Controls visibility of MUI (Mobile/Touch User Interface) bar. | |
DECL_EXP void | EnableCompassGPSIcon (bool enable, int CanvasIndex) |
Controls visibility of compass/GPS status icon. | |
DECL_EXP void | EnableChartBar (bool enable, int CanvasIndex) |
Controls visibility of chart info bar. | |
DECL_EXP bool | GetEnableMUIBar (int CanvasIndex) |
Gets MUI bar visibility state. | |
DECL_EXP bool | GetEnableCompassGPSIcon (int CanvasIndex) |
Gets compass icon visibility state. | |
DECL_EXP bool | GetEnableChartBar (int CanvasIndex) |
Gets chart bar visibility state. | |
DECL_EXP void | EnableCanvasFocusBar (bool enable, int CanvasIndex) |
Controls visibility of canvas focus indicator. | |
DECL_EXP bool | GetEnableCanvasFocusBar (int CanvasIndex) |
Gets focus indicator visibility state. | |
DECL_EXP void | EnableLatLonGrid (bool enable, int CanvasIndex) |
Controls latitude/longitude grid display. | |
DECL_EXP void | EnableChartOutlines (bool enable, int CanvasIndex) |
Controls chart outline display. | |
DECL_EXP void | EnableDepthUnitDisplay (bool enable, int CanvasIndex) |
Controls depth unit display. | |
DECL_EXP void | EnableAisTargetDisplay (bool enable, int CanvasIndex) |
Controls AIS target display. | |
DECL_EXP void | EnableTideStationsDisplay (bool enable, int CanvasIndex) |
Controls tide station icon display. | |
DECL_EXP void | EnableCurrentStationsDisplay (bool enable, int CanvasIndex) |
Controls current station icon display. | |
DECL_EXP void | EnableENCTextDisplay (bool enable, int CanvasIndex) |
Controls ENC text label display. | |
DECL_EXP void | EnableENCDepthSoundingsDisplay (bool enable, int CanvasIndex) |
Controls ENC depth sounding display. | |
DECL_EXP void | EnableBuoyLightLabelsDisplay (bool enable, int CanvasIndex) |
Controls buoy/light name label display. | |
DECL_EXP void | EnableLightsDisplay (bool enable, int CanvasIndex) |
Controls light icon display. | |
DECL_EXP void | EnableLightDescriptionsDisplay (bool enable, int CanvasIndex) |
Controls light description text display. | |
DECL_EXP void | SetENCDisplayCategory (PI_DisCat cat, int CanvasIndex) |
Sets ENC (Electronic Navigation Chart) feature display category. | |
DECL_EXP bool | GetEnableLatLonGrid (int CanvasIndex) |
Gets latitude/longitude grid visibility state. | |
DECL_EXP bool | GetEnableChartOutlines (int CanvasIndex) |
Gets chart outline visibility state. | |
DECL_EXP bool | GetEnableDepthUnitDisplay (int CanvasIndex) |
Gets depth unit display state. | |
DECL_EXP bool | GetEnableAisTargetDisplay (int CanvasIndex) |
Gets AIS target display state. | |
DECL_EXP bool | GetEnableTideStationsDisplay (int CanvasIndex) |
Gets tide station icon visibility. | |
DECL_EXP bool | GetEnableCurrentStationsDisplay (int CanvasIndex) |
Gets current station icon visibility. | |
DECL_EXP bool | GetEnableENCTextDisplay (int CanvasIndex) |
Gets ENC text label visibility. | |
DECL_EXP bool | GetEnableENCDepthSoundingsDisplay (int CanvasIndex) |
Gets ENC depth sounding visibility. | |
DECL_EXP bool | GetEnableBuoyLightLabelsDisplay (int CanvasIndex) |
Gets buoy/light label visibility. | |
DECL_EXP bool | GetEnableLightsDisplay (int CanvasIndex) |
Gets light icon visibility. | |
DECL_EXP bool | GetEnableLightDescriptionsDisplay (int CanvasIndex) |
Gets light description text visibility. | |
DECL_EXP PI_DisCat | GetENCDisplayCategory (int CanvasIndex) |
Gets current ENC display category. | |
DECL_EXP void | PluginSetFollowMode (int CanvasIndex, bool enable_follow) |
Set follow mode for a specific canvas. | |
DECL_EXP bool | PluginGetFollowMode (int CanvasIndex) |
Get the current follow mode status for a specific canvas. | |
DECL_EXP void | SetTrackingMode (bool enable) |
Enable or disable tracking mode. | |
DECL_EXP bool | GetTrackingMode () |
Get the current tracking mode status. | |
DECL_EXP void | SetAppColorScheme (PI_ColorScheme cs) |
Set the application color scheme. | |
DECL_EXP PI_ColorScheme | GetAppColorScheme () |
Get the current application color scheme. | |
DECL_EXP void | EnableSplitScreenLayout (bool enable=true) |
Enable or disable the split-screen layout. | |
DECL_EXP void | PluginZoomCanvas (int CanvasIndex, double factor) |
Zoom a specific chart canvas by the given factor. | |
DECL_EXP bool | GetEnableMainToolbar () |
Check if the main toolbar is enabled. | |
DECL_EXP void | SetEnableMainToolbar (bool enable) |
Show or hide the main toolbar. | |
DECL_EXP void | ShowGlobalSettingsDialog () |
Display the global settings dialog. | |
DECL_EXP void | PluginCenterOwnship (int CanvasIndex) |
Center the chart view on the own ship position for a specific canvas. | |
DECL_EXP bool | GetEnableTenHertzUpdate () |
Check if 10 Hz update rate is enabled. | |
DECL_EXP void | EnableTenHertzUpdate (bool enable) |
Enable or disable 10 Hz update rate. | |
DECL_EXP void | ConfigFlushAndReload () |
Flush configuration changes to disk and reload settings. | |
DECL_EXP void | ReloadConfigConnections () |
DECL_EXP int | GetActiveNotificationCount () |
DECL_EXP PI_NotificationSeverity | GetMaxActiveNotificationLevel () |
DECL_EXP std::string | RaiseNotification (const PI_NotificationSeverity _severity, const std::string &_message, int timeout_secs=-1) |
DECL_EXP bool | AcknowledgeNotification (const std::string &guid) |
DECL_EXP std::vector< std::shared_ptr< PI_Notification > > | GetActiveNotifications () |
DECL_EXP void | EnableNotificationCanvasIcon (bool enable) |
Plugin Notification Framework GUI support. | |
DECL_EXP std::shared_ptr< ObservableListener > | GetListener (NotificationMsgId id, wxEventType ev, wxEvtHandler *handler) |
Return listener for Notification Framework messages interface. | |
DECL_EXP std::shared_ptr< PI_Notification > | GetNotificationMsgPayload (NotificationMsgId id, ObservedEvt ev) |
Retrieve the Notification Event in a Notification message. | |
Variables | |
DECL_EXP wxEventType | wxEVT_DOWNLOAD_EVENT |
PlugIn Object Definition/API.
Definition in file ocpn_plugin.h.
#define API_VERSION_MAJOR 1 |
Definition at line 67 of file ocpn_plugin.h.
#define API_VERSION_MINOR 20 |
Definition at line 68 of file ocpn_plugin.h.
#define DECL_EXP |
Definition at line 36 of file ocpn_plugin.h.
#define DECL_IMP |
Definition at line 43 of file ocpn_plugin.h.
#define INSTALLS_CONTEXTMENU_ITEMS 0x00000040 |
Plugin will add items to chart context menu.
Enables extending the right-click menu with custom actions.
Definition at line 115 of file ocpn_plugin.h.
#define INSTALLS_PLUGIN_CHART 0x00001000 |
Plugin provides new chart type for standard (non-GL) view.
Used by plugins that implement custom chart formats.
Definition at line 134 of file ocpn_plugin.h.
#define INSTALLS_PLUGIN_CHART_GL 0x00040000 |
Plugin provides new chart type for OpenGL view.
Used by plugins that implement custom chart formats with OpenGL support.
Definition at line 148 of file ocpn_plugin.h.
#define INSTALLS_TOOLBAR_TOOL 0x00000008 |
Plugin will add one or more toolbar buttons.
Enables plugin to extend OpenCPN toolbar with custom functionality.
Definition at line 106 of file ocpn_plugin.h.
#define INSTALLS_TOOLBOX_PAGE 0x00000020 |
Plugin will add pages to the toolbox/settings dialog.
Allows plugin to provide custom configuration UI in OpenCPN settings.
Definition at line 112 of file ocpn_plugin.h.
#define OBSERVABLE_EVT_H |
Definition at line 5426 of file ocpn_plugin.h.
#define ONLINE_CHECK_RETRY 30 |
Definition at line 4504 of file ocpn_plugin.h.
#define OVERLAY_LEGACY 0 |
Definition at line 167 of file ocpn_plugin.h.
#define OVERLAY_OVER_EMBOSS 96 |
Definition at line 169 of file ocpn_plugin.h.
#define OVERLAY_OVER_SHIPS 64 |
Definition at line 168 of file ocpn_plugin.h.
#define OVERLAY_OVER_UI 128 |
Definition at line 170 of file ocpn_plugin.h.
#define PI_FULL_INIT 0 |
Full chart initialization including all data needed for rendering and all operations.
Definition at line 425 of file ocpn_plugin.h.
#define PI_HEADER_ONLY 1 |
Initialize only the chart header/metadata for chart database operations (faster, used for chart database building).
Definition at line 428 of file ocpn_plugin.h.
#define PI_THUMB_ONLY 2 |
Initialize only what's needed to generate a thumbnail image.
Definition at line 430 of file ocpn_plugin.h.
#define PLIB_CAPS_LINE_BUFFER 1 << 1 |
Support for line vertex buffers Enables batched line rendering using vertex buffers.
Optimizes performance by reducing draw calls.
Definition at line 3279 of file ocpn_plugin.h.
#define PLIB_CAPS_LINE_VBO 1 |
API 1.11 adds access to S52 Presentation library Types.
OpenGL and vector rendering capability flags for S52 PLIB.
These flags define various capabilities and optimizations available for rendering vector charts and S52 features. They are used by plugins to indicate what rendering features they support. Support for OpenGL Vertex Buffer Objects (VBO) Enables hardware-accelerated rendering of vector lines using modern OpenGL VBOs. More efficient than immediate mode rendering.
Definition at line 3275 of file ocpn_plugin.h.
#define PLIB_CAPS_OBJCATMUTATE 1 << 4 |
Support for object category mutation Allows dynamic changes to object display categories.
Required for runtime S52 display category changes.
Definition at line 3291 of file ocpn_plugin.h.
#define PLIB_CAPS_OBJSEGLIST 1 << 3 |
Support for object segment lists Enables breaking complex geometries into optimized segments.
Improves culling and rendering of large objects.
Definition at line 3287 of file ocpn_plugin.h.
#define PLIB_CAPS_SINGLEGEO_BUFFER 1 << 2 |
Support for single geometry buffers Allows combining multiple geometries into a single buffer.
Reduces memory usage and draw calls.
Definition at line 3283 of file ocpn_plugin.h.
#define USES_AUI_MANAGER 0x00000400 |
Plugin uses wxAuiManager for window management.
Needed for plugins that create dockable windows or panels.
Definition at line 128 of file ocpn_plugin.h.
#define WANTS_AIS_SENTENCES 0x00000200 |
Receive AIS target information and updates.
Required for plugins that monitor or process vessel traffic data.
Definition at line 125 of file ocpn_plugin.h.
#define WANTS_CONFIG 0x00000010 |
Plugin requires persistent configuration storage.
Enables access to the config file for saving and loading settings.
Definition at line 109 of file ocpn_plugin.h.
#define WANTS_CURSOR_LATLON 0x00000002 |
Receive updates when cursor moves over chart.
Enables plugins to show information about chart features at cursor position.
Definition at line 90 of file ocpn_plugin.h.
#define WANTS_DYNAMIC_OPENGL_OVERLAY_CALLBACK 0x00010000 |
Definition at line 142 of file ocpn_plugin.h.
#define WANTS_KEYBOARD_EVENTS 0x00200000 |
Receive keyboard events from main window.
Enables plugins to implement keyboard shortcuts or commands.
Definition at line 157 of file ocpn_plugin.h.
#define WANTS_LATE_INIT 0x00020000 |
Delay full plugin initialization until system is ready.
Useful for plugins that need complete system initialization.
Definition at line 145 of file ocpn_plugin.h.
#define WANTS_MOUSE_EVENTS 0x00080000 |
Receive mouse events (clicks, movement, etc).
Enables plugins to respond to user mouse interaction.
Definition at line 151 of file ocpn_plugin.h.
#define WANTS_NMEA_EVENTS 0x00000100 |
Receive decoded NMEA events with parsed data.
Provides easy access to specific navigation data without parsing raw sentences.
Definition at line 122 of file ocpn_plugin.h.
#define WANTS_NMEA_SENTENCES 0x00000080 |
Receive raw NMEA 0183 sentences from all active ports.
Used for plugins that need to process navigation data directly.
Definition at line 118 of file ocpn_plugin.h.
#define WANTS_ONPAINT_VIEWPORT 0x00002000 |
Receive callbacks during chart viewport painting.
Enables custom drawing in standard (non-GL) chart display.
Definition at line 137 of file ocpn_plugin.h.
#define WANTS_OPENGL_OVERLAY_CALLBACK 0x00008000 |
Definition at line 141 of file ocpn_plugin.h.
#define WANTS_OVERLAY_CALLBACK 0x00000001 |
Receive callbacks to render custom overlay graphics on the chart.
Used for drawing additional navigation data, markers, or custom visualizations.
Definition at line 86 of file ocpn_plugin.h.
#define WANTS_PLUGIN_MESSAGING 0x00004000 |
Enable message passing between plugins.
Required for plugins that need to communicate with other plugins.
Definition at line 140 of file ocpn_plugin.h.
#define WANTS_PREFERENCES 0x00000800 |
Plugin will add page(s) to global preferences dialog.
Allows plugin to integrate configuration UI with main preferences.
Definition at line 131 of file ocpn_plugin.h.
#define WANTS_PRESHUTDOWN_HOOK 0x00400000 |
Receive notification just before OpenCPN shutdown.
Allows plugins to clean up resources and save state.
Definition at line 160 of file ocpn_plugin.h.
#define WANTS_TOOLBAR_CALLBACK 0x00000004 |
Receive notification when user left-clicks plugin's toolbar buttons.
Required for plugins that need to respond to their toolbar button actions. opencpn_plugin::OnToolbarToolCallback() will be called with the button ID when user left-clicks a toolbar button.
Definition at line 100 of file ocpn_plugin.h.
#define WANTS_VECTOR_CHART_OBJECT_INFO 0x00100000 |
Receive information about vector chart objects.
Enables access to S57 chart feature data and attributes.
Definition at line 154 of file ocpn_plugin.h.
typedef enum CommDriverResult _CommDriverResult |
Error return values
Result codes for communication driver operations.
These values indicate the result status of operations performed on communication drivers like sending messages or registering parameters.
typedef enum OptionsParentPI _OptionsParentPI |
Enum defining parent pages in OpenCPN options dialog where plugins can add panels.
When adding plugin preference panels using AddOptionsPage(), the plugin must specify which main section should contain the new panel.
typedef enum PI_InitReturn _PI_InitReturn |
Return values for plugin initialization.
These values are returned by opencpn_plugin::Init() to indicate the result of plugin initialization and guide OpenCPN's handling of initialization failures.
typedef opencpn_plugin * create_t(void *) |
Definition at line 1602 of file ocpn_plugin.h.
typedef void destroy_t(opencpn_plugin *) |
Definition at line 1603 of file ocpn_plugin.h.
typedef std::string DriverHandle |
Plugin API supporting direct access to comm drivers for output purposes.
Definition of OCPN DriverHandle
Definition at line 5686 of file ocpn_plugin.h.
typedef enum _OBJECT_LAYER_REQ OBJECT_LAYER_REQ |
Filter options for object queries.
Controls whether layer objects are included when querying routes, tracks and waypoints.
typedef enum _OCPN_DLCondition OCPN_DLCondition |
Event types for HTTP file download operations.
These values identify different stages of the download process when receiving download progress events.
typedef enum _OCPN_DLStatus OCPN_DLStatus |
Status codes for HTTP file download operations.
These values indicate the final result or current state of file download operations initiated through the plugin download API.
typedef enum _PI_DisCat PI_DisCat |
Display categories for S52 chart features.
These categories control the visibility of chart features according to IHO S-52 presentation library specifications. Features can be assigned to different categories to allow selective display based on importance and use case.
The categories form a hierarchy:
typedef enum _PI_DisPrio PI_DisPrio |
Display priority levels for S52 chart objects.
These values define the drawing order for different types of chart features according to IHO S-52 presentation library specifications. Higher priority objects are drawn on top of lower priority objects.
The priorities form a hierarchy from base fill patterns through to user navigation objects:
typedef enum _PI_LUPname PI_LUPname |
Name identifiers for S57 lookup table sets.
These values represent the fifth letter in S52 lookup table names, defining which drawing rules to use for different chart feature types:
typedef enum _PI_NavMode PI_NavMode |
Navigation mode options for chart display orientation.
These values define how the chart display is oriented relative to north, course, or heading. Different modes are useful for different navigation scenarios.
enum _OBJECT_LAYER_REQ |
Filter options for object queries.
Controls whether layer objects are included when querying routes, tracks and waypoints.
Enumerator | |
---|---|
OBJECTS_ALL | Return all objects including those in layers. |
OBJECTS_NO_LAYERS | Exclude objects that are in layers. |
OBJECTS_ONLY_LAYERS | Return only objects that are in layers. |
Definition at line 5357 of file ocpn_plugin.h.
enum _OCPN_DLCondition |
Event types for HTTP file download operations.
These values identify different stages of the download process when receiving download progress events.
Definition at line 4451 of file ocpn_plugin.h.
enum _OCPN_DLStatus |
Status codes for HTTP file download operations.
These values indicate the final result or current state of file download operations initiated through the plugin download API.
Definition at line 4436 of file ocpn_plugin.h.
enum _PI_DisCat |
Display categories for S52 chart features.
These categories control the visibility of chart features according to IHO S-52 presentation library specifications. Features can be assigned to different categories to allow selective display based on importance and use case.
The categories form a hierarchy:
Definition at line 3588 of file ocpn_plugin.h.
enum _PI_DisPrio |
Display priority levels for S52 chart objects.
These values define the drawing order for different types of chart features according to IHO S-52 presentation library specifications. Higher priority objects are drawn on top of lower priority objects.
The priorities form a hierarchy from base fill patterns through to user navigation objects:
Enumerator | |
---|---|
PI_PRIO_NODATA | No data fill area pattern (lowest priority) |
PI_PRIO_GROUP1 | S57 group 1 filled areas (land, etc) |
PI_PRIO_AREA_1 | Superimposed areas. |
PI_PRIO_AREA_2 | Superimposed areas including water features. |
PI_PRIO_SYMB_POINT | Point symbols including land features. |
PI_PRIO_SYMB_LINE | Line symbols including restricted areas. |
PI_PRIO_SYMB_AREA | Area symbols including traffic areas. |
PI_PRIO_ROUTEING | Routeing lines (TSS, recommended tracks) |
PI_PRIO_HAZARDS | Hazards, buoys, beacons. |
PI_PRIO_MARINERS | VRM, EBL, own ship (highest priority) |
PI_PRIO_NUM | Number of priority levels. |
Definition at line 3612 of file ocpn_plugin.h.
enum _PI_LUPname |
Name identifiers for S57 lookup table sets.
These values represent the fifth letter in S52 lookup table names, defining which drawing rules to use for different chart feature types:
Enumerator | |
---|---|
PI_SIMPLIFIED | Point objects using simplified symbols. |
PI_PAPER_CHART | Point objects using traditional paper chart symbols. |
PI_LINES | Line objects (e.g., depth contours, coastlines) |
PI_PLAIN_BOUNDARIES | Area objects with simple boundaries. |
PI_SYMBOLIZED_BOUNDARIES | Area objects with symbolized boundaries. |
PI_LUPNAME_NUM | Total number of lookup table types. |
Definition at line 3563 of file ocpn_plugin.h.
enum _PI_NavMode |
Navigation mode options for chart display orientation.
These values define how the chart display is oriented relative to north, course, or heading. Different modes are useful for different navigation scenarios.
Definition at line 5804 of file ocpn_plugin.h.
enum ChartDepthUnitTypePI |
Enumeration of depth unit types used in charts.
Definition at line 382 of file ocpn_plugin.h.
enum ChartFamilyEnumPI |
Enumeration of chart families (broad categories).
Enumerator | |
---|---|
PI_CHART_FAMILY_UNKNOWN | Chart family is unknown. |
PI_CHART_FAMILY_RASTER | Raster chart formats (KAP, GEO, etc.) |
PI_CHART_FAMILY_VECTOR | Vector chart formats (S-57, CM93, etc.) |
PI_CHART_FAMILY_DONTCARE | Chart family is not important for the operation. |
Definition at line 372 of file ocpn_plugin.h.
enum ChartTypeEnumPI |
Enumeration of chart types.
Enumerator | |
---|---|
PI_CHART_TYPE_UNKNOWN | Chart type is unknown or undefined. |
PI_CHART_TYPE_DUMMY | Dummy chart used when no actual chart is available. |
PI_CHART_TYPE_DONTCARE | Chart type is not important for the operation. |
PI_CHART_TYPE_KAP | BSB/KAP raster chart format. |
PI_CHART_TYPE_GEO | GEO raster chart format. |
PI_CHART_TYPE_S57 | S-57 vector chart format. |
PI_CHART_TYPE_CM93 | CM93 vector chart format. |
PI_CHART_TYPE_CM93COMP | CM93 Composite vector chart format. |
PI_CHART_TYPE_PLUGIN | Chart type provided by a plugin. |
Definition at line 357 of file ocpn_plugin.h.
enum CommDriverResult |
Error return values
Result codes for communication driver operations.
These values indicate the result status of operations performed on communication drivers like sending messages or registering parameters.
Definition at line 5696 of file ocpn_plugin.h.
enum OCPN_DLDialogStyle |
Definition at line 4460 of file ocpn_plugin.h.
enum OcpnProjTypePI |
Enumeration of chart projection types.
Definition at line 392 of file ocpn_plugin.h.
enum OptionsParentPI |
Enum defining parent pages in OpenCPN options dialog where plugins can add panels.
When adding plugin preference panels using AddOptionsPage(), the plugin must specify which main section should contain the new panel.
Enumerator | |
---|---|
PI_OPTIONS_PARENT_DISPLAY | Display settings section. For options affecting chart display, colors, etc. |
PI_OPTIONS_PARENT_CONNECTIONS | Connections section. For options affecting data connections, ports, etc. |
PI_OPTIONS_PARENT_CHARTS | Charts section. For options affecting chart loading, display, etc. |
PI_OPTIONS_PARENT_SHIPS | Ships section. For options affecting vessel display, AIS, etc. |
PI_OPTIONS_PARENT_UI | User Interface section. For options affecting toolbars, interface, etc. |
PI_OPTIONS_PARENT_PLUGINS | Plugins section. For plugin-specific settings and configuration. |
Definition at line 2639 of file ocpn_plugin.h.
enum PI_ColorScheme |
Enumeration of color schemes.
Definition at line 178 of file ocpn_plugin.h.
enum PI_InitReturn |
Return values for plugin initialization.
These values are returned by opencpn_plugin::Init() to indicate the result of plugin initialization and guide OpenCPN's handling of initialization failures.
Definition at line 3633 of file ocpn_plugin.h.
|
strong |
Plugin Notification Framework support.
Definition at line 6323 of file ocpn_plugin.h.
Enumeration of AIS alarm states.
Enumerator | |
---|---|
PI_AIS_NO_ALARM | No alarm condition exists. |
PI_AIS_ALARM_SET | Alarm has been set but not acknowledged. |
PI_AIS_ALARM_ACKNOWLEDGED | Alarm has been acknowledged by the user. |
Definition at line 318 of file ocpn_plugin.h.
enum SDDMFORMAT |
Coordinate format options for lat/lon display.
These values define the different formats available for displaying geographic coordinates in the UI.
Definition at line 5008 of file ocpn_plugin.h.
|
extern |
Definition at line 344 of file plugin_api.cpp.
DECL_EXP int AddCanvasContextMenuItem | ( | wxMenuItem * | pitem, |
opencpn_plugin * | pplugin | ||
) |
Adds item to chart canvas context menu.
This method adds a menu item to the right-click context menu.
pitem | Menu item to add |
pplugin | Pointer to plugin instance |
Definition at line 212 of file ocpn_plugin_gui.cpp.
DECL_EXP int AddCanvasMenuItem | ( | wxMenuItem * | pitem, |
opencpn_plugin * | pplugin, | ||
const char * | name = "" |
||
) |
Adds item to canvas context menu.
pitem | Menu item to add |
pplugin | Pointer to plugin instance |
name | Optional canvas name for multi-canvas configs |
Definition at line 192 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a chart directory to OpenCPN's chart database.
Registers a new directory containing charts for OpenCPN to scan and include in its database.
path | Full path to directory containing charts |
Definition at line 1450 of file ocpn_plugin_gui.cpp.
DECL_EXP int AddChartToDBInPlace | ( | wxString & | full_path, |
bool | b_RefreshCanvas | ||
) |
Adds a chart to the database without full rebuild.
Adds a single chart to OpenCPN's database and optionally refreshes display.
full_path | Full path to chart file |
b_RefreshCanvas | True to refresh display after adding |
Definition at line 484 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a custom waypoint icon.
Registers a new custom waypoint icon for use in OpenCPN.
pimage | Bitmap image for the icon |
key | Unique identifier for the icon |
description | User-friendly description |
Definition at line 829 of file ocpn_plugin_gui.cpp.
DECL_EXP bool AddLocaleCatalog | ( | wxString | catalog | ) |
Adds a locale catalog for translations.
Adds a plugin's translation catalog to OpenCPN's locale system.
catalog | Path to translation catalog file |
Definition at line 417 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a new preferences page to OpenCPN options dialog.
Creates a new panel in the specified section of the options dialog. Plugin should populate the returned wxScrolledWindow with preference controls.
parent | Parent section to add page to (see OptionsParentPI enum) |
title | Title shown for the new page |
Definition at line 550 of file ocpn_plugin_gui.cpp.
|
extern |
Registers a new font configuration element.
Allows plugins to define custom UI elements needing font configuration, beyond the standard elements defined in OCPNGetFont().
TextElement | New UI element identifier to register |
Definition at line 329 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a new route.
Creates a new route and adds it to OpenCPN's route management system.
proute | Route to add |
b_permanent | True to save persistently, false for temporary |
Definition at line 1149 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a route with extended features.
Creates a new route supporting advanced properties like descriptions.
proute | Extended route data to add |
b_permanent | True to save persistently, false for temporary |
Definition at line 2114 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a new track.
Creates a new track and adds it to OpenCPN's track manager.
ptrack | Track to add |
b_permanent | True to save persistently, false for temporary |
Definition at line 1235 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a single waypoint.
Creates a new waypoint and adds it to OpenCPN's waypoint management system.
pwaypoint | Waypoint to add |
b_permanent | True to save persistently, false for temporary |
Definition at line 857 of file ocpn_plugin_gui.cpp.
|
extern |
Adds a waypoint with extended properties.
Creates a new waypoint supporting advanced features like range rings.
pwaypoint | Extended waypoint data to add |
b_permanent | True to save persistently, false for temporary |
Definition at line 2009 of file ocpn_plugin_gui.cpp.
DECL_EXP void CanvasJumpToPosition | ( | wxWindow * | canvas, |
double | lat, | ||
double | lon, | ||
double | scale | ||
) |
Centers specified canvas on given position at given scale.
canvas | Canvas window to adjust view for |
lat | Target latitude in decimal degrees |
lon | Target longitude in decimal degrees |
scale | Display scale factor (larger = more zoomed in) |
Definition at line 1659 of file ocpn_plugin_gui.cpp.
|
extern |
Checks if chart should pan when cursor near edge.
Tests if automatic chart panning should occur based on cursor position.
x | Cursor X coordinate |
y | Cursor Y coordinate |
dragging | True if mouse is being dragged |
margin | Edge margin width in pixels |
delta | Pan amount in pixels |
Definition at line 1436 of file ocpn_plugin_gui.cpp.
|
extern |
Checks if chart should pan when cursor near edge.
Tests if automatic chart panning should occur based on cursor position for a specific canvas.
x | Cursor X coordinate in canvas space |
y | Cursor Y coordinate in canvas space |
dragging | True if mouse is being dragged |
margin | Edge margin width in pixels |
delta | Pan amount in pixels |
canvasIndex | Index of canvas to check |
Definition at line 1701 of file ocpn_plugin_gui.cpp.
|
extern |
Flush configuration changes to disk and reload settings.
Forces immediate saving of any pending configuration changes and reloads all settings.
Definition at line 2757 of file ocpn_plugin_gui.cpp.
DECL_EXP bool DecodeSingleVDOMessage | ( | const wxString & | str, |
PlugIn_Position_Fix_Ex * | pos, | ||
wxString * | acc | ||
) |
Decodes a single VDO (Own Ship AIS) message.
Parses a VDO sentence and extracts position and accuracy information.
str | The raw VDO sentence |
pos | Will receive decoded position data |
acc | Will receive accuracy information |
Definition at line 588 of file ocpn_plugin_gui.cpp.
|
extern |
Removes a previously added options page.
page | Pointer to page previously returned by AddOptionsPage() |
Definition at line 583 of file ocpn_plugin_gui.cpp.
|
extern |
Deletes a route.
Removes route identified by GUID from OpenCPN.
GUID | Unique identifier of route to delete |
Definition at line 1206 of file ocpn_plugin_gui.cpp.
|
extern |
Deletes a track.
Removes track identified by GUID from OpenCPN.
GUID | Unique identifier of track to delete |
Definition at line 1277 of file ocpn_plugin_gui.cpp.
|
extern |
Deletes a single waypoint.
Removes waypoint identified by GUID from OpenCPN.
GUID | Unique identifier of waypoint to delete |
Definition at line 904 of file ocpn_plugin_gui.cpp.
DECL_EXP void DimeWindow | ( | wxWindow * | win | ) |
Applies system color scheme to window.
Adjusts window colors to match OpenCPN's color scheme.
window | Window to adjust colors for |
Definition at line 410 of file ocpn_plugin_gui.cpp.
DECL_EXP void DistanceBearingMercator_Plugin | ( | double | lat0, |
double | lon0, | ||
double | lat1, | ||
double | lon1, | ||
double * | brg, | ||
double * | dist | ||
) |
Calculates bearing and distance between two points.
Uses Mercator projection math.
lat0 | Start latitude in decimal degrees |
lon0 | Start longitude in decimal degrees |
lat1 | End latitude in decimal degrees |
lon1 | End longitude in decimal degrees |
brg | Bearing in degrees true (output) |
dist | Distance in nautical miles (output) |
Definition at line 664 of file ocpn_plugin_gui.cpp.
DECL_EXP double DistGreatCircle_Plugin | ( | double | slat, |
double | slon, | ||
double | dlat, | ||
double | dlon | ||
) |
Calculates great circle distance between two points.
slat | Start latitude in decimal degrees |
slon | Start longitude in decimal degrees |
dlat | End latitude in decimal degrees |
dlon | End longitude in decimal degrees |
Definition at line 669 of file ocpn_plugin_gui.cpp.
|
extern |
Controls AIS target display.
enable | True to show AIS targets |
CanvasIndex | Index of target canvas |
Definition at line 2434 of file ocpn_plugin_gui.cpp.
|
extern |
Controls buoy/light name label display.
enable | True to show buoy/light names |
CanvasIndex | Index of target canvas |
Definition at line 2469 of file ocpn_plugin_gui.cpp.
|
extern |
Controls visibility of canvas focus indicator.
Shows which canvas currently has input focus.
enable | True to show focus indicator |
CanvasIndex | Index of target canvas |
Definition at line 2739 of file ocpn_plugin_gui.cpp.
|
extern |
Controls visibility of chart info bar.
enable | True to show chart bar |
CanvasIndex | Index of target canvas |
Definition at line 2364 of file ocpn_plugin_gui.cpp.
|
extern |
Controls chart outline display.
enable | True to show available chart boundaries |
CanvasIndex | Index of target canvas |
Definition at line 2420 of file ocpn_plugin_gui.cpp.
|
extern |
Controls visibility of compass/GPS status icon.
enable | True to show compass icon |
CanvasIndex | Index of target canvas |
Definition at line 2338 of file ocpn_plugin_gui.cpp.
|
extern |
Controls current station icon display.
enable | True to show current station markers |
CanvasIndex | Index of target canvas |
Definition at line 2448 of file ocpn_plugin_gui.cpp.
|
extern |
Controls depth unit display.
enable | True to show depth unit indicators |
CanvasIndex | Index of target canvas |
Definition at line 2427 of file ocpn_plugin_gui.cpp.
|
extern |
Controls ENC depth sounding display.
enable | True to show depth soundings |
CanvasIndex | Index of target canvas |
Definition at line 2462 of file ocpn_plugin_gui.cpp.
|
extern |
Controls ENC text label display.
enable | True to show ENC feature text labels |
CanvasIndex | Index of target canvas |
Definition at line 2455 of file ocpn_plugin_gui.cpp.
|
extern |
Controls latitude/longitude grid display.
enable | True to show lat/lon grid lines |
CanvasIndex | Index of target canvas |
Definition at line 2413 of file ocpn_plugin_gui.cpp.
|
extern |
Controls light description text display.
enable | True to show light descriptions |
CanvasIndex | Index of target canvas |
Definition at line 2483 of file ocpn_plugin_gui.cpp.
|
extern |
Controls light icon display.
enable | True to show light icons |
CanvasIndex | Index of target canvas |
Definition at line 2476 of file ocpn_plugin_gui.cpp.
|
extern |
Enables/disables look-ahead mode for a canvas.
Look-ahead mode shifts chart view ahead of vessel position.
enable | True to enable look-ahead |
CanvasIndex | Index of target canvas |
Definition at line 2634 of file ocpn_plugin_gui.cpp.
|
extern |
Shows/hides the main menu bar.
enable | True to show menu bar, false to hide |
Definition at line 2382 of file ocpn_plugin_gui.cpp.
|
extern |
Controls visibility of MUI (Mobile/Touch User Interface) bar.
enable | True to show MUI bar |
CanvasIndex | Index of target canvas |
Definition at line 2317 of file ocpn_plugin_gui.cpp.
|
extern |
Plugin Notification Framework GUI support.
Definition at line 2779 of file ocpn_plugin_gui.cpp.
|
extern |
Enable or disable the split-screen layout.
Controls whether OpenCPN uses multiple chart canvases in a split-screen configuration.
enable | True to enable split-screen layout, false for single canvas mode. |
Definition at line 2669 of file ocpn_plugin_gui.cpp.
|
extern |
Shows/hides the status bar.
enable | True to show status bar, false to hide |
Definition at line 2357 of file ocpn_plugin_gui.cpp.
|
extern |
Enable or disable 10 Hz update rate.
Controls the frequency of position updates and screen redraws.
enable | True to enable 10 Hz updates, false for standard update rate. |
Definition at line 2755 of file ocpn_plugin_gui.cpp.
|
extern |
Controls tide station icon display.
enable | True to show tide station markers |
CanvasIndex | Index of target canvas |
Definition at line 2441 of file ocpn_plugin_gui.cpp.
|
extern |
Enables/disables touch interface mode.
enable | True to enable touch optimized interface |
Definition at line 2630 of file ocpn_plugin_gui.cpp.
|
extern |
Exits OpenCPN application.
Triggers a clean shutdown of OpenCPN.
Definition at line 2304 of file ocpn_plugin_gui.cpp.
|
extern |
Creates or finds a font in the font cache.
point_size | Font size in points |
family | Font family (wxFONTFAMILY_SWISS etc) |
style | Style flags (wxFONTSTYLE_NORMAL etc) |
weight | Weight flags (wxFONTWEIGHT_NORMAL etc) |
underline | True for underlined font |
facename | Font face name, empty for default |
encoding | Font encoding, wxFONTENCODING_DEFAULT for default |
Definition at line 1533 of file ocpn_plugin_gui.cpp.
|
extern |
Finds built-in system waypoint icon.
Retrieves standard waypoint icon bitmap by name from OpenCPN's icon set.
icon_name | Name/identifier of icon to find |
|
extern |
Forces complete rebuild of chart database.
Triggers OpenCPN to do a full rebuild of its chart database by rescanning all configured chart directories from scratch.
Definition at line 1463 of file ocpn_plugin_gui.cpp.
|
extern |
Forces an update of the chart database.
Triggers OpenCPN to scan configured chart directories for new or removed charts and update the database accordingly.
Definition at line 1456 of file ocpn_plugin_gui.cpp.
|
extern |
Parse a formatted coordinate string to get decimal degrees.
This function attempts to parse a wide variety of formatted coordinate strings and convert them to decimal degrees. It handles formats like:
sdms | The formatted coordinate string to parse |
Definition at line 761 of file ocpn_plugin_gui.cpp.
|
extern |
Converts degrees/decimal minutes string to decimal degrees.
Parses position strings in DDMMss format like "4930.000N".
sdms | Position string in degrees/decimal minutes format |
Definition at line 1399 of file ocpn_plugin_gui.cpp.
DECL_EXP void fromSM_ECC_Plugin | ( | double | x, |
double | y, | ||
double | lat0, | ||
double | lon0, | ||
double * | lat, | ||
double * | lon | ||
) |
Converts Elliptical Simple Mercator coordinates to geographic.
x | Easting coordinate |
y | Northing coordinate |
lat0 | Reference latitude |
lon0 | Central meridian |
lat | Latitude in decimal degrees (output) |
lon | Longitude in decimal degrees (output) |
Definition at line 699 of file ocpn_plugin_gui.cpp.
DECL_EXP void fromSM_Plugin | ( | double | x, |
double | y, | ||
double | lat0, | ||
double | lon0, | ||
double * | lat, | ||
double * | lon | ||
) |
Converts Simple Mercator coordinates to geographic.
x | Easting coordinate |
y | Northing coordinate |
lat0 | Reference latitude |
lon0 | Central meridian |
lat | Latitude in decimal degrees (output) |
lon | Longitude in decimal degrees (output) |
Definition at line 689 of file ocpn_plugin_gui.cpp.
DECL_EXP void fromTM_Plugin | ( | double | x, |
double | y, | ||
double | lat0, | ||
double | lon0, | ||
double * | lat, | ||
double * | lon | ||
) |
Converts Transverse Mercator coordinates to geographic.
x | Easting coordinate |
y | Northing coordinate |
lat0 | Reference latitude |
lon0 | Central meridian |
lat | Latitude in decimal degrees (output) |
lon | Longitude in decimal degrees (output) |
Definition at line 679 of file ocpn_plugin_gui.cpp.
|
extern |
Converts from user's preferred depth unit to meters.
usr_depth | Depth in user's unit |
unit | Override unit choice (-1 for user preference): 0=feet, 1=meters, 2=fathoms |
Definition at line 755 of file ocpn_plugin_gui.cpp.
DECL_EXP double fromUsrDistance_Plugin | ( | double | usr_distance, |
int | unit = -1 |
||
) |
Converts from user's preferred distance unit to nautical miles.
usr_distance | Distance value in user's unit |
unit | Override unit choice (-1 for user preference): 0=nm, 1=km, 2=mi, 3=fathoms |
Definition at line 708 of file ocpn_plugin_gui.cpp.
DECL_EXP double fromUsrSpeed_Plugin | ( | double | usr_speed, |
int | unit = -1 |
||
) |
Converts from user's preferred speed unit to knots.
usr_speed | Speed value in user's unit |
unit | Override unit choice (-1 for user preference): 0=knots, 1=km/h, 2=mph, 3=m/s |
Definition at line 720 of file ocpn_plugin_gui.cpp.
DECL_EXP double fromUsrTemp_Plugin | ( | double | usr_temp, |
int | unit = -1 |
||
) |
Converts from user's preferred temperature unit to Celsius.
usr_temp | Temperature in user's unit |
unit | Override unit choice (-1 for user preference): 0=Celsius, 1=Fahrenheit |
Definition at line 732 of file ocpn_plugin_gui.cpp.
|
extern |
Converts from user's preferred wind speed unit to knots.
usr_wspeed | Wind speed in user's unit |
unit | Override unit choice (-1 for user preference): 0=knots, 1=m/s, 2=mph, 3=km/h |
Definition at line 724 of file ocpn_plugin_gui.cpp.
|
extern |
Query OCPN core for a list of active drivers
Query OCPN core for a list of active drivers
Definition at line 151 of file plugin_api.cpp.
|
extern |
Definition at line 326 of file plugin_api.cpp.
|
extern |
Definition at line 349 of file plugin_api.cpp.
|
extern |
Gets pointer to active options dialog.
Definition at line 1469 of file ocpn_plugin_gui.cpp.
|
extern |
Gets list of active priority identifiers.
Returns list of currently active data source priority identifiers.
Definition at line 2261 of file ocpn_plugin_gui.cpp.
|
extern |
Gets GUID of currently active route.
Definition at line 2243 of file ocpn_plugin_gui.cpp.
DECL_EXP bool GetActiveRoutepointGPX | ( | char * | buffer, |
unsigned int | buffer_length | ||
) |
Gets GPX representation of active route waypoint.
Retrieves an XML/GPX format description of the currently active route waypoint. The buffer will contain a GPX formatted waypoint like:
<?xml version="1.0"?> <wpt lat="50.123456" lon="-4.123456"> <name>Waypoint Name</name> <sym>triangle</sym> <type>WPT</type> <time>2024-03-12T10:30:00Z</time> <extensions> <opencpn:guid>12345678-1234-1234-1234-123456789012</opencpn:guid> <opencpn:viz>1</opencpn:viz> <opencpn:viz_name>0</opencpn:viz_name> </extensions> </wpt>
buffer | Pre-allocated char buffer to receive GPX data |
buffer_length | Size of provided buffer in bytes |
Definition at line 650 of file ocpn_plugin_gui.cpp.
|
extern |
Gets name of currently active style sheet.
Returns the name of the currently selected S52 presentation library style. Style sheets control the overall appearance of vector chart features.
Definition at line 333 of file ocpn_plugin_gui.cpp.
|
extern |
Gets GUID of currently active waypoint.
Definition at line 2234 of file ocpn_plugin_gui.cpp.
DECL_EXP ArrayOfPlugIn_AIS_Targets * GetAISTargetArray | ( | void | ) |
Gets array of AIS targets.
Returns array of all currently tracked AIS targets.
Definition at line 372 of file ocpn_plugin_gui.cpp.
|
extern |
Get the current application color scheme.
Definition at line 2661 of file ocpn_plugin_gui.cpp.
|
extern |
Query a specific driver for attributes.
Driver attributes are available from OCPN core as a hash map of tag->attribute pairs. There is a defined set of common tags guaranteed for every driver. Both tags and attributes are defined as std::string. Here is the list of common tag-attribute pairs.
Tag Attribute definition
"protocol" Comm bus device protocol, such as "NMEA0183", "NMEA2000"
Definition at line 162 of file plugin_api.cpp.
wxColour DECL_EXP GetBaseGlobalColor | ( | wxString | colorName | ) |
Gets a global system color.
Retrieves a base color value from OpenCPN's color management system.
colorName | Name of the color to retrieve |
Definition at line 4267 of file pluginmanager.cpp.
|
extern |
Creates bitmap from SVG file.
Renders an SVG file to a bitmap at the specified dimensions. Useful for creating resolution-independent toolbar icons and other graphics.
filename | Full path to SVG file |
width | Desired bitmap width in pixels |
height | Desired bitmap height in pixels |
Definition at line 340 of file ocpn_plugin_gui.cpp.
|
extern |
Gets chart canvas window by index.
Retrieves pointer to a specific canvas window by its index number in multi-canvas configurations.
canvasIndex | Index of canvas to get (0-based) |
Definition at line 1690 of file ocpn_plugin_gui.cpp.
|
extern |
Gets total number of chart canvases.
Returns the number of active chart canvas windows.
Definition at line 1726 of file ocpn_plugin_gui.cpp.
|
extern |
Gets index of chart canvas under mouse cursor.
Returns the index of the canvas window that the mouse cursor is currently positioned over in multi-canvas configurations. Note that having the mouse over a canvas does not automatically give that canvas focus - it merely indicates mouse position.
Definition at line 1669 of file ocpn_plugin_gui.cpp.
DECL_EXP void GetCanvasLLPix | ( | PlugIn_ViewPort * | vp, |
wxPoint | p, | ||
double * | plat, | ||
double * | plon | ||
) |
Converts canvas physical pixel coordinates to lat/lon.
Transforms screen physical pixels to geographic coordinates for the given viewport.
vp | Current viewport |
p | Physical pixel coordinates |
plat | Will receive latitude in decimal degrees |
plon | Will receive longitude in decimal degrees |
Definition at line 282 of file ocpn_plugin_gui.cpp.
DECL_EXP void GetCanvasPixLL | ( | PlugIn_ViewPort * | vp, |
wxPoint * | pp, | ||
double | lat, | ||
double | lon | ||
) |
Converts lat/lon to canvas physical pixel coordinates.
Transforms geographic coordinates to screen physical pixels for the given viewport.
vp | Current viewport |
pp | Will receive physical pixel coordinates |
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
Definition at line 249 of file ocpn_plugin_gui.cpp.
|
extern |
Gets current canvas tilt angle.
Returns the tilt angle of the chart display canvas in degrees. Tilt provides a 3D perspective view of the chart.
Definition at line 1405 of file ocpn_plugin_gui.cpp.
|
extern |
Gets canvas window under mouse cursor.
Definition at line 1667 of file ocpn_plugin_gui.cpp.
DECL_EXP int GetChartbarHeight | ( | void | ) |
Gets height of chart bar in pixels.
Definition at line 614 of file ocpn_plugin_gui.cpp.
|
extern |
Gets chart database entry as XML.
Retrieves XML representation of chart database entry.
dbIndex | Index of chart in database |
b_getGeom | True to include chart geometry info |
Definition at line 456 of file ocpn_plugin_gui.cpp.
|
extern |
Gets chart database directory list.
Returns array of chart directories in database.
Definition at line 480 of file ocpn_plugin_gui.cpp.
DECL_EXP void GetDoubleCanvasPixLL | ( | PlugIn_ViewPort * | vp, |
wxPoint2DDouble * | pp, | ||
double | lat, | ||
double | lon | ||
) |
Converts lat/lon to canvas pixels with double precision.
High-precision version of GetCanvasPixLL() for accurate positioning. Transforms geographic coordinates to canvas pixel coordinates.
vp | Current viewport settings |
pp | Will receive pixel coordinates as doubles |
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
Definition at line 266 of file ocpn_plugin_gui.cpp.
|
extern |
Gets AIS target display state.
CanvasIndex | Index of canvas to query |
Definition at line 2566 of file ocpn_plugin_gui.cpp.
|
extern |
Gets buoy/light label visibility.
CanvasIndex | Index of canvas to query |
Definition at line 2606 of file ocpn_plugin_gui.cpp.
|
extern |
Gets focus indicator visibility state.
CanvasIndex | Index of canvas to query |
Definition at line 2745 of file ocpn_plugin_gui.cpp.
|
extern |
Gets chart bar visibility state.
CanvasIndex | Index of canvas to query |
Definition at line 2379 of file ocpn_plugin_gui.cpp.
|
extern |
Gets chart outline visibility state.
CanvasIndex | Index of canvas to query |
Definition at line 2550 of file ocpn_plugin_gui.cpp.
|
extern |
Gets compass icon visibility state.
CanvasIndex | Index of canvas to query |
Definition at line 2345 of file ocpn_plugin_gui.cpp.
|
extern |
Gets current station icon visibility.
CanvasIndex | Index of canvas to query |
Definition at line 2582 of file ocpn_plugin_gui.cpp.
|
extern |
Gets depth unit display state.
CanvasIndex | Index of canvas to query |
Definition at line 2558 of file ocpn_plugin_gui.cpp.
|
extern |
Gets ENC depth sounding visibility.
CanvasIndex | Index of canvas to query |
Definition at line 2598 of file ocpn_plugin_gui.cpp.
|
extern |
Gets ENC text label visibility.
CanvasIndex | Index of canvas to query |
Definition at line 2590 of file ocpn_plugin_gui.cpp.
|
extern |
Gets latitude/longitude grid visibility state.
CanvasIndex | Index of canvas to query |
Definition at line 2542 of file ocpn_plugin_gui.cpp.
|
extern |
Gets light description text visibility.
CanvasIndex | Index of canvas to query |
|
extern |
Gets light icon visibility.
CanvasIndex | Index of canvas to query |
Definition at line 2614 of file ocpn_plugin_gui.cpp.
|
extern |
Gets look-ahead mode state for a canvas.
CanvasIndex | Index of canvas to query |
Definition at line 2641 of file ocpn_plugin_gui.cpp.
|
extern |
Check if the main toolbar is enabled.
Definition at line 2698 of file ocpn_plugin_gui.cpp.
|
extern |
Gets menu bar visibility state.
Definition at line 2398 of file ocpn_plugin_gui.cpp.
|
extern |
Gets MUI bar visibility state.
CanvasIndex | Index of canvas to query |
Definition at line 2336 of file ocpn_plugin_gui.cpp.
|
extern |
Gets status bar visibility state.
Definition at line 2362 of file ocpn_plugin_gui.cpp.
|
extern |
Check if 10 Hz update rate is enabled.
When enabled, position updates and screen redraws occur at approximately 10 times per second.
Definition at line 2753 of file ocpn_plugin_gui.cpp.
|
extern |
Gets tide station icon visibility.
CanvasIndex | Index of canvas to query |
Definition at line 2574 of file ocpn_plugin_gui.cpp.
|
extern |
Gets current ENC display category.
CanvasIndex | Index of canvas to query |
Definition at line 2514 of file ocpn_plugin_gui.cpp.
|
extern |
Return BasicNavDataMsg decoded data available in ev.
Definition at line 135 of file plugin_api.cpp.
|
extern |
Gets color configured for a UI text element.
TextElement | UI element ID like "AISTargetAlert" |
Definition at line 364 of file ocpn_plugin_gui.cpp.
DECL_EXP wxAuiManager * GetFrameAuiManager | ( | void | ) |
Gets main frame AUI manager.
Provides access to wxAuiManager controlling OpenCPN's main frame layout. Used by plugins that need to add/manage dockable windows.
Definition at line 394 of file ocpn_plugin_gui.cpp.
|
extern |
Gets full screen state.
Definition at line 2306 of file ocpn_plugin_gui.cpp.
DECL_EXP bool GetGlobalColor | ( | wxString | colorName, |
wxColour * | pcolour | ||
) |
Gets a global color value.
Retrieves color values from OpenCPN's color scheme system.
colorName | Name of the color to retrieve |
pcolour | Pointer to wxColour to receive the color value |
Definition at line 298 of file ocpn_plugin_gui.cpp.
|
extern |
Gets a color from the global color scheme.
map_name | Color scheme name ("DAY", "DUSK", "NIGHT") |
name | Color identifier within scheme |
Definition at line 2404 of file ocpn_plugin_gui.cpp.
|
extern |
Gets global watchdog timeout value.
Returns timeout in seconds used by system watchdog monitoring.
Gets global watchdog timeout value.
Definition at line 2253 of file ocpn_plugin_gui.cpp.
|
extern |
Gets icon bitmap by name.
Retrieves standard OpenCPN toolbar icon bitmap by name.
name | Name/identifier of icon to get |
Definition at line 1441 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of available waypoint icons.
Definition at line 1139 of file ocpn_plugin_gui.cpp.
|
extern |
Gets currently selected latitude/longitude display format.
Returns the coordinate format currently configured in OpenCPN settings.
Definition at line 1732 of file ocpn_plugin_gui.cpp.
|
extern |
Gets listener for navigation data updates.
Creates a listener to receive basic navigation data updates including position, course, speed etc.
id | NavDataId identifying message type to listen for |
ev | Event type to generate on updates |
handler | Event handler to receive updates |
Definition at line 119 of file plugin_api.cpp.
|
extern |
Gets listener for NMEA 0183 messages.
Creates a listener to receive NMEA 0183 messages of a specific type.
id | Sentence identifier to listen for |
ev | Event type to generate on message receipt |
handler | Event handler to receive messages |
Definition at line 109 of file plugin_api.cpp.
|
extern |
Gets listener for NMEA 2000 messages.
Creates a listener to receive NMEA 2000 messages of a specific type.
id | PGN identifier for message type to listen for |
ev | Event type to generate on message receipt |
handler | Event handler to receive messages |
Definition at line 104 of file plugin_api.cpp.
|
extern |
Return listener for Notification Framework messages interface.
Definition at line 129 of file plugin_api.cpp.
|
extern |
Return listener for plugin messages, internal or received on the REST interface.
Definition at line 124 of file plugin_api.cpp.
|
extern |
Gets listener for Signal K updates.
Creates a listener to receive Signal K updates for a specific path.
id | Signal K path to listen for |
ev | Event type to generate on updates |
handler | Event handler to receive updates |
Definition at line 114 of file plugin_api.cpp.
|
extern |
Gets system locale canonical name.
Returns the canonical name of current system locale (e.g. "en_US"). Used for localization and translations.
Definition at line 430 of file ocpn_plugin_gui.cpp.
|
extern |
Gets bounding rectangle of master toolbar.
Returns the screen coordinates and size of OpenCPN's main toolbar. Useful for positioning plugin UI elements relative to the toolbar.
Definition at line 1734 of file ocpn_plugin_gui.cpp.
|
extern |
Definition at line 331 of file plugin_api.cpp.
|
extern |
Return payload in a received n0183 message of type id in ev.
Definition at line 58 of file plugin_api.cpp.
|
extern |
Return N2K payload for a received n2000 message of type id in ev.
The vector returned is described in the following example
[147,19, // Header bytes, unused 3, // N2K priority 16,240,1, // example pgn 126992 encoded little endian 255, // N2K destination address 1, // N2K origin address 255,255,255,255, // timestamp, unused 8, // count of following NMEA2000 data 13,240,207,76,208,3,94,40, // NMEA2000 data 85 // CRC byte, unused,not included in count ];
Definition at line 48 of file plugin_api.cpp.
|
extern |
Return source identifier (iface) of a received n2000 message of type id in ev.
Definition at line 53 of file plugin_api.cpp.
|
extern |
Gets current navigation mode for a canvas.
CanvasIndex | Index of canvas to query |
Definition at line 2534 of file ocpn_plugin_gui.cpp.
|
extern |
Generates a new globally unique identifier (GUID).
Creates a unique string identifier suitable for waypoints, routes, etc. Format is RFC 4122 compliant UUID string.
Definition at line 827 of file ocpn_plugin_gui.cpp.
|
extern |
Retrieve the Notification Event in a Notification message.
Definition at line 93 of file plugin_api.cpp.
|
extern |
Gets OpenCPN executable path.
Returns full path to OpenCPN executable file.
Definition at line 4276 of file pluginmanager.cpp.
DECL_EXP wxWindow * GetOCPNCanvasWindow | ( | ) |
Gets OpenCPN's main canvas window.
Provides access to the main chart display window.
Definition at line 236 of file ocpn_plugin_gui.cpp.
|
extern |
Gets chart rendering scale factor.
Returns the scaling factor used for chart display. This may differ from the GUI scaling factor to optimize chart rendering and readability.
Definition at line 321 of file ocpn_plugin_gui.cpp.
DECL_EXP wxFileConfig * GetOCPNConfigObject | ( | void | ) |
Gets OpenCPN's configuration object.
Provides access to OpenCPN's wxFileConfig object for reading/writing settings.
Definition at line 228 of file ocpn_plugin_gui.cpp.
|
extern |
Gets a uniquely scaled font copy for responsive UI elements.
Like GetOCPNScaledFont_PlugIn() but scales font size more aggressively based on OpenCPN's responsive/touchscreen mode settings. Used by GUI tools and windows that need larger fonts for touch usability. Always ensures minimum 3mm physical size regardless of configured point size.
item | UI element name to get font for |
Definition at line 325 of file ocpn_plugin_gui.cpp.
|
extern |
Gets current global GUI scaling factor.
Returns the display scaling factor currently in use for the OpenCPN GUI. Used to scale plugin UI elements to match core application.
Definition at line 317 of file ocpn_plugin_gui.cpp.
|
extern |
Gets GUI scaling factor for a specific scaling level.
Returns the display scaling factor to use for GUI elements at a given scaling level. Used to scale toolbar icons and other UI elements.
GUIScaledFactor | Base scaling factor level (typically 0-5) |
Definition at line 313 of file ocpn_plugin_gui.cpp.
|
extern |
Definition at line 309 of file ocpn_plugin_gui.cpp.
|
extern |
Return the plugin data directory for a given directory name.
On Linux, the returned data path is an existing directory ending in "opencpn/plugins/<plugin_name>" where the last part is the plugin_name argument. The prefix part is one of the directories listed in the environment variable XDG_DATA_DIRS, by default ~/.local/share:/usr/local/share:/usr/share.
On other platforms, the returned value is GetSharedDataDir() + "/opencpn/plugins/" + plugin_name (with native path separators) if that path exists.
Return "" if no existing directory is found.
Definition at line 269 of file base_platform.cpp.
|
extern |
Retrieve the string in a plugin message, internal or received on the REST insterface.
Definition at line 63 of file plugin_api.cpp.
|
extern |
Gets the installation path for a specific plugin.
Returns the full directory path where the specified plugin is installed.
pplugin | Pointer to plugin instance |
Definition at line 4284 of file pluginmanager.cpp.
DECL_EXP wxString * GetpPlugInLocation | ( | ) |
Gets plugins directory location.
Returns path to directory containing installed plugins.
Definition at line 4278 of file pluginmanager.cpp.
DECL_EXP wxString * GetpPrivateApplicationDataLocation | ( | ) |
Gets private application data directory.
Returns path to OpenCPN's private data directory for storing settings.
Definition at line 275 of file plugin_api.cpp.
|
extern |
Gets list of configured priority mapping schemes.
Returns list of available data source priority mapping configurations.
Gets list of configured priority mapping schemes.
Definition at line 2256 of file ocpn_plugin_gui.cpp.
DECL_EXP wxString * GetpSharedDataLocation | ( | ) |
Gets shared application data location.
Returns path to OpenCPN's shared data directory containing resources like:
Definition at line 368 of file ocpn_plugin_gui.cpp.
|
extern |
Gets route details by GUID.
guid | GUID of route to get |
Definition at line 1592 of file ocpn_plugin_gui.cpp.
|
extern |
Gets extended route by GUID.
Returns smart pointer to route with extended properties.
guid | GUID of route to get |
Definition at line 2201 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of route GUIDs with layer filtering.
Returns list of globally unique identifiers for routes, filtered by layer requirements.
req | Filter option:
|
Definition at line 1095 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of route GUIDs.
Returns list of globally unique identifiers for all routes.
Definition at line 1046 of file ocpn_plugin_gui.cpp.
|
extern |
Gets GUID of currently selected route.
Definition at line 1570 of file ocpn_plugin_gui.cpp.
|
extern |
Gets GUID of currently selected track.
Definition at line 1578 of file ocpn_plugin_gui.cpp.
|
extern |
Gets GUID of currently selected waypoint.
Definition at line 1562 of file ocpn_plugin_gui.cpp.
|
extern |
Get SignalK status payload after receiving a message.
auto ptr = GetSignalkPayload(ev); const auto msg = *std::static_pointer_cast<const wxJSONValue>(payload);The map contains the following entries:
Definition at line 68 of file plugin_api.cpp.
|
extern |
Gets waypoint data by GUID.
Retrieves details for a specific waypoint.
GUID | Unique identifier of waypoint to get |
pwaypoint | Pointer to receive waypoint data |
Definition at line 1020 of file ocpn_plugin_gui.cpp.
|
extern |
Gets extended waypoint data by GUID.
Retrieves full waypoint details including extended properties.
GUID | Unique identifier of waypoint to get |
pwaypoint | Pointer to receive waypoint data |
Definition at line 1998 of file ocpn_plugin_gui.cpp.
|
extern |
Gets touch interface mode state.
Definition at line 2632 of file ocpn_plugin_gui.cpp.
|
extern |
Gets track details by GUID.
guid | GUID of track to get |
Definition at line 1622 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of track GUIDs with layer filtering.
Returns list of globally unique identifiers for tracks, filtered by layer requirements.
req | Filter option:
|
Definition at line 1120 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of track GUIDs.
Returns list of globally unique identifiers for all tracks.
Definition at line 1061 of file ocpn_plugin_gui.cpp.
|
extern |
Get the current tracking mode status.
Definition at line 2656 of file ocpn_plugin_gui.cpp.
|
extern |
Gets display string for user's preferred depth unit.
unit | Override unit choice (-1 for user preference): 0=feet, 1=meters, 2=fathoms |
Definition at line 759 of file ocpn_plugin_gui.cpp.
|
extern |
Gets display string for user's preferred distance unit.
unit | Override unit choice (-1 for user preference): 0=nm, 1=km, 2=mi, 3=fathoms |
Definition at line 736 of file ocpn_plugin_gui.cpp.
|
extern |
Gets display string for user's preferred speed unit.
unit | Override unit choice (-1 for user preference): 0=knots, 1=km/h, 2=mph, 3=m/s |
Definition at line 740 of file ocpn_plugin_gui.cpp.
|
extern |
Gets display string for user's preferred temperature unit.
unit | Override unit choice (-1 for user preference): 0=Celsius, 1=Fahrenheit, 2=Kelvin |
Definition at line 746 of file ocpn_plugin_gui.cpp.
|
extern |
Gets display string for user's preferred wind speed unit.
unit | Override unit choice (-1 for user preference): 0=knots, 1=m/s, 2=mph, 3=km/h |
Definition at line 742 of file ocpn_plugin_gui.cpp.
|
extern |
Gets waypoint details by GUID.
guid | GUID of waypoint to get |
Definition at line 1586 of file ocpn_plugin_gui.cpp.
|
extern |
Gets extended waypoint by GUID.
Returns smart pointer to waypoint with extended properties.
guid | GUID of waypoint to get |
Definition at line 2195 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of waypoint/track GUIDs with layer filtering.
Returns list of globally unique identifiers for waypoints, filtered by layer requirements.
req | Filter option:
|
Definition at line 1070 of file ocpn_plugin_gui.cpp.
|
extern |
Gets array of all waypoint/marks GUIDs.
Can be used in conjunction with GetSingleWaypoint() or GetSingleWaypointEx to retrieve waypoint/mark details by GUID.
Definition at line 1031 of file ocpn_plugin_gui.cpp.
|
extern |
Returns the platform-specific default documents directory.
Definition at line 4280 of file pluginmanager.cpp.
DECL_EXP int InsertPlugInTool | ( | wxString | label, |
wxBitmap * | bitmap, | ||
wxBitmap * | bmpRollover, | ||
wxItemKind | kind, | ||
wxString | shortHelp, | ||
wxString | longHelp, | ||
wxObject * | clientData, | ||
int | position, | ||
int | tool_sel, | ||
opencpn_plugin * | pplugin | ||
) |
Adds a tool to OpenCPN's toolbar.
This method creates and adds a new tool button to OpenCPN's main toolbar.
label | Tool identifier and internal name |
bitmap | Normal state bitmap |
bmpRollover | Bitmap shown on mouseover (optional) |
kind | Tool type (normal, toggle, radio button etc) |
shortHelp | Tooltip text |
longHelp | Detailed help text |
clientData | Optional user data pointer |
position | Position in toolbar (-1 for end) |
tool_sel | Tool selection mode |
pplugin | Pointer to plugin instance |
Definition at line 142 of file ocpn_plugin_gui.cpp.
DECL_EXP int InsertPlugInToolSVG | ( | wxString | label, |
wxString | SVGfile, | ||
wxString | SVGfileRollover, | ||
wxString | SVGfileToggled, | ||
wxItemKind | kind, | ||
wxString | shortHelp, | ||
wxString | longHelp, | ||
wxObject * | clientData, | ||
int | position, | ||
int | tool_sel, | ||
opencpn_plugin * | pplugin | ||
) |
Adds a tool using SVG graphics.
Like InsertPlugInTool but using SVG files for scalable graphics.
label | Tool identifier and internal name |
SVGfile | Normal state SVG file path |
SVGfileRollover | Rollover state SVG file path |
SVGfileToggled | Toggled state SVG file path |
kind | Tool type (normal, toggle etc) |
shortHelp | Tooltip text |
longHelp | Detailed help text |
clientData | Optional user data |
position | Position in toolbar (-1 for end) |
tool_sel | Tool selection mode |
pplugin | Pointer to plugin instance |
Definition at line 170 of file ocpn_plugin_gui.cpp.
|
extern |
Checks if touch interface mode is enabled.
Returns whether OpenCPN is currently operating in touch-optimized mode. Touch mode affects UI element sizes and interaction behaviors.
Definition at line 362 of file ocpn_plugin_gui.cpp.
DECL_EXP void JumpToPosition | ( | double | lat, |
double | lon, | ||
double | scale | ||
) |
Centers chart display on specified position at given scale.
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
scale | Display scale factor |
Definition at line 412 of file ocpn_plugin_gui.cpp.
|
extern |
Definition at line 1553 of file ocpn_plugin_gui.cpp.
|
extern |
Cancels a background download.
handle | Download handle from OCPN_downloadFileBackground() |
Definition at line 5415 of file pluginmanager.cpp.
|
extern |
Synchronously downloads a file with progress dialog.
Downloads a file from a URL while showing a progress dialog. This function blocks until the download completes or fails.
url | URL to download from |
outputFile | Local file path to save to |
title | Progress dialog title |
message | Progress dialog message |
bitmap | Optional bitmap to show in dialog |
parent | Parent window for dialog |
style | Dialog style flags (see OCPN_DLDialogStyle) |
timeout_secs | Timeout in seconds (0 for no timeout) |
Definition at line 5178 of file pluginmanager.cpp.
|
extern |
Asynchronously downloads a file in the background.
Initiates a background download that does not block. Progress and completion are reported via events sent to the provided handler.
url | URL to download from |
outputFile | Local file path to save to |
handler | Event handler to receive download events |
handle | Will receive handle to track download |
Definition at line 5320 of file pluginmanager.cpp.
|
extern |
Gets content scaling factor for current display.
Returns the display scaling factor used for scaling UI content on high DPI displays. Common on GTK3 and Mac Retina displays.
Definition at line 2281 of file ocpn_plugin_gui.cpp.
|
extern |
Gets Windows-specific DPI scaling factor.
Returns Windows DPI scaling factor configured in display settings.
Definition at line 2289 of file ocpn_plugin_gui.cpp.
|
extern |
Checks internet connectivity.
Definition at line 5464 of file pluginmanager.cpp.
|
extern |
Performs HTTP POST request.
Makes a blocking HTTP POST request and returns the response.
url | URL to post to |
parameters | POST parameters/data |
result | Will receive response body |
timeout_secs | Timeout in seconds |
Definition at line 5435 of file pluginmanager.cpp.
DECL_EXP wxFont * OCPNGetFont | ( | wxString | TextElement, |
int | default_size = 0 |
||
) |
Gets a font for UI elements.
Plugins can use this to access OpenCPN's font management system which supports locale-dependent fonts and colors. Font configurations are cached and shared to minimize memory usage.
TextElement | UI element identifier. Supported values:
|
default_size | Font size in points, 0 to use system default size |
Definition at line 305 of file ocpn_plugin_gui.cpp.
int DECL_EXP OCPNMessageBox_PlugIn | ( | wxWindow * | parent, |
const wxString & | message, | ||
const wxString & | caption = _T("Message") , |
||
int | style = wxOK , |
||
int | x = -1 , |
||
int | y = -1 |
||
) |
Shows a message box dialog.
Displays a platform-native message dialog with specified text and buttons.
parent | Parent window |
message | Message text to display |
caption | Dialog title text |
style | Button/icon style flags (wxOK, wxCANCEL, etc) |
x | Optional X position (-1 for default) |
y | Optional Y position (-1 for default) |
Definition at line 4271 of file pluginmanager.cpp.
Gets display category for object.
pObj | Object to get category for |
Definition at line 4659 of file pluginmanager.cpp.
PI_DisPrio DECL_EXP PI_GetObjectDisplayPriority | ( | PI_S57Obj * | pObj | ) |
Gets display priority for object.
pObj | Object to get priority for |
Definition at line 4649 of file pluginmanager.cpp.
PI_LUPname DECL_EXP PI_GetObjectLUPName | ( | PI_S57Obj * | pObj | ) |
Gets Look-Up Table (LUP) name for object.
The LUP in the S-52 standard defines how chart features should be symbolized and displayed.
pObj | Object to get LUP name for |
Definition at line 4640 of file pluginmanager.cpp.
bool DECL_EXP PI_GetObjectRenderBox | ( | PI_S57Obj * | pObj, |
double * | lat_min, | ||
double * | lat_max, | ||
double * | lon_min, | ||
double * | lon_max | ||
) |
Gets geographic bounding box of S57 object.
pObj | S57 object to get bounds for |
lat_min | Min latitude output |
lat_max | Max latitude output |
lon_min | Min longitude output |
lon_max | Max longitude output |
Definition at line 4627 of file pluginmanager.cpp.
int DECL_EXP PI_GetPLIBBoundaryStyle | ( | ) |
Gets configured S52 boundary style.
Definition at line 4363 of file pluginmanager.cpp.
wxString DECL_EXP PI_GetPLIBColorScheme | ( | ) |
Gets current color scheme used by S52 PLIB.
Definition at line 4345 of file pluginmanager.cpp.
int DECL_EXP PI_GetPLIBDepthUnitInt | ( | ) |
Gets configured depth unit for S52 display.
Definition at line 4349 of file pluginmanager.cpp.
double DECL_EXP PI_GetPLIBMarinerSafetyContour | ( | ) |
Gets configured safety contour depth.
Definition at line 4667 of file pluginmanager.cpp.
int DECL_EXP PI_GetPLIBStateHash | ( | ) |
Gets hash value representing current PLIB state.
Used to detect configuration changes.
Definition at line 4403 of file pluginmanager.cpp.
int DECL_EXP PI_GetPLIBSymbolStyle | ( | ) |
Gets configured S52 symbol style.
Definition at line 4356 of file pluginmanager.cpp.
void DECL_EXP PI_PLIBFreeContext | ( | void * | pContext | ) |
Frees S52 PLIB context.
pContext | Context pointer to free |
Definition at line 4710 of file pluginmanager.cpp.
bool DECL_EXP PI_PLIBObjectRenderCheck | ( | PI_S57Obj * | pObj, |
PlugIn_ViewPort * | vp | ||
) |
Checks if object should be rendered.
pObj | Object to check |
vp | Current viewport |
Definition at line 4370 of file pluginmanager.cpp.
void DECL_EXP PI_PLIBPrepareForNewRender | ( | void | ) |
Prepares PLIB for new rendering pass.
Clears internal caches and states.
Definition at line 4696 of file pluginmanager.cpp.
int DECL_EXP PI_PLIBRenderAreaToDC | ( | wxDC * | pdc, |
PI_S57Obj * | pObj, | ||
PlugIn_ViewPort * | vp, | ||
wxRect | rect, | ||
unsigned char * | pixbuf | ||
) |
Renders an S57 area object using standard device context.
Specialized rendering for area features like depth areas, land areas etc. Supports pixel buffer output for optimized drawing.
pdc | Device context to draw into |
pObj | S57 area object to render |
vp | Current viewport parameters |
rect | Rectangle defining render area |
pixbuf | Optional pixel buffer for cached rendering |
Definition at line 4785 of file pluginmanager.cpp.
int DECL_EXP PI_PLIBRenderAreaToGL | ( | const wxGLContext & | glcc, |
PI_S57Obj * | pObj, | ||
PlugIn_ViewPort * | vp, | ||
wxRect & | render_rect | ||
) |
Renders an S57 area object using OpenGL.
OpenGL-optimized rendering for area features with hardware acceleration.
glcc | OpenGL context for rendering |
pObj | S57 area object to render |
vp | Current viewport parameters |
render_rect | Rectangle defining render bounds |
Definition at line 4868 of file pluginmanager.cpp.
int DECL_EXP PI_PLIBRenderObjectToDC | ( | wxDC * | pdc, |
PI_S57Obj * | pObj, | ||
PlugIn_ViewPort * | vp | ||
) |
Renders an S57 object using standard device context.
Draws a chart object using S52 presentation library rules through a standard wxDC device context.
pdc | Device context to draw into |
pObj | S57 object to render |
vp | Current viewport parameters |
Definition at line 4743 of file pluginmanager.cpp.
int DECL_EXP PI_PLIBRenderObjectToGL | ( | const wxGLContext & | glcc, |
PI_S57Obj * | pObj, | ||
PlugIn_ViewPort * | vp, | ||
wxRect & | render_rect | ||
) |
Renders any S57 object using OpenGL.
Generic OpenGL rendering for any chart object type with hardware acceleration.
glcc | OpenGL context for rendering |
pObj | S57 object to render |
vp | Current viewport parameters |
render_rect | Rectangle defining render bounds |
Definition at line 4945 of file pluginmanager.cpp.
bool DECL_EXP PI_PLIBSetContext | ( | PI_S57Obj * | pObj | ) |
Sets S52 PLIB rendering context for an object.
Prepares the S52 presentation library context for rendering a chart object. Must be called before rendering to ensure proper symbolization.
pObj | S57 object to set context for |
Definition at line 4519 of file pluginmanager.cpp.
void DECL_EXP PI_PLIBSetLineFeaturePriority | ( | PI_S57Obj * | pObj, |
int | prio | ||
) |
Sets rendering priority for line feature.
pObj | Line object to set priority for |
prio | New priority value |
Definition at line 4671 of file pluginmanager.cpp.
void DECL_EXP PI_PLIBSetRenderCaps | ( | unsigned int | flags | ) |
Sets rendering capability flags.
flags | Bitwise combination of PLIB_CAPS flags: PLIB_CAPS_LINE_VBO PLIB_CAPS_LINE_BUFFER PLIB_CAPS_SINGLEGEO_BUFFER etc. |
Definition at line 4708 of file pluginmanager.cpp.
void DECL_EXP PI_UpdateContext | ( | PI_S57Obj * | pObj | ) |
Updates rendering context for S57 object.
pObj | Object to update context for |
Definition at line 4586 of file pluginmanager.cpp.
|
extern |
Shows platform-optimized directory selector dialog.
Displays a platform-native directory selection dialog that is optimized for each operating system's conventions and capabilities.
parent | Parent window for the dialog |
file_spec | Will receive selected directory path |
Title | Dialog title text |
initDir | Initial directory to show |
Definition at line 1471 of file ocpn_plugin_gui.cpp.
|
extern |
Shows platform-optimized file selector dialog.
Displays a platform-native file selection dialog that is optimized for each operating system's conventions and capabilities.
parent | Parent window for the dialog |
file_spec | Will receive selected file path |
Title | Dialog title text |
initDir | Initial directory to show |
suggestedName | Suggested filename |
wildcard | File type filter (e.g. "*.txt") |
Definition at line 1476 of file ocpn_plugin_gui.cpp.
DECL_EXP bool PlugIn_GSHHS_CrossesLand | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2 | ||
) |
Checks if a great circle route crosses land.
Tests if a direct path between two points intersects with land using GSHHS (Global Self-consistent Hierarchical High-resolution Shorelines) data.
lat1 | Start latitude in decimal degrees |
lon1 | Start longitude in decimal degrees |
lat2 | End latitude in decimal degrees |
lon2 | End longitude in decimal degrees |
Definition at line 763 of file ocpn_plugin_gui.cpp.
|
extern |
Renders AIS targets on a secondary OpenGL canvas.
This function allows plugins to render AIS targets on additional OpenGL canvases beyond the main chart display. This is useful for creating auxiliary navigation views that need to show vessel traffic.
glcanvas | The OpenGL canvas to draw on |
vp | Current viewport settings for the canvas |
Definition at line 1514 of file ocpn_plugin_gui.cpp.
|
extern |
Center the chart view on the own ship position for a specific canvas.
CanvasIndex | Index of the target canvas (0 for the first canvas). |
Definition at line 2708 of file ocpn_plugin_gui.cpp.
|
extern |
Gets physical display size in millimeters.
Returns the physical display dimensions to allow proper scaling of navigation elements like range rings, which need to maintain true physical size regardless of screen resolution.
Definition at line 1531 of file ocpn_plugin_gui.cpp.
|
extern |
Gets the currently focused chart canvas.
Returns the chart canvas window that currently has input focus in multi-canvas configurations. A canvas gains focus when:
Focus determines which canvas:
Definition at line 1651 of file ocpn_plugin_gui.cpp.
|
extern |
Get the current follow mode status for a specific canvas.
CanvasIndex | Index of the target canvas (0 for the first canvas). |
Definition at line 2731 of file ocpn_plugin_gui.cpp.
|
extern |
Gets maximum available GSHHS coastline data quality.
Returns the highest quality level of GSHHS data installed.
|
extern |
Gets minimum available GSHHS coastline data quality.
Returns the lowest quality level of GSHHS (Global Self-consistent, Hierarchical, High-resolution Shoreline) data installed. GSHHS data comes in different resolutions/qualities for different zoom levels.
|
extern |
Gets the canvas currently designated for overlay rendering.
Returns the chart canvas window that should receive plugin overlay graphics in multi-canvas configurations.
Definition at line 1653 of file ocpn_plugin_gui.cpp.
|
extern |
Controls autopilot route handling.
Enables or disables sending of active route information to autopilot. When enabled, OpenCPN will send route waypoints and other navigation data to connected autopilot devices.
enable | True to enable autopilot route updates, false to disable |
Definition at line 1549 of file ocpn_plugin_gui.cpp.
|
extern |
Checks if viewport has been normalized.
Tests whether the viewport parameters have been adjusted to a normalized form suitable for OpenGL rendering.
vp | Viewport to check |
Definition at line 1310 of file ocpn_plugin_gui.cpp.
|
extern |
Applies viewport transformation matrix.
Applies rotation, scaling and translation to viewport based on reference point. Used with OpenGL display lists for efficient rendering.
vp | Viewport to transform |
lat | Optional reference latitude (default 0) |
lon | Optional reference longitude (default 0) |
Definition at line 1321 of file ocpn_plugin_gui.cpp.
|
extern |
Normalizes viewport parameters.
Adjusts viewport parameters to a normalized form for consistent OpenGL rendering. The normalized form simplifies transformations and coordinates.
vp | Viewport to normalize |
lat | Optional reference latitude (default 0) |
lon | Optional reference longitude (default 0) |
Definition at line 1338 of file ocpn_plugin_gui.cpp.
|
extern |
Plays a sound file asynchronously.
sound_file | Path to audio file to play |
Definition at line 779 of file ocpn_plugin_gui.cpp.
|
extern |
Start playing a sound file asynchronously.
Supported formats depends on sound backend. The deviceIx is only used on platforms using the portaudio sound backend where -1 indicates the default device.
Definition at line 1419 of file ocpn_plugin_gui.cpp.
|
extern |
Set follow mode for a specific canvas.
When follow mode is enabled, the chart will automatically move with the vessel position.
CanvasIndex | Index of the target canvas (0 for the first canvas). |
enable_follow | True to enable follow mode, false to disable. |
Definition at line 2722 of file ocpn_plugin_gui.cpp.
|
extern |
Sets text color for a UI element.
TextElement | UI element ID. See OCPNGetFont() |
color | New text color to use |
Definition at line 1523 of file ocpn_plugin_gui.cpp.
|
extern |
Zoom a specific chart canvas by the given factor.
Values greater than 1.0 zoom in, values less than 1.0 zoom out.
CanvasIndex | Index of the target canvas (0 for the first canvas). |
factor | Zoom factor to apply. |
Definition at line 2691 of file ocpn_plugin_gui.cpp.
DECL_EXP void PositionBearingDistanceMercator_Plugin | ( | double | lat, |
double | lon, | ||
double | brg, | ||
double | dist, | ||
double * | dlat, | ||
double * | dlon | ||
) |
Calculates destination point given start point, bearing and distance.
Uses Mercator projection math.
lat | Start latitude in decimal degrees |
lon | Start longitude in decimal degrees |
brg | Bearing in degrees true |
dist | Distance in nautical miles |
dlat | Destination latitude (output) |
dlon | Destination longitude (output) |
Definition at line 658 of file ocpn_plugin_gui.cpp.
DECL_EXP void PushNMEABuffer | ( | wxString | str | ) |
Pushes NMEA sentence to the system.
Adds an NMEA sentence to OpenCPN's data stream as if received from device.
str | Complete NMEA sentence including checksum |
Definition at line 433 of file ocpn_plugin_gui.cpp.
|
extern |
Definition at line 336 of file plugin_api.cpp.
|
extern |
Register PGNs that this application intends to transmit for some NMEA 2000 adapters like Actisense NGT-1.
This function is required specifically for NMEA 2000 adapters like the Actisense NGT-1. For these devices, registration of transmit PGNs is required before sending any messages. This is an adapter-specific requirement, not a requirement of the NMEA 2000 standard itself.
This function is only implemented for serial NMEA 2000 adapters (specifically the Actisense NGT-1). For other connection types (TCP, UDP), the function will return success and perform no registration.
handle | The driver handle obtained from GetActiveDrivers() |
pgn_list | List of PGNs this application will transmit |
Example usage:
Definition at line 242 of file plugin_api.cpp.
|
extern |
Definition at line 279 of file plugin_api.cpp.
DECL_EXP void RemoveCanvasContextMenuItem | ( | int | item | ) |
Removes a context menu item completely.
Unlike SetCanvasContextMenuItemViz(), this permanently removes the menu item.
item | Menu item ID returned from AddCanvasContextMenuItem() |
Definition at line 225 of file ocpn_plugin_gui.cpp.
DECL_EXP void RemoveCanvasMenuItem | ( | int | item, |
const char * | name = "" |
||
) |
Removes a context menu item completely.
Unlike SetCanvasMenuItemViz(), this permanently removes the menu item.
item | Menu item ID returned from AddCanvasMenuItem() |
name | Optional canvas name for multi-canvas configs (empty for default) |
Definition at line 208 of file ocpn_plugin_gui.cpp.
DECL_EXP int RemoveChartFromDBInPlace | ( | wxString & | full_path | ) |
Removes a chart from database without full rebuild.
full_path | Full path to chart file to remove |
Definition at line 519 of file ocpn_plugin_gui.cpp.
DECL_EXP void RemovePlugInTool | ( | int | tool_id | ) |
Removes a tool from OpenCPN's toolbar.
This method removes a previously added plugin tool from the toolbar.
tool_id | Tool ID returned by InsertPlugInTool() |
Definition at line 154 of file ocpn_plugin_gui.cpp.
DECL_EXP void RequestRefresh | ( | wxWindow * | win | ) |
Requests window refresh.
Triggers a redraw of the specified window.
window | Window to refresh |
Definition at line 245 of file ocpn_plugin_gui.cpp.
DECL_EXP void RequestWindowRefresh | ( | wxWindow * | win, |
bool | eraseBackground | ||
) |
Requests window refresh.
Triggers a redraw of the specified window.
win | Window to refresh |
eraseBackground | True to erase background before redraw |
Definition at line 2665 of file ocpn_plugin_gui.cpp.
DECL_EXP void SendPluginMessage | ( | wxString | message_id, |
wxString | message_body | ||
) |
Sends message to other plugins.
Broadcasts a message that other plugins can receive.
message_id | Message identifier |
message_body | Message content |
Definition at line 396 of file ocpn_plugin_gui.cpp.
|
extern |
Set the application color scheme.
Changes the color scheme for the entire application including charts, UI elements, and plugin displays.
cs | The color scheme to apply (DAY, DUSK, or NIGHT). |
Definition at line 2658 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetCanvasContextMenuItemGrey | ( | int | item, |
bool | grey | ||
) |
Sets menu item enabled/disabled state.
Greys out (disables) or enables a context menu item.
item | Menu item ID to modify |
grey | True to disable (grey out), false to enable |
Definition at line 221 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetCanvasContextMenuItemViz | ( | int | item, |
bool | viz | ||
) |
Temporarily changes context menu item visibility.
Hides or shows a context menu item without removing it.
item | Menu item ID to modify |
viz | True to show item, false to hide |
Definition at line 217 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetCanvasMenuItemGrey | ( | int | item, |
bool | grey, | ||
const char * | name = "" |
||
) |
Sets menu item enabled/disabled state.
Greys out (disables) or enables a context menu item.
item | Menu item ID to modify |
grey | True to disable (grey out), false to enable |
name | Optional canvas name (empty for default) |
Definition at line 204 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetCanvasMenuItemViz | ( | int | item, |
bool | viz, | ||
const char * | name = "" |
||
) |
Temporarily changes context menu item visibility.
Hides or shows a context menu item without removing it.
item | Menu item ID to modify |
viz | True to show item, false to hide |
name | Optional canvas name (empty for default) |
Definition at line 200 of file ocpn_plugin_gui.cpp.
|
extern |
Sets chart projection type.
Changes the projection used for chart display.
projection | Projection type from PI_ProjectionType enum:
|
Definition at line 1411 of file ocpn_plugin_gui.cpp.
|
extern |
Sets chart display rotation angle.
Rotates the chart display by the specified angle.
rotation | Rotation angle in degrees (0-360) 0 = North up 90 = East up etc. |
Definition at line 1401 of file ocpn_plugin_gui.cpp.
|
extern |
Gets current canvas tilt angle.
Returns the tilt angle of the chart display canvas in degrees. Tilt provides a 3D perspective view of the chart.
Definition at line 1407 of file ocpn_plugin_gui.cpp.
|
extern |
Sets mouse cursor.
Changes the mouse cursor displayed over chart window.
pPlugin_Cursor | Pointer to cursor to use, NULL for default |
Definition at line 1446 of file ocpn_plugin_gui.cpp.
|
extern |
Show or hide the main toolbar.
enable | True to show the toolbar, false to hide it. |
Definition at line 2699 of file ocpn_plugin_gui.cpp.
|
extern |
Sets ENC (Electronic Navigation Chart) feature display category.
cat | Display category to use (BASE, STANDARD, OTHER, etc) |
CanvasIndex | Index of target canvas |
Definition at line 2490 of file ocpn_plugin_gui.cpp.
|
extern |
Sets full screen mode.
full_screen_on | True to enable full screen mode, false for windowed |
Definition at line 2308 of file ocpn_plugin_gui.cpp.
|
extern |
Sets a color in the global color scheme.
table | Color scheme name ("DAY", "DUSK", "NIGHT") |
name | Color identifier within scheme |
color | New color value to set |
Definition at line 2400 of file ocpn_plugin_gui.cpp.
|
extern |
Sets mouse cursor for specific canvas.
Changes the mouse cursor displayed over a specific chart canvas window.
pCursor | Pointer to cursor to use, NULL for default |
canvasIndex | Index of target canvas |
Definition at line 1716 of file ocpn_plugin_gui.cpp.
|
extern |
Sets the navigation mode for a specific chart canvas.
mode | Navigation mode to set:
|
CanvasIndex | Index of target canvas (0-based) |
Definition at line 2522 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetToolbarItemState | ( | int | item, |
bool | toggle | ||
) |
Sets toolbar item toggle state.
Sets the pressed/unpressed state for toggle type tools.
item | Tool ID to modify |
toggle | True for pressed state, false for unpressed |
Definition at line 162 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetToolbarToolBitmaps | ( | int | item, |
wxBitmap * | bitmap, | ||
wxBitmap * | bmpRollover | ||
) |
Updates toolbar tool bitmaps.
Changes the normal and rollover bitmaps for an existing tool.
item | Tool ID to modify |
bitmap | New normal state bitmap |
bmpRollover | New rollover bitmap |
Definition at line 166 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetToolbarToolBitmapsSVG | ( | int | item, |
wxString | SVGfile, | ||
wxString | SVGfileRollover, | ||
wxString | SVGfileToggled | ||
) |
Updates SVG graphics for toolbar tool.
Changes the SVG files used for a tool's different states.
item | Tool ID to modify |
SVGfile | Normal state SVG file |
SVGfileRollover | Rollover state SVG file |
SVGfileToggled | Toggled state SVG file |
Definition at line 183 of file ocpn_plugin_gui.cpp.
DECL_EXP void SetToolbarToolViz | ( | int | item, |
bool | viz | ||
) |
Temporarily changes toolbar tool visibility.
Shows or hides a toolbar tool without removing it.
item | Tool ID to modify |
viz | True to show tool, false to hide |
Definition at line 158 of file ocpn_plugin_gui.cpp.
|
extern |
Enable or disable tracking mode.
When tracking mode is enabled, the vessel's position is recorded in the active track.
enable | True to enable tracking, false to disable. |
Definition at line 2650 of file ocpn_plugin_gui.cpp.
|
extern |
Display the global settings dialog.
Opens the main OpenCPN options/preferences dialog.
Definition at line 2704 of file ocpn_plugin_gui.cpp.
|
extern |
Checks if OpenCPN is in shutdown process.
Definition at line 1665 of file ocpn_plugin_gui.cpp.
|
extern |
Convert decimal degrees to a formatted string.
Converts a decimal degrees value to a string formatted in the currently specified format. For example, -123.456 can be converted to "123° 27.36' W".
NEflag | North/East flags: 1 = N/S, 2 = E/W |
a | Degrees decimal in the range -180.0 to 180.0 |
hi_precision | If true, format with 4 decimal places instead of 1 |
Definition at line 4263 of file pluginmanager.cpp.
DECL_EXP void toSM_ECC_Plugin | ( | double | lat, |
double | lon, | ||
double | lat0, | ||
double | lon0, | ||
double * | x, | ||
double * | y | ||
) |
Converts geographic coordinates to Elliptical Simple Mercator projection.
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
lat0 | Reference latitude |
lon0 | Central meridian |
x | Easting coordinate (output) |
y | Northing coordinate (output) |
Definition at line 694 of file ocpn_plugin_gui.cpp.
DECL_EXP void toSM_Plugin | ( | double | lat, |
double | lon, | ||
double | lat0, | ||
double | lon0, | ||
double * | x, | ||
double * | y | ||
) |
Converts geographic coordinates to Simple Mercator projection.
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
lat0 | Reference latitude |
lon0 | Central meridian |
x | Easting coordinate (output) |
y | Northing coordinate (output) |
Definition at line 684 of file ocpn_plugin_gui.cpp.
DECL_EXP void toTM_Plugin | ( | float | lat, |
float | lon, | ||
float | lat0, | ||
float | lon0, | ||
double * | x, | ||
double * | y | ||
) |
Converts geographic coordinates to Transverse Mercator projection.
lat | Latitude in decimal degrees |
lon | Longitude in decimal degrees |
lat0 | Reference latitude |
lon0 | Central meridian |
x | Easting coordinate (output) |
y | Northing coordinate (output) |
Definition at line 674 of file ocpn_plugin_gui.cpp.
|
extern |
Format a date/time to a localized string representation, conforming to the global date/time format and timezone settings.
The function expects date_time to be in local time and formats it according to the timezone configuration either in:
date_time | The date/time to format, must be in local time. |
options | The date/time format options including target timezone and formatting preferences. |
Definition at line 5314 of file pluginmanager.cpp.
|
extern |
Converts meters to user's preferred depth unit.
m_depth | Depth in meters |
unit | Override unit choice (-1 for user preference): 0=feet, 1=meters, 2=fathoms |
Definition at line 751 of file ocpn_plugin_gui.cpp.
DECL_EXP double toUsrDistance_Plugin | ( | double | nm_distance, |
int | unit = -1 |
||
) |
Converts nautical miles to user's preferred distance unit.
nm_distance | Distance value in nautical miles |
unit | Override unit choice (-1 for user preference): 0=nm, 1=km, 2=mi, 3=fathoms |
Definition at line 704 of file ocpn_plugin_gui.cpp.
DECL_EXP double toUsrSpeed_Plugin | ( | double | kts_speed, |
int | unit = -1 |
||
) |
Converts knots to user's preferred speed unit.
kts_speed | Speed value in knots |
unit | Override unit choice (-1 for user preference): 0=knots, 1=km/h, 2=mph, 3=m/s |
Definition at line 712 of file ocpn_plugin_gui.cpp.
DECL_EXP double toUsrTemp_Plugin | ( | double | cel_temp, |
int | unit = -1 |
||
) |
Converts Celsius to user's preferred temperature unit.
cel_temp | Temperature in Celsius |
unit | Override unit choice (-1 for user preference): 0=Celsius, 1=Fahrenheit |
Definition at line 728 of file ocpn_plugin_gui.cpp.
|
extern |
Converts knots to user's preferred wind speed unit.
kts_wspeed | Wind speed in knots |
unit | Override unit choice (-1 for user preference): 0=knots, 1=m/s, 2=mph, 3=km/h |
Definition at line 716 of file ocpn_plugin_gui.cpp.
|
extern |
Updates chart database in place.
Updates chart database with new chart directories.
dir_array | Array of directory paths to scan |
b_force_update | Force full update even if no changes detected |
b_ProgressDialog | Show progress dialog during update |
Definition at line 462 of file ocpn_plugin_gui.cpp.
|
extern |
Updates an existing route.
Updates properties and waypoints of a route already in OpenCPN's route manager.
proute | Route with updated properties (GUID must match existing route) |
Definition at line 1218 of file ocpn_plugin_gui.cpp.
|
extern |
Updates an existing extended route.
Modifies extended properties of an existing route.
proute | Updated route data (GUID must match existing) |
Definition at line 2170 of file ocpn_plugin_gui.cpp.
|
extern |
Updates an existing track.
Updates properties and waypoints of a track already in OpenCPN's track manager.
ptrack | Track with updated properties (GUID must match existing track) |
Definition at line 1293 of file ocpn_plugin_gui.cpp.
|
extern |
Updates a single waypoint.
Modifies properties of an existing waypoint.
pwaypoint | Waypoint with updated properties (GUID must match existing) |
Definition at line 920 of file ocpn_plugin_gui.cpp.
|
extern |
Updates an existing extended waypoint.
Modifies extended properties of an existing waypoint.
pwaypoint | Updated waypoint data (GUID must match existing) |
Definition at line 2041 of file ocpn_plugin_gui.cpp.
|
extern |
Send a non-NMEA2000 message.
The call is not blocking.
handle | Obtained from GetActiveDrivers() |
payload | Message data, for example a complete Nmea0183 message. From 1.19: if the handle "protocol" attribute is "internal" it is parsed as <id><space><message> where the id is used when listening/ subscribing to message. |
Definition at line 176 of file plugin_api.cpp.
|
extern |
DECL_EXP void ZeroXTE | ( | ) |
Resets cross track error to zero.
Sets the current cross track error (XTE) value to zero. This affects navigation displays and autopilot output.
Definition at line 1745 of file ocpn_plugin_gui.cpp.
|
extern |
Definition at line 5015 of file pluginmanager.cpp.