| 
    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) | 
| TOOL_ACTION_ARGS & | ToolbarState (TOOLBAR_STATE aState) | 
| TOOL_ACTION_ARGS & | ToolbarState (std::initializer_list< TOOLBAR_STATE > aState) | 
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::optional< TOOLBAR_STATE_FLAGS > | m_toolbarState | 
| ki::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 117 of file tool_action.h.
      
  | 
  default | 
Referenced by DefaultHotkey(), DefaultHotkeyAlt(), Description(), Flags(), FriendlyName(), Group(), Icon(), LegacyHotkeyName(), MenuText(), Name(), Parameter(), Scope(), ToolbarState(), ToolbarState(), Tooltip(), and UIId().
      
  | 
  inline | 
The default hotkey to assign to the action.
Definition at line 151 of file tool_action.h.
References m_defaultHotKey, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The default alternate hotkey to assign to the action.
Definition at line 160 of file tool_action.h.
References m_defaultHotKeyAlt, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The description of the action.
Definition at line 198 of file tool_action.h.
References m_description, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
Flags describing the type of the action.
Definition at line 216 of file tool_action.h.
References m_flags, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
Definition at line 133 of file tool_action.h.
References m_friendlyName, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
Definition at line 241 of file tool_action.h.
References m_group, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The bitmap to use as the icon for the action in toolbars and menus.
Definition at line 207 of file tool_action.h.
References m_icon, and TOOL_ACTION_ARGS().
      
  | 
  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 171 of file tool_action.h.
References m_legacyName, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The string to use when displaying the action in a menu.
Definition at line 180 of file tool_action.h.
References m_menuText, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The name of the action, the convention is "app.tool.actionName".
This is a required property.
Definition at line 127 of file tool_action.h.
References m_name, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
Custom parameter to pass information to the tool.
Definition at line 226 of file tool_action.h.
References m_param, T, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The scope of the action.
Definition at line 142 of file tool_action.h.
References m_scope, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
Definition at line 254 of file tool_action.h.
References flag, m_toolbarState, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
Definition at line 247 of file tool_action.h.
References m_toolbarState, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The string to use as a tooltip for the action in menus and toolbars.
Definition at line 189 of file tool_action.h.
References m_tooltip, and TOOL_ACTION_ARGS().
      
  | 
  inline | 
The ID number to use for the action when interacting with any UI elements.
Definition at line 235 of file tool_action.h.
References m_uiid, and TOOL_ACTION_ARGS().
      
  | 
  friend | 
      
  | 
  protected | 
Definition at line 275 of file tool_action.h.
Referenced by DefaultHotkey().
      
  | 
  protected | 
Definition at line 276 of file tool_action.h.
Referenced by DefaultHotkeyAlt().
      
  | 
  protected | 
Definition at line 281 of file tool_action.h.
Referenced by Description(), and TOOL_ACTION::TOOL_ACTION().
      
  | 
  protected | 
Definition at line 271 of file tool_action.h.
Referenced by Flags().
      
  | 
  protected | 
Definition at line 269 of file tool_action.h.
Referenced by FriendlyName().
      
  | 
  protected | 
Definition at line 285 of file tool_action.h.
Referenced by Group(), and TOOL_ACTION::TOOL_ACTION().
      
  | 
  protected | 
Definition at line 283 of file tool_action.h.
Referenced by Icon(), and TOOL_ACTION::TOOL_ACTION().
      
  | 
  protected | 
Definition at line 277 of file tool_action.h.
Referenced by LegacyHotkeyName().
      
  | 
  protected | 
Definition at line 279 of file tool_action.h.
Referenced by MenuText(), and TOOL_ACTION::TOOL_ACTION().
      
  | 
  protected | 
Definition at line 268 of file tool_action.h.
Referenced by Name().
      
  | 
  protected | 
Definition at line 289 of file tool_action.h.
Referenced by Parameter(), and TOOL_ACTION::TOOL_ACTION().
      
  | 
  protected | 
Definition at line 270 of file tool_action.h.
Referenced by Scope().
      
  | 
  protected | 
Definition at line 287 of file tool_action.h.
Referenced by TOOL_ACTION::TOOL_ACTION(), ToolbarState(), and ToolbarState().
      
  | 
  protected | 
Definition at line 280 of file tool_action.h.
Referenced by Tooltip().
      
  | 
  protected | 
Definition at line 273 of file tool_action.h.
Referenced by TOOL_ACTION::TOOL_ACTION(), and UIId().