![]() |
pCon.planner Plugin SDK
Version 8.8.1
|
The plugin interface. More...
Public Member Functions | |
Required Interfaces | |
virtual System::String^ | X3gGetGlobalIdentifier () override |
Must return a globally unique plugin identifier More... | |
virtual System::String^ | X3gGetName () override |
Must return the plugin's name. More... | |
virtual System::String^ | X3gGetVendor () override |
Must return the vendor the the plugin. More... | |
virtual System::String^ | X3gGetDescription () override |
Must return the detailed plugin description. More... | |
virtual System::String^ | X3gGetVersion () override |
Must return the version of the plugin. More... | |
virtual System::IntPtr | X3gGetCustomData () |
Optional Notifications | |
virtual bool | X3gInitialize (System::String^ pPluginPath) |
Notification, called once when the plugin is loaded. More... | |
virtual void | X3gFinalize () |
Notification, called once when the plugin is unloaded. More... | |
virtual void | X3gActivate () |
Notification, called when the plugin must reactivate itself. More... | |
virtual void | X3gDeactivate () |
Notification, called when the plugin must deactivate itself. More... | |
virtual void | X3gEvent (EventType pEventType, Object^ pParameter) |
Called when the plugin receives an event. More... | |
Actions | |
virtual void | X3gAction (System::String^ pActionKey, System::String^ pArguments) |
Executes an action with given optional arguments. More... | |
virtual bool | X3gIsActionAvailable (System::String^ pActionKey) |
Checks if the given action is currently available. More... | |
virtual bool | X3gSetWindowContent (Window^ pWindow) |
Requests plugin to set the window content. More... | |
virtual IEnumerable < System::String^ >^ | X3gGetContextMenuUIKeys () |
Requests plugin to return UI keys for context menu items. More... | |
Threading | |
void | Invoke (SendOrPostCallback^ pCallback, Object^ pParam, bool pWait) |
Invoke a function call from another thread. More... | |
Protected Attributes | |
IActionManager^ | X3gActions |
Actions. | |
IAppManager^ | X3gApp |
Application Services. | |
IArticleManager^ | X3gArticles |
Article handling. | |
IUndoManager^ | X3gUndo |
Undo/Redo. | |
IUtilities^ | X3gUtils |
Utilities. | |
Properties | |
DocumentManager^ | Document [get] |
Modify or change the currently open document. More... | |
GeometryManager^ | Geometry [get] |
Covers various export formats and can be used for custom geometry exports. More... | |
Layout::LayoutManager^ | Layouts [get] |
Manage Layout. More... | |
Logger^ | Log [get] |
Logging functionality. More... | |
RendererManager^ | Renderers [get] |
Manage Renderer available in the pCon.planner. More... | |
Room::RoomModule^ | Rooms [get] |
Manage Rooms. More... | |
ViewManager^ | Viewer [get] |
Manage the primary views and their arrangement. More... | |
WindowManager^ | Windows [get] |
Create and manage dockable windows. More... | |
![]() | |
DocumentManager^ | Document [get] |
Modify or change the currently open document. More... | |
GeometryManager^ | Geometry [get] |
Covers various export formats and can be used for custom geometry exports. More... | |
Layout::LayoutManager^ | Layouts [get] |
Manage Layout. More... | |
Logger^ | Log [get] |
Logging functionality. More... | |
RendererManager^ | Renderers [get] |
Manage Renderer available in the pCon.planner. More... | |
Room::RoomModule^ | Rooms [get] |
Manage Rooms. More... | |
ViewManager^ | Viewer [get] |
Manage the primary views and their arrangement. More... | |
WindowManager^ | Windows [get] |
Create and manage dockable windows. More... | |
The plugin interface.
Services from the kernel are divided into several manager classes.
Each communication with the planner itself is done using one of the X3gXXX() functions of the plugin class or calling member functions
of the manager classes like DocumentManager.
A plugin processes data as a result of notification functions or events. Notification functions can be:
All geometry data classes have the Ge prefix while all database classes have a Db prefix.
There are also general geometry helper classes with Ge prefix like GeMatrix or GeVec3f.
For example, if you want to write some custom geometry export and are therefore only interested
in processing 3d geometry data regardless of the underlying database objects, use GeometryManager::GetSelectedGeometry().
On the other hand, if you are interested in the database entities, use e.g. DocumentManager::GetSelection().
You can also insert raw geometry from which database objects are created using GeometryManager::InsertGeometry().
Floating point values of database entities are stored with double precision.
The vectorization of database entities into OpenGL data uses single precision.
Therefore all GeDrawable objects are using float
values, while DbEntity objects use double
values.
void X3g::Plugin::Plugin::Invoke | ( | SendOrPostCallback^ | pCallback, |
Object^ | pParam, | ||
bool | pWait | ||
) |
Invoke a function call from another thread.
The plugin interface is not threadsafe. Direct calls are only allowed from the plugins main thread, otherwise Invoke() needs to be used.
pCallback | The function to be called in form of a SendOrPostCallback object. |
pParam | The pParam parameter will be used as a parameter for the pCallback function. |
pWait | If pWait is true, the calling thread will wait/block until pCallback was executed. |
|
virtual |
Executes an action with given optional arguments.
|
virtual |
Notification, called when the plugin must reactivate itself.
|
virtual |
Notification, called when the plugin must deactivate itself.
|
virtual |
Called when the plugin receives an event.
|
virtual |
Notification, called once when the plugin is unloaded.
|
virtual |
Requests plugin to return UI keys for context menu items.
This method is called before the context menu is opened. If the plugin wants to add items to the context menu it has to return the according UI keys here. UI keys may be action keys and widget keys as defined in the plugins .ui-file.
|
pure virtual |
Must return the detailed plugin description.
|
pure virtual |
Must return a globally unique plugin identifier
|
pure virtual |
Must return the plugin's name.
|
pure virtual |
Must return the vendor the the plugin.
|
pure virtual |
Must return the version of the plugin.
|
virtual |
Notification, called once when the plugin is loaded.
Should be used to register actions and do basic initialization. If the return value is false, the plugin will not be loaded.
No major processing should be done here. The application initialization is not finished at this point. Processing can be done after the event EventType::ApplicationReady was triggered.
|
virtual |
Checks if the given action is currently available.
|
virtual |
Requests plugin to set the window content.
This method is called when windows are created through WindowManager and when windows are restored on application startup. Window creation will be canceled if this method returns false. This may be used in case of restore when the plugin has changed and particluar windows are no longer available.
|
get |
Modify or change the currently open document.
Contains other manager related to the current document.
See Class reference for more information.
|
get |
Covers various export formats and can be used for custom geometry exports.
|
get |
Manage Layout.
See Class reference for more information.
|
get |
Logging functionality.
See Class reference for more information.
|
get |
Manage Renderer available in the pCon.planner.
See Class reference for more information.
|
get |
Manage Rooms.
See Class reference for more information.
|
get |
Manage the primary views and their arrangement.
See Class reference for more information.
|
get |
Create and manage dockable windows.
See Class reference for more information.