KiCad PCB EDA Suite
|
Build up the properties of a TOOL_ACTION in an incremental manner that is static-construction safe. More...
#include <tool_action.h>
Public Member Functions | |
TOOL_ACTION_ARGS ()=default | |
TOOL_ACTION_ARGS & | Name (const std::string_view &aName) |
The name of the action, the convention is "app.tool.actionName". | |
TOOL_ACTION_ARGS & | FriendlyName (const std::string_view &aName) |
TOOL_ACTION_ARGS & | Scope (TOOL_ACTION_SCOPE aScope) |
The scope of the action. | |
TOOL_ACTION_ARGS & | DefaultHotkey (int aDefaultHotkey) |
The default hotkey to assign to the action. | |
TOOL_ACTION_ARGS & | DefaultHotkeyAlt (int aDefaultHotkeyAlt) |
The default alternate hotkey to assign to the action. | |
TOOL_ACTION_ARGS & | LegacyHotkeyName (const std::string_view &aLegacyName) |
The legacy hotkey name from the old system. | |
TOOL_ACTION_ARGS & | MenuText (const std::string_view &aMenuText) |
The string to use when displaying the action in a menu. | |
TOOL_ACTION_ARGS & | Tooltip (const std::string_view &aTooltip) |
The string to use as a tooltip for the action in menus and toolbars. | |
TOOL_ACTION_ARGS & | Description (const std::string_view &aDescription) |
The description of the action. | |
TOOL_ACTION_ARGS & | Icon (BITMAPS aIcon) |
The bitmap to use as the icon for the action in toolbars and menus. | |
TOOL_ACTION_ARGS & | Flags (TOOL_ACTION_FLAGS aFlags) |
Flags describing the type of the action. | |
template<typename T > | |
TOOL_ACTION_ARGS & | Parameter (T aParam) |
Custom parameter to pass information to the tool. | |
TOOL_ACTION_ARGS & | UIId (int aUIId) |
The ID number to use for the action when interacting with any UI elements. | |
TOOL_ACTION_ARGS & | Group (const TOOL_ACTION_GROUP &aGroup) |
Protected Attributes | |
std::optional< std::string_view > | m_name |
std::optional< std::string_view > | m_friendlyName |
std::optional< TOOL_ACTION_SCOPE > | m_scope |
std::optional< TOOL_ACTION_FLAGS > | m_flags |
std::optional< int > | m_uiid |
std::optional< int > | m_defaultHotKey |
std::optional< int > | m_defaultHotKeyAlt |
std::optional< std::string_view > | m_legacyName |
std::optional< std::string_view > | m_menuText |
std::optional< std::string_view > | m_tooltip |
std::optional< std::string_view > | m_description |
std::optional< BITMAPS > | m_icon |
std::optional< TOOL_ACTION_GROUP > | m_group |
std::any | m_param |
Friends | |
class | TOOL_ACTION |
Build up the properties of a TOOL_ACTION in an incremental manner that is static-construction safe.
Note: This is meant to be constructed and immediately passed into the TOOL_ACTION constructor. Construction should not be delayed, since this only retains pointers to the strings used.
Definition at line 101 of file tool_action.h.
|
default |
|
inline |
The default hotkey to assign to the action.
Definition at line 135 of file tool_action.h.
References m_defaultHotKey.
|
inline |
The default alternate hotkey to assign to the action.
Definition at line 144 of file tool_action.h.
References m_defaultHotKeyAlt.
|
inline |
The description of the action.
Definition at line 182 of file tool_action.h.
References m_description.
|
inline |
Flags describing the type of the action.
Definition at line 200 of file tool_action.h.
References m_flags.
|
inline |
Definition at line 117 of file tool_action.h.
References m_friendlyName.
|
inline |
Definition at line 225 of file tool_action.h.
References m_group.
|
inline |
The bitmap to use as the icon for the action in toolbars and menus.
Definition at line 191 of file tool_action.h.
References m_icon.
|
inline |
The legacy hotkey name from the old system.
This property is only needed for existing actions and shouldn't be used in new actions.
Definition at line 155 of file tool_action.h.
References m_legacyName.
|
inline |
The string to use when displaying the action in a menu.
Definition at line 164 of file tool_action.h.
References m_menuText.
|
inline |
The name of the action, the convention is "app.tool.actionName".
This is a required property.
Definition at line 111 of file tool_action.h.
References m_name.
|
inline |
Custom parameter to pass information to the tool.
Definition at line 210 of file tool_action.h.
References m_param.
|
inline |
|
inline |
The string to use as a tooltip for the action in menus and toolbars.
Definition at line 173 of file tool_action.h.
References m_tooltip.
|
inline |
The ID number to use for the action when interacting with any UI elements.
Definition at line 219 of file tool_action.h.
References m_uiid.
|
friend |
Definition at line 233 of file tool_action.h.
|
protected |
Definition at line 242 of file tool_action.h.
Referenced by DefaultHotkey().
|
protected |
Definition at line 243 of file tool_action.h.
Referenced by DefaultHotkeyAlt().
|
protected |
Definition at line 248 of file tool_action.h.
Referenced by Description(), and TOOL_ACTION::TOOL_ACTION().
|
protected |
Definition at line 238 of file tool_action.h.
Referenced by Flags().
|
protected |
Definition at line 236 of file tool_action.h.
Referenced by FriendlyName().
|
protected |
Definition at line 252 of file tool_action.h.
Referenced by Group(), and TOOL_ACTION::TOOL_ACTION().
|
protected |
Definition at line 250 of file tool_action.h.
Referenced by Icon().
|
protected |
Definition at line 244 of file tool_action.h.
Referenced by LegacyHotkeyName().
|
protected |
Definition at line 246 of file tool_action.h.
Referenced by MenuText(), and TOOL_ACTION::TOOL_ACTION().
|
protected |
Definition at line 235 of file tool_action.h.
Referenced by Name().
|
protected |
Definition at line 254 of file tool_action.h.
Referenced by Parameter(), and TOOL_ACTION::TOOL_ACTION().
|
protected |
Definition at line 237 of file tool_action.h.
Referenced by Scope().
|
protected |
Definition at line 247 of file tool_action.h.
Referenced by Tooltip().
|
protected |
Definition at line 240 of file tool_action.h.
Referenced by TOOL_ACTION::TOOL_ACTION(), and UIId().