36#include <wx/translation.h>
39 int aDefaultHotKey,
const std::string& aLegacyHotKeyName,
40 const wxString& aLabel,
const wxString& aTooltip,
44 m_defaultHotKey( aDefaultHotKey ),
45 m_defaultHotKeyAlt( 0 ),
46 m_legacyName( aLegacyHotKeyName ),
48 m_tooltip( aTooltip ),
61 m_defaultHotKeyAlt( 0 ),
71 m_name( aArgs.m_name.value_or(
"" ) ),
72 m_scope( aArgs.m_scope.value_or(
AS_CONTEXT ) ),
73 m_defaultHotKey( aArgs.m_defaultHotKey.value_or( 0 ) ),
74 m_defaultHotKeyAlt( aArgs.m_defaultHotKeyAlt.value_or( 0 ) ),
75 m_hotKey( aArgs.m_defaultHotKey.value_or( 0 ) ),
77 m_legacyName( aArgs.m_legacyName.value_or(
"" ) ),
78 m_label(
TowxString( aArgs.m_menuText.value_or(
"" ) ) ),
79 m_tooltip(
TowxString( aArgs.m_tooltip.value_or(
"" ) ) ),
82 m_uiid(
std::nullopt ),
83 m_flags( aArgs.m_flags.value_or(
AF_NONE ) )
88 if( aArgs.
m_uiid.has_value() )
128 return wxEmptyString;
130 return wxGetTranslation(
m_label );
136 wxString label = wxGetTranslation(
m_label );
137 label.Replace( wxS(
"&" ), wxS(
"&&" ) );
154 wxString tooltip = wxGetTranslation(
m_tooltip );
172 int dotCount = std::count(
m_name.begin(),
m_name.end(),
'.' );
BITMAPS
A list of all bitmap identifiers.
static std::list< TOOL_ACTION * > & GetActionList()
Return list of TOOL_ACTIONs.
wxString AddHotkeyName(const wxString &aText, int aHotKey, HOTKEY_ACTION_TYPE aStyle)
wxString KeyNameFromKeyCode(int aKeycode, bool *aIsFound)
Return the key name from the key code.
wxString TowxString(const std::string_view &view)