KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PSEUDO_ACTION Class Reference
Inheritance diagram for PSEUDO_ACTION:
TOOL_ACTION

Public Member Functions

 PSEUDO_ACTION (const wxString &aLabel, int aHotKey)
 
bool operator== (const TOOL_ACTION &aRhs) const
 
bool operator!= (const TOOL_ACTION &aRhs) const
 
const std::string & GetName () const
 Return name of the action. More...
 
int GetDefaultHotKey () const
 Return the default hotkey (if any) for the action. More...
 
int GetHotKey () const
 Return the hotkey keycode which initiates the action. More...
 
void SetHotKey (int aKeycode)
 
int GetId () const
 Return the unique id of the TOOL_ACTION object. More...
 
int GetUIId () const
 
TOOL_EVENT MakeEvent () const
 Return the event associated with the action (i.e. More...
 
wxString GetLabel () const
 
wxString GetMenuItem () const
 
wxString GetDescription (bool aIncludeHotkey=true) const
 
TOOL_ACTION_SCOPE GetScope () const
 
void * GetParam () const
 
std::string GetToolName () const
 Return name of the tool associated with the action. More...
 
bool IsActivation () const
 Return true if the action is intended to activate a tool. More...
 
bool IsNotification () const
 Return true if the action is a notification. More...
 
BITMAPS GetIcon () const
 Return an icon associated with the action. More...
 

Static Public Member Functions

static int GetBaseUIId ()
 

Protected Attributes

std::string m_name
 
TOOL_ACTION_SCOPE m_scope
 
const int m_defaultHotKey
 
int m_hotKey
 
const std::string m_legacyName
 
wxString m_label
 
wxString m_tooltip
 
BITMAPS m_icon
 
int m_id
 
TOOL_ACTION_FLAGS m_flags
 
void * m_param
 

Static Protected Attributes

static constexpr int ACTION_BASE_UI_ID = 20000
 Name of the action (convention is "app.tool.actionName") More...
 

Detailed Description

Definition at line 32 of file hotkey_store.cpp.

Constructor & Destructor Documentation

◆ PSEUDO_ACTION()

PSEUDO_ACTION::PSEUDO_ACTION ( const wxString &  aLabel,
int  aHotKey 
)
inline

Definition at line 35 of file hotkey_store.cpp.

References TOOL_ACTION::m_hotKey, and TOOL_ACTION::m_label.

Member Function Documentation

◆ GetBaseUIId()

static int TOOL_ACTION::GetBaseUIId ( )
inlinestaticinherited

◆ GetDefaultHotKey()

int TOOL_ACTION::GetDefaultHotKey ( ) const
inlineinherited

Return the default hotkey (if any) for the action.

Definition at line 106 of file tool_action.h.

References TOOL_ACTION::m_defaultHotKey.

◆ GetDescription()

◆ GetHotKey()

◆ GetIcon()

◆ GetId()

int TOOL_ACTION::GetId ( ) const
inlineinherited

Return the unique id of the TOOL_ACTION object.

It is valid only after registering the TOOL_ACTION by ACTION_MANAGER.

Returns
The unique identification number. If the number is negative, then it is not valid.

Definition at line 121 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().

◆ GetLabel()

◆ GetMenuItem()

wxString TOOL_ACTION::GetMenuItem ( ) const
inherited

Definition at line 89 of file tool_action.cpp.

References AddHotkeyName(), IS_HOTKEY, TOOL_ACTION::m_hotKey, and TOOL_ACTION::m_label.

Referenced by ACTION_MENU::Add().

◆ GetName()

◆ GetParam()

void * TOOL_ACTION::GetParam ( ) const
inlineinherited

Definition at line 162 of file tool_action.h.

References TOOL_ACTION::m_param.

◆ GetScope()

TOOL_ACTION_SCOPE TOOL_ACTION::GetScope ( ) const
inlineinherited

Definition at line 160 of file tool_action.h.

References TOOL_ACTION::m_scope.

Referenced by HOTKEY_STORE::CheckKeyConflicts().

◆ GetToolName()

std::string TOOL_ACTION::GetToolName ( ) const
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 114 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(), and NL_PCBNEW_PLUGIN_IMPL::exportCommandsAndImages().

◆ GetUIId()

◆ IsActivation()

bool TOOL_ACTION::IsActivation ( ) const
inlineinherited

Return true if the action is intended to activate a tool.

Definition at line 174 of file tool_action.h.

References AF_ACTIVATE, and TOOL_ACTION::m_flags.

Referenced by TOOL_ACTION::MakeEvent().

◆ IsNotification()

bool TOOL_ACTION::IsNotification ( ) const
inlineinherited

Return true if the action is a notification.

Definition at line 182 of file tool_action.h.

References AF_NOTIFY, and TOOL_ACTION::m_flags.

Referenced by TOOL_ACTION::MakeEvent().

◆ MakeEvent()

◆ operator!=()

bool TOOL_ACTION::operator!= ( const TOOL_ACTION aRhs) const
inlineinherited

Definition at line 88 of file tool_action.h.

References TOOL_ACTION::m_id.

◆ operator==()

bool TOOL_ACTION::operator== ( const TOOL_ACTION aRhs) const
inlineinherited

Definition at line 83 of file tool_action.h.

References TOOL_ACTION::m_id.

◆ SetHotKey()

void TOOL_ACTION::SetHotKey ( int  aKeycode)
inherited

Member Data Documentation

◆ ACTION_BASE_UI_ID

constexpr int TOOL_ACTION::ACTION_BASE_UI_ID = 20000
staticconstexprprotectedinherited

Name of the action (convention is "app.tool.actionName")

Definition at line 203 of file tool_action.h.

Referenced by TOOL_ACTION::GetBaseUIId(), and TOOL_ACTION::GetUIId().

◆ m_defaultHotKey

const int TOOL_ACTION::m_defaultHotKey
protectedinherited

Definition at line 209 of file tool_action.h.

Referenced by TOOL_ACTION::GetDefaultHotKey(), and ACTION_MANAGER::processHotKey().

◆ m_flags

TOOL_ACTION_FLAGS TOOL_ACTION::m_flags
protectedinherited

Definition at line 219 of file tool_action.h.

Referenced by TOOL_ACTION::IsActivation(), and TOOL_ACTION::IsNotification().

◆ m_hotKey

int TOOL_ACTION::m_hotKey
protectedinherited

◆ m_icon

BITMAPS TOOL_ACTION::m_icon
protectedinherited

Definition at line 215 of file tool_action.h.

Referenced by TOOL_ACTION::GetIcon().

◆ m_id

int TOOL_ACTION::m_id
protectedinherited

◆ m_label

wxString TOOL_ACTION::m_label
protectedinherited

Definition at line 213 of file tool_action.h.

Referenced by TOOL_ACTION::GetLabel(), TOOL_ACTION::GetMenuItem(), and PSEUDO_ACTION().

◆ m_legacyName

const std::string TOOL_ACTION::m_legacyName
protectedinherited

Definition at line 211 of file tool_action.h.

Referenced by ACTION_MANAGER::processHotKey().

◆ m_name

std::string TOOL_ACTION::m_name
protectedinherited

◆ m_param

void* TOOL_ACTION::m_param
protectedinherited

◆ m_scope

TOOL_ACTION_SCOPE TOOL_ACTION::m_scope
protectedinherited

Definition at line 207 of file tool_action.h.

Referenced by TOOL_ACTION::GetScope(), and TOOL_ACTION::MakeEvent().

◆ m_tooltip

wxString TOOL_ACTION::m_tooltip
protectedinherited

Definition at line 214 of file tool_action.h.

Referenced by TOOL_ACTION::GetDescription().


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