KiCad PCB EDA Suite
ACTION_PLUGIN Class Referenceabstract

Class ACTION_PLUGIN This is the parent class from where any action plugin class must derive. More...

#include <action_plugin.h>

Inheritance diagram for ACTION_PLUGIN:
PYTHON_ACTION_PLUGIN

Public Member Functions

 ACTION_PLUGIN ()
 
virtual ~ACTION_PLUGIN ()
 
virtual wxString GetCategoryName ()=0
 Function GetCategoryName. More...
 
virtual wxString GetName ()=0
 Function GetName. More...
 
virtual wxString GetDescription ()=0
 Function GetDescription. More...
 
virtual bool GetShowToolbarButton ()=0
 Function GetShowToolbarButton. More...
 
virtual wxString GetIconFileName ()=0
 Function GetIconFileName. More...
 
virtual wxString GetPluginPath ()=0
 Function GetPluginPath. More...
 
virtual void * GetObject ()=0
 Function GetObject This method gets the pointer to the object from where this action constructs. More...
 
virtual void Run ()=0
 Function Run This method the the action. More...
 
void register_action ()
 Function register_action It's the standard method of a "ACTION_PLUGIN" to register itself into the ACTION_PLUGINS singleton manager. More...
 

Public Attributes

int m_actionMenuId
 
int m_actionButtonId
 
wxBitmap iconBitmap
 
bool show_on_toolbar
 

Detailed Description

Class ACTION_PLUGIN This is the parent class from where any action plugin class must derive.

Definition at line 40 of file action_plugin.h.

Constructor & Destructor Documentation

ACTION_PLUGIN::ACTION_PLUGIN ( )
inline
ACTION_PLUGIN::~ACTION_PLUGIN ( )
virtual

Definition at line 33 of file action_plugin.cpp.

Referenced by ACTION_PLUGIN().

34 {
35 }

Member Function Documentation

virtual wxString ACTION_PLUGIN::GetCategoryName ( )
pure virtual

Function GetCategoryName.

Returns
the category name of the action (to be able to group action under the same submenu)

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

virtual wxString ACTION_PLUGIN::GetDescription ( )
pure virtual

Function GetDescription.

Returns
a description of the action plugin

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), PYTHON_ACTION_PLUGINS::deregister_action(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

virtual wxString ACTION_PLUGIN::GetIconFileName ( )
pure virtual

Function GetIconFileName.

Returns
a path to icon for the action plugin button

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), and ACTION_PLUGINS::register_action().

virtual wxString ACTION_PLUGIN::GetName ( )
pure virtual
virtual void* ACTION_PLUGIN::GetObject ( )
pure virtual

Function GetObject This method gets the pointer to the object from where this action constructs.

Returns
it's a void pointer, as it could be a PyObject or any other

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), and ACTION_PLUGINS::deregister_object().

virtual wxString ACTION_PLUGIN::GetPluginPath ( )
pure virtual

Function GetPluginPath.

Returns
a path this plugin was loaded from

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), PYTHON_ACTION_PLUGINS::deregister_action(), ACTION_PLUGINS::GetActionByPath(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

virtual bool ACTION_PLUGIN::GetShowToolbarButton ( )
pure virtual

Function GetShowToolbarButton.

Returns
true if button should be shown on top toolbar

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

void ACTION_PLUGIN::register_action ( )

Function register_action It's the standard method of a "ACTION_PLUGIN" to register itself into the ACTION_PLUGINS singleton manager.

Definition at line 38 of file action_plugin.cpp.

References ACTION_PLUGINS::m_actionRunning, ACTION_PLUGINS::m_actionsList, and ACTION_PLUGINS::register_action().

Referenced by ACTION_PLUGIN(), and PYTHON_ACTION_PLUGINS::register_action().

39 {
41 }
static void register_action(ACTION_PLUGIN *aAction)
Function register_action An action calls this static method when it wants to register itself into the...
virtual void ACTION_PLUGIN::Run ( )
pure virtual

Function Run This method the the action.

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGIN(), and PYTHON_ACTION_PLUGINS::deregister_action().

Member Data Documentation

int ACTION_PLUGIN::m_actionButtonId
int ACTION_PLUGIN::m_actionMenuId

Definition at line 46 of file action_plugin.h.

Referenced by ACTION_PLUGINS::GetActionByMenu().

bool ACTION_PLUGIN::show_on_toolbar

Definition at line 52 of file action_plugin.h.


The documentation for this class was generated from the following files: