wx.lib.agw.shortcuteditor.ShortcutEvent¶
ShortcutEvent
is a special subclassing of PyCommandEvent
.
This event gets emitted when the user is about to change a shortcut (via EVT_SHORTCUT_CHANGING
)
and when the user has changed a shortcut (via EVT_SHORTCUT_CHANGED
).
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Gets the shortcut string for which the operation was performed for |
|
Returns the previous shortcut string for |
|
Returns the shortcut class used for |
|
Sets the shortcut string for which the operation was performed for |
|
Sets the previous shortcut string for |
|
Sets the shortcut class used for |
Class API¶
- class ShortcutEvent(wx.PyCommandEvent)¶
ShortcutEvent
is a special subclassing ofPyCommandEvent
.This event gets emitted when the user is about to change a shortcut (via
EVT_SHORTCUT_CHANGING
) and when the user has changed a shortcut (viaEVT_SHORTCUT_CHANGED
).
Methods¶
- __init__(self, evtType, evtId, \*\*kwargs)¶
Default class constructor. For internal use: do not call it in your code!
- Parameters:
evtType (integer) – the event type;
evtId (integer) – the event identifier.
- GetAccelerator(self)¶
Gets the shortcut string for which the operation was performed for
EVT_SHORTCUT_CHANGED
andEVT_SHORTCUT_CHANGING
events.- Returns:
A string representing the new shortcut string (accelerator).
- GetOldAccelerator(self)¶
Returns the previous shortcut string for
EVT_SHORTCUT_CHANGED
andEVT_SHORTCUT_CHANGING
events.- Returns:
A string representing the old shortcut string (accelerator).
- GetShortcut(self)¶
Returns the shortcut class used for
EVT_SHORTCUT_CHANGED
andEVT_SHORTCUT_CHANGING
events.- Returns:
An instance of
Shortcut
.
- SetAccelerator(self, accelerator)¶
Sets the shortcut string for which the operation was performed for
EVT_SHORTCUT_CHANGED
andEVT_SHORTCUT_CHANGING
events.- Parameters:
accelerator (string) – a string representing the new shortcut string (accelerator).
- SetOldAccelerator(self, accelerator)¶
Sets the previous shortcut string for
EVT_SHORTCUT_CHANGED
andEVT_SHORTCUT_CHANGING
events.- Parameters:
accelerator (string) – a string representing the old shortcut string (accelerator).