KiCad PCB EDA Suite
|
Public Member Functions | |
PSEUDO_ACTION (const wxString &aLabel, int aHotKey, int aHotKeyAlt=0) | |
bool | operator== (const TOOL_ACTION &aRhs) const |
bool | operator!= (const TOOL_ACTION &aRhs) const |
const std::string & | GetName () const |
Return name of the action. | |
int | GetDefaultHotKey () const |
Return the default hotkey (if any) for the action. | |
int | GetDefaultHotKeyAlt () const |
int | GetHotKey () const |
Return the hotkey keycode which initiates the action. | |
int | GetHotKeyAlt () const |
void | SetHotKey (int aKeycode, int aKeycodeAlt=0) |
int | GetId () const |
Return the unique id of the TOOL_ACTION object. | |
bool | HasCustomUIId () const |
Return true if this action has a custom UI ID set. | |
int | GetUIId () const |
TOOL_EVENT | MakeEvent () const |
Return the event associated with the action (i.e. | |
wxString | GetMenuLabel () const |
Return the translated label for the action. | |
wxString | GetMenuItem () const |
wxString | GetTooltip (bool aIncludeHotkey=true) const |
wxString | GetButtonTooltip () const |
wxString | GetDescription () const |
wxString | GetFriendlyName () const |
Return the translated user-friendly name of the action. | |
TOOL_ACTION_SCOPE | GetScope () const |
template<typename T > | |
T | GetParam () const |
Return a non-standard parameter assigned to the action. | |
const std::optional< TOOL_ACTION_GROUP > | GetActionGroup () const |
std::string | GetToolName () const |
Return name of the tool associated with the action. | |
bool | IsActivation () const |
Return true if the action is intended to activate a tool. | |
bool | IsNotification () const |
Return true if the action is a notification. | |
BITMAPS | GetIcon () const |
Return an icon associated with the action. | |
Static Public Member Functions | |
static int | GetBaseUIId () |
Protected Attributes | |
std::string | m_name |
TOOL_ACTION_SCOPE | m_scope |
std::optional< TOOL_ACTION_GROUP > | m_group |
const int | m_defaultHotKey |
const int | m_defaultHotKeyAlt |
int | m_hotKey |
int | m_hotKeyAlt |
const std::string | m_legacyName |
wxString | m_friendlyName |
std::optional< wxString > | m_menuLabel |
wxString | m_tooltip |
std::optional< wxString > | m_description |
BITMAPS | m_icon |
int | m_id |
std::optional< int > | m_uiid |
TOOL_ACTION_FLAGS | m_flags |
std::any | m_param |
Static Protected Attributes | |
static constexpr int | ACTION_BASE_UI_ID = 20000 |
Name of the action (convention is "app.tool.actionName") | |
Definition at line 32 of file hotkey_store.cpp.
|
inline |
Definition at line 35 of file hotkey_store.cpp.
References TOOL_ACTION::m_friendlyName, TOOL_ACTION::m_hotKey, and TOOL_ACTION::m_hotKeyAlt.
|
inlineinherited |
Definition at line 392 of file tool_action.h.
References TOOL_ACTION::m_group.
|
inlinestaticinherited |
Definition at line 344 of file tool_action.h.
References TOOL_ACTION::ACTION_BASE_UI_ID.
Referenced by ACTION_GROUP::GetUIId(), ACTION_MANAGER::IsActionUIId(), and ACTION_TOOLBAR::onToolEvent().
|
inherited |
Definition at line 186 of file tool_action.cpp.
References TOOL_ACTION::GetFriendlyName(), TOOL_ACTION::GetHotKey(), TOOL_ACTION::GetTooltip(), and KeyNameFromKeyCode().
Referenced by ACTION_TOOLBAR::Add(), ACTION_TOOLBAR_PALETTE::AddAction(), ACTION_TOOLBAR::AddButton(), and ACTION_TOOLBAR::doSelectAction().
|
inlineinherited |
Return the default hotkey (if any) for the action.
Definition at line 307 of file tool_action.h.
References TOOL_ACTION::m_defaultHotKey.
|
inlineinherited |
Definition at line 308 of file tool_action.h.
References TOOL_ACTION::m_defaultHotKeyAlt.
|
inherited |
Definition at line 165 of file tool_action.cpp.
References TOOL_ACTION::GetTooltip(), and TOOL_ACTION::m_description.
Referenced by NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages(), NL_SCHEMATIC_PLUGIN_IMPL::exportCommandsAndImages(), NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages(), and NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::exportCommandsAndImages().
|
inherited |
Return the translated user-friendly name of the action.
Definition at line 139 of file tool_action.cpp.
References TOOL_ACTION::m_friendlyName.
Referenced by PANEL_KICAD_LAUNCHER::CreateLaunchers(), ALIGN_DISTRIBUTE_TOOL::DistributeItems(), TOOL_ACTION::GetButtonTooltip(), TOOL_ACTION::GetMenuLabel(), TOOLS_HOLDER::PushTool(), WIDGET_HOTKEY_LIST::resolveKeyConflicts(), and TOOLS_HOLDER::ShowChangedLanguage().
|
inlineinherited |
Return the hotkey keycode which initiates the action.
Definition at line 313 of file tool_action.h.
References TOOL_ACTION::m_hotKey.
Referenced by APPEARANCE_CONTROLS::createControls(), TOOL_ACTION::GetButtonTooltip(), PCB_ONE_LAYER_SELECTOR::getLayerHotKey(), TOOL_ACTION::GetTooltip(), PANEL_GRID_SETTINGS::PANEL_GRID_SETTINGS(), APPEARANCE_CONTROLS::rebuildLayers(), APPEARANCE_CONTROLS::rebuildNets(), PCB_LAYER_BOX_SELECTOR::Resync(), and ACTION_MANAGER::UpdateHotKeys().
|
inlineinherited |
Definition at line 314 of file tool_action.h.
References TOOL_ACTION::m_hotKeyAlt.
Referenced by ACTION_MANAGER::UpdateHotKeys().
|
inlineinherited |
Return an icon associated with the action.
It is used in context menu.
Definition at line 422 of file tool_action.h.
References TOOL_ACTION::m_icon.
Referenced by ACTION_MENU::Add(), ACTION_TOOLBAR::Add(), ACTION_TOOLBAR_PALETTE::AddAction(), ACTION_TOOLBAR::AddButton(), ACTION_TOOLBAR::AddGroup(), ACTION_TOOLBAR::doSelectAction(), NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages(), NL_SCHEMATIC_PLUGIN_IMPL::exportCommandsAndImages(), NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages(), and NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::exportCommandsAndImages().
|
inlineinherited |
Return the unique id of the TOOL_ACTION object.
It is valid only after registering the TOOL_ACTION by ACTION_MANAGER.
Definition at line 324 of file tool_action.h.
References TOOL_ACTION::m_id.
Referenced by CONDITIONAL_MENU::AddCheckItem(), CONDITIONAL_MENU::AddItem(), ACTION_MANAGER::GetCondition(), ACTION_MANAGER::GetHotKey(), APPEARANCE_CONTROLS::onNetclassContextMenu(), ACTION_MANAGER::SetConditions(), and ACTION_MANAGER::UpdateHotKeys().
|
inherited |
Definition at line 157 of file tool_action.cpp.
References AddHotkeyName(), TOOL_ACTION::GetMenuLabel(), IS_HOTKEY, and TOOL_ACTION::m_hotKey.
Referenced by ACTION_MENU::Add().
|
inherited |
Return the translated label for the action.
Definition at line 148 of file tool_action.cpp.
References TOOL_ACTION::GetFriendlyName(), and TOOL_ACTION::m_menuLabel.
Referenced by NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages(), NL_SCHEMATIC_PLUGIN_IMPL::exportCommandsAndImages(), NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages(), NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::exportCommandsAndImages(), and TOOL_ACTION::GetMenuItem().
|
inlineinherited |
Return name of the action.
It is the same one that is contained in TOOL_EVENT that is sent by activating the TOOL_ACTION. Convention is "app.tool.actionName".
Definition at line 302 of file tool_action.h.
References TOOL_ACTION::m_name.
Referenced by TOOLS_HOLDER::CurrentToolName(), ACTION_TOOLBAR::doSelectAction(), NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages(), NL_SCHEMATIC_PLUGIN_IMPL::exportCommandsAndImages(), NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages(), NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::exportCommandsAndImages(), HOTKEY_STORE::GetAppName(), TOOLS_HOLDER::IsCurrentTool(), ACTION_MANAGER::RegisterAction(), ACTION_MANAGER::RunHotKey(), NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand(), NL_SCHEMATIC_PLUGIN_IMPL::SetActiveCommand(), NL_PCBNEW_PLUGIN_IMPL::SetActiveCommand(), and ACTION_MANAGER::SetConditions().
|
inlineinherited |
Return a non-standard parameter assigned to the action.
Definition at line 372 of file tool_action.h.
References TOOL_ACTION::m_param, and name.
|
inlineinherited |
Definition at line 366 of file tool_action.h.
References TOOL_ACTION::m_scope.
Referenced by HOTKEY_STORE::CheckKeyConflicts().
|
inherited |
Return name of the tool associated with the action.
It is basically the action name stripped of the last part (e.g. for "pcbnew.InteractiveDrawing.drawCircle" it is "pcbnew.InteractiveDrawing").
Definition at line 208 of file tool_action.cpp.
References TOOL_ACTION::m_name.
Referenced by HOTKEY_STORE::CheckKeyConflicts(), NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages(), NL_SCHEMATIC_PLUGIN_IMPL::exportCommandsAndImages(), NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages(), and NL_FOOTPRINT_PROPERTIES_PLUGIN_IMPL::exportCommandsAndImages().
|
inherited |
Definition at line 175 of file tool_action.cpp.
References TOOL_ACTION::GetHotKey(), KeyNameFromKeyCode(), and TOOL_ACTION::m_tooltip.
Referenced by ACTION_MENU::Add(), PANEL_KICAD_LAUNCHER::CreateLaunchers(), TOOL_ACTION::GetButtonTooltip(), and TOOL_ACTION::GetDescription().
|
inlineinherited |
Definition at line 339 of file tool_action.h.
References TOOL_ACTION::ACTION_BASE_UI_ID, TOOL_ACTION::m_id, and TOOL_ACTION::m_uiid.
Referenced by ACTION_MENU::Add(), ACTION_TOOLBAR::Add(), ACTION_TOOLBAR_PALETTE::AddAction(), ACTION_TOOLBAR::AddButton(), ACTION_TOOLBAR::AddToolContextMenu(), ACTION_TOOLBAR_PALETTE::CheckAction(), ACTION_TOOLBAR_PALETTE::EnableAction(), EDA_BASE_FRAME::HandleUpdateUIEvent(), ACTION_TOOLBAR::popupPalette(), ACTION_MANAGER::RegisterAction(), TOOLS_HOLDER::RegisterUIUpdateHandler(), ACTION_TOOLBAR::SetToolBitmap(), ACTION_TOOLBAR::Toggle(), and TOOLS_HOLDER::UnregisterUIUpdateHandler().
|
inlineinherited |
Return true if this action has a custom UI ID set.
Definition at line 329 of file tool_action.h.
References TOOL_ACTION::m_uiid.
Referenced by ACTION_MANAGER::RegisterAction().
|
inlineinherited |
Return true if the action is intended to activate a tool.
Definition at line 404 of file tool_action.h.
References AF_ACTIVATE, and TOOL_ACTION::m_flags.
Referenced by TOOL_ACTION::MakeEvent().
|
inlineinherited |
Return true if the action is a notification.
Definition at line 412 of file tool_action.h.
References AF_NOTIFY, and TOOL_ACTION::m_flags.
Referenced by TOOL_ACTION::MakeEvent().
|
inherited |
Return the event associated with the action (i.e.
the event that will be sent after activating the action).
Definition at line 116 of file tool_action.cpp.
References TOOL_ACTION::IsActivation(), TOOL_ACTION::IsNotification(), TOOL_ACTION::m_group, TOOL_ACTION::m_name, TOOL_ACTION::m_param, TOOL_ACTION::m_scope, TOOL_EVENT::SetActionGroup(), TOOL_EVENT::SetParameter(), TA_ACTION, TA_ACTIVATE, TA_NONE, TC_COMMAND, and TC_MESSAGE.
Referenced by EE_SELECTION_TOOL::autostartEvent(), PCB_POINT_EDITOR::changeArcEditMode(), ALIGN_DISTRIBUTE_TOOL::DistributeItems(), TOOL_MANAGER::doRunAction(), TOOL_EVENT::IsAction(), SCH_EDIT_TOOL::JustifyText(), EDIT_TOOL::JustifyText(), EE_SELECTION_TOOL::Main(), PANEL_KICAD_LAUNCHER::onLauncherButtonClick(), ACTION_TOOLBAR::onPaletteEvent(), TOOLS_HOLDER::PopTool(), ROUTER_TOOL::setTransitions(), and BOARD_EDITOR_CONTROL::setTransitions().
|
inlineinherited |
Definition at line 289 of file tool_action.h.
References TOOL_ACTION::m_id.
|
inlineinherited |
Definition at line 284 of file tool_action.h.
References TOOL_ACTION::m_id.
|
inherited |
Definition at line 201 of file tool_action.cpp.
References TOOL_ACTION::m_hotKey, and TOOL_ACTION::m_hotKeyAlt.
Referenced by ACTION_MANAGER::processHotKey(), HOTKEY_STORE::SaveAllHotkeys(), and TOOL_ACTION::TOOL_ACTION().
|
staticconstexprprotectedinherited |
Name of the action (convention is "app.tool.actionName")
Definition at line 433 of file tool_action.h.
Referenced by TOOL_ACTION::GetBaseUIId(), and TOOL_ACTION::GetUIId().
|
protectedinherited |
Definition at line 441 of file tool_action.h.
Referenced by TOOL_ACTION::GetDefaultHotKey(), and ACTION_MANAGER::processHotKey().
|
protectedinherited |
Definition at line 442 of file tool_action.h.
Referenced by TOOL_ACTION::GetDefaultHotKeyAlt().
|
protectedinherited |
Definition at line 450 of file tool_action.h.
Referenced by TOOL_ACTION::GetDescription(), and TOOL_ACTION::TOOL_ACTION().
|
protectedinherited |
Definition at line 457 of file tool_action.h.
Referenced by TOOL_ACTION::IsActivation(), and TOOL_ACTION::IsNotification().
|
protectedinherited |
Definition at line 447 of file tool_action.h.
Referenced by TOOL_ACTION::GetFriendlyName(), and PSEUDO_ACTION().
|
protectedinherited |
Definition at line 439 of file tool_action.h.
Referenced by TOOL_ACTION::GetActionGroup(), TOOL_ACTION::MakeEvent(), and TOOL_ACTION::TOOL_ACTION().
|
protectedinherited |
Definition at line 443 of file tool_action.h.
Referenced by TOOL_ACTION::GetHotKey(), TOOL_ACTION::GetMenuItem(), ACTION_MANAGER::processHotKey(), PSEUDO_ACTION(), and TOOL_ACTION::SetHotKey().
|
protectedinherited |
Definition at line 444 of file tool_action.h.
Referenced by TOOL_ACTION::GetHotKeyAlt(), PSEUDO_ACTION(), and TOOL_ACTION::SetHotKey().
|
protectedinherited |
Definition at line 452 of file tool_action.h.
Referenced by TOOL_ACTION::GetIcon().
|
protectedinherited |
Definition at line 454 of file tool_action.h.
Referenced by TOOL_ACTION::GetId(), TOOL_ACTION::GetUIId(), TOOL_ACTION::operator!=(), and TOOL_ACTION::operator==().
|
protectedinherited |
Definition at line 445 of file tool_action.h.
Referenced by ACTION_MANAGER::processHotKey().
|
protectedinherited |
Definition at line 448 of file tool_action.h.
Referenced by TOOL_ACTION::GetMenuLabel(), and TOOL_ACTION::TOOL_ACTION().
|
protectedinherited |
Definition at line 436 of file tool_action.h.
Referenced by TOOL_ACTION::GetName(), TOOL_ACTION::GetToolName(), TOOL_ACTION::MakeEvent(), ACTION_MANAGER::processHotKey(), ACTION_MANAGER::RegisterAction(), and TOOL_ACTION::TOOL_ACTION().
|
protectedinherited |
Definition at line 458 of file tool_action.h.
Referenced by TOOL_ACTION::GetParam(), TOOL_ACTION::MakeEvent(), and TOOL_ACTION::TOOL_ACTION().
|
protectedinherited |
Definition at line 437 of file tool_action.h.
Referenced by TOOL_ACTION::GetScope(), and TOOL_ACTION::MakeEvent().
|
protectedinherited |
Definition at line 449 of file tool_action.h.
Referenced by TOOL_ACTION::GetTooltip().
|
protectedinherited |
Definition at line 455 of file tool_action.h.
Referenced by TOOL_ACTION::GetUIId(), TOOL_ACTION::HasCustomUIId(), and TOOL_ACTION::TOOL_ACTION().