phoenix_title 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 Class Hierarchy

Inheritance diagram for class ShortcutEvent:

super_classes Known Superclasses

wx.PyCommandEvent


method_summary Methods Summary

__init__

Default class constructor.

GetAccelerator

Gets the shortcut string for which the operation was performed for EVT_SHORTCUT_CHANGED

GetOldAccelerator

Returns the previous shortcut string for EVT_SHORTCUT_CHANGED and

GetShortcut

Returns the shortcut class used for EVT_SHORTCUT_CHANGED and

SetAccelerator

Sets the shortcut string for which the operation was performed for EVT_SHORTCUT_CHANGED

SetOldAccelerator

Sets the previous shortcut string for EVT_SHORTCUT_CHANGED and

SetShortcut

Sets the shortcut class used for EVT_SHORTCUT_CHANGED and


api Class API

class ShortcutEvent(wx.PyCommandEvent)

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).


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 and EVT_SHORTCUT_CHANGING events.

Returns

A string representing the new shortcut string (accelerator).



GetOldAccelerator(self)

Returns the previous shortcut string for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Returns

A string representing the old shortcut string (accelerator).



GetShortcut(self)

Returns the shortcut class used for EVT_SHORTCUT_CHANGED and EVT_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 and EVT_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 and EVT_SHORTCUT_CHANGING events.

Parameters

accelerator (string) – a string representing the old shortcut string (accelerator).



SetShortcut(self, shortcut)

Sets the shortcut class used for EVT_SHORTCUT_CHANGED and EVT_SHORTCUT_CHANGING events.

Parameters

shortcut – an instance of Shortcut.