KiCad PCB EDA Suite
|
A group of actions that will be displayed together on a toolbar palette. More...
#include <action_toolbar.h>
Public Member Functions | |
ACTION_GROUP (const std::string &aName, const std::vector< const TOOL_ACTION * > &aActions) | |
void | SetDefaultAction (const TOOL_ACTION &aDefault) |
Set the default action to use when first creating the toolbar palette icon. | |
const TOOL_ACTION * | GetDefaultAction () const |
Get the default action to use when first creating this group's toolbar palette icon. | |
std::string | GetName () const |
Get the name of the group. | |
int | GetUIId () const |
Get the ID used in the UI to reference this group. | |
const std::vector< const TOOL_ACTION * > & | GetActions () const |
Get a vector of all the actions contained inside this group. | |
Protected Attributes | |
int | m_id |
< The action ID for this action group | |
std::string | m_name |
The default action to display on the toolbar item. | |
const TOOL_ACTION * | m_defaultAction |
The actions that compose the group. | |
std::vector< const TOOL_ACTION * > | m_actions |
Friends | |
class | ACTION_TOOLBAR |
A group of actions that will be displayed together on a toolbar palette.
Definition at line 46 of file action_toolbar.h.
ACTION_GROUP::ACTION_GROUP | ( | const std::string & | aName, |
const std::vector< const TOOL_ACTION * > & | aActions | ||
) |
Definition at line 51 of file action_toolbar.cpp.
References m_actions, m_defaultAction, m_id, m_name, and ACTION_MANAGER::MakeActionId().
|
inline |
Get a vector of all the actions contained inside this group.
Definition at line 82 of file action_toolbar.h.
References m_actions.
|
inline |
Get the default action to use when first creating this group's toolbar palette icon.
Definition at line 67 of file action_toolbar.h.
References m_defaultAction.
Referenced by ACTION_TOOLBAR::AddGroup().
|
inline |
int ACTION_GROUP::GetUIId | ( | ) | const |
Get the ID used in the UI to reference this group.
Definition at line 65 of file action_toolbar.cpp.
References TOOL_ACTION::GetBaseUIId(), and m_id.
Referenced by ACTION_TOOLBAR::AddGroup(), and ACTION_TOOLBAR::doSelectAction().
void ACTION_GROUP::SetDefaultAction | ( | const TOOL_ACTION & | aDefault | ) |
Set the default action to use when first creating the toolbar palette icon.
If no default action is provided, the default will be the first action in the vector.
aDefault | is the default action. |
Definition at line 71 of file action_toolbar.cpp.
References m_actions, and m_defaultAction.
|
friend |
Definition at line 50 of file action_toolbar.h.
|
protected |
Definition at line 95 of file action_toolbar.h.
Referenced by ACTION_GROUP(), GetActions(), ACTION_TOOLBAR::SelectAction(), and SetDefaultAction().
|
protected |
The actions that compose the group.
Definition at line 92 of file action_toolbar.h.
Referenced by ACTION_GROUP(), GetDefaultAction(), and SetDefaultAction().
|
protected |
< The action ID for this action group
The name of this action group
Definition at line 86 of file action_toolbar.h.
Referenced by ACTION_GROUP(), and GetUIId().
|
protected |
The default action to display on the toolbar item.
Definition at line 89 of file action_toolbar.h.
Referenced by ACTION_GROUP(), and GetName().