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::ACTION_PLUGIN ( )
inline

Definition at line 55 of file action_plugin.h.

55  : m_actionMenuId( 0 ), m_actionButtonId( 0 ),
56  show_on_toolbar( false ) {}
bool show_on_toolbar
Definition: action_plugin.h:52

◆ ~ACTION_PLUGIN()

ACTION_PLUGIN::~ACTION_PLUGIN ( )
virtual

Definition at line 33 of file action_plugin.cpp.

34 {
35 }

Member Function Documentation

◆ GetCategoryName()

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 PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

◆ GetDescription()

virtual wxString ACTION_PLUGIN::GetDescription ( )
pure virtual

Function GetDescription.

Returns
a description of the action plugin

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

◆ GetIconFileName()

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_PLUGINS::register_action().

◆ GetName()

virtual wxString ACTION_PLUGIN::GetName ( )
pure virtual

Function GetName.

Returns
the name of the action

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by ACTION_PLUGINS::GetAction(), ACTION_PLUGINS::register_action(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

◆ GetObject()

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_PLUGINS::deregister_object().

◆ GetPluginPath()

virtual wxString ACTION_PLUGIN::GetPluginPath ( )
pure virtual

Function GetPluginPath.

Returns
a path this plugin was loaded from

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

◆ GetShowToolbarButton()

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 PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

◆ register_action()

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.

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...

References ACTION_PLUGINS::register_action().

Referenced by PYTHON_ACTION_PLUGINS::register_action().

◆ Run()

virtual void ACTION_PLUGIN::Run ( )
pure virtual

Function Run This method the the action.

Implemented in PYTHON_ACTION_PLUGIN.

Member Data Documentation

◆ iconBitmap

wxBitmap ACTION_PLUGIN::iconBitmap

◆ m_actionButtonId

int ACTION_PLUGIN::m_actionButtonId

Definition at line 48 of file action_plugin.h.

Referenced by ACTION_PLUGINS::SetActionButton().

◆ m_actionMenuId

int ACTION_PLUGIN::m_actionMenuId

Definition at line 46 of file action_plugin.h.

◆ show_on_toolbar

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: