37#include <wx/translation.h>
40 int aDefaultHotKey,
const std::string& aLegacyHotKeyName,
41 const wxString& aLabel,
const wxString& aTooltip,
45 m_group(
std::nullopt ),
46 m_defaultHotKey( aDefaultHotKey ),
47 m_defaultHotKeyAlt( 0 ),
48 m_legacyName( aLegacyHotKeyName ),
49 m_menuLabel( aLabel ),
50 m_tooltip( aTooltip ),
62 m_group(
std::nullopt ),
64 m_defaultHotKeyAlt( 0 ),
74 m_name( aArgs.m_name.value_or(
"" ) ),
75 m_scope( aArgs.m_scope.value_or(
AS_CONTEXT ) ),
76 m_defaultHotKey( aArgs.m_defaultHotKey.value_or( 0 ) ),
77 m_defaultHotKeyAlt( aArgs.m_defaultHotKeyAlt.value_or( 0 ) ),
78 m_hotKey( aArgs.m_defaultHotKey.value_or( 0 ) ),
80 m_legacyName( aArgs.m_legacyName.value_or(
"" ) ),
81 m_friendlyName(
TowxString( aArgs.m_friendlyName.value_or(
"" ) ) ),
82 m_tooltip(
TowxString( aArgs.m_tooltip.value_or(
"" ) ) ),
85 m_uiid(
std::nullopt ),
86 m_flags( aArgs.m_flags.value_or(
AF_NONE ) )
94 if( aArgs.
m_uiid.has_value() )
103 if( aArgs.
m_group.has_value() )
142 return wxEmptyString;
160 label.Replace( wxS(
"&" ), wxS(
"&&" ) );
177 wxString tooltip = wxGetTranslation(
m_tooltip );
210 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)