KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ACTION_PLUGIN Class Referenceabstract

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
 
virtual wxString GetName ()=0
 
virtual wxString GetDescription ()=0
 
virtual bool GetShowToolbarButton ()=0
 
virtual wxString GetIconFileName (bool aDark)=0
 
virtual wxString GetPluginPath ()=0
 
virtual void * GetObject ()=0
 This method gets the pointer to the object from where this action constructs.
 
virtual void Run ()=0
 This method the the action.
 
void register_action ()
 It's the standard method of a "ACTION_PLUGIN" to register itself into the ACTION_PLUGINS singleton manager.
 

Public Attributes

int m_actionMenuId
 
int m_actionButtonId
 
wxBitmap iconBitmap
 
bool show_on_toolbar
 

Detailed Description

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

Definition at line 38 of file action_plugin.h.

Constructor & Destructor Documentation

◆ ACTION_PLUGIN()

ACTION_PLUGIN::ACTION_PLUGIN ( )
inline

Definition at line 41 of file action_plugin.h.

◆ ~ACTION_PLUGIN()

ACTION_PLUGIN::~ACTION_PLUGIN ( )
virtual

Definition at line 38 of file action_plugin.cpp.

Member Function Documentation

◆ GetCategoryName()

virtual wxString ACTION_PLUGIN::GetCategoryName ( )
pure virtual
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
Returns
a description of the action plugin.

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by PCB_EDIT_FRAME::buildActionPluginMenus(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().

◆ GetIconFileName()

virtual wxString ACTION_PLUGIN::GetIconFileName ( bool  aDark)
pure virtual
Parameters
aDarkset to true if requesting dark theme icon.
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

◆ GetObject()

virtual void * ACTION_PLUGIN::GetObject ( )
pure virtual

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
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
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 ( )

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

Definition at line 43 of file action_plugin.cpp.

References ACTION_PLUGINS::register_action().

Referenced by PYTHON_ACTION_PLUGINS::register_action().

◆ Run()

virtual void ACTION_PLUGIN::Run ( )
pure virtual

This method the the action.

Implemented in PYTHON_ACTION_PLUGIN.

Referenced by PCB_EDIT_FRAME::RunActionPlugin().

Member Data Documentation

◆ iconBitmap

◆ m_actionButtonId

int ACTION_PLUGIN::m_actionButtonId

Definition at line 101 of file action_plugin.h.

Referenced by ACTION_PLUGINS::SetActionButton().

◆ m_actionMenuId

int ACTION_PLUGIN::m_actionMenuId

Definition at line 98 of file action_plugin.h.

◆ show_on_toolbar

bool ACTION_PLUGIN::show_on_toolbar

Definition at line 107 of file action_plugin.h.


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