.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.agw.shortcuteditor .. highlight:: python .. _wx.lib.agw.shortcuteditor.ShortcutEvent: ========================================================================================================================================== |phoenix_title| **wx.lib.agw.shortcuteditor.ShortcutEvent** ========================================================================================================================================== :class:`ShortcutEvent` is a special subclassing of :class:`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 ================================= .. raw:: html
Inheritance diagram for class ShortcutEvent:
| |super_classes| Known Superclasses ================================== :class:`wx.PyCommandEvent` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.__init__` Default class constructor. :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.GetAccelerator` Gets the shortcut string for which the operation was performed for ``EVT_SHORTCUT_CHANGED`` :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.GetOldAccelerator` Returns the previous shortcut string for ``EVT_SHORTCUT_CHANGED`` and :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.GetShortcut` Returns the shortcut class used for ``EVT_SHORTCUT_CHANGED`` and :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.SetAccelerator` Sets the shortcut string for which the operation was performed for ``EVT_SHORTCUT_CHANGED`` :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.SetOldAccelerator` Sets the previous shortcut string for ``EVT_SHORTCUT_CHANGED`` and :meth:`~wx.lib.agw.shortcuteditor.ShortcutEvent.SetShortcut` Sets the shortcut class used for ``EVT_SHORTCUT_CHANGED`` and ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ShortcutEvent(wx.PyCommandEvent) :class:`ShortcutEvent` is a special subclassing of :class:`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``). .. method:: __init__(self, evtType, evtId, \*\*kwargs) Default class constructor. For internal use: do not call it in your code! :param integer `evtType`: the event type; :param integer `evtId`: the event identifier. .. method:: GetAccelerator(self) Gets the shortcut string for which the operation was performed for ``EVT_SHORTCUT_CHANGED`` and ``EVT_SHORTCUT_CHANGING`` events. :return: A string representing the new shortcut string (accelerator). .. method:: GetOldAccelerator(self) Returns the previous shortcut string for ``EVT_SHORTCUT_CHANGED`` and ``EVT_SHORTCUT_CHANGING`` events. :return: A string representing the old shortcut string (accelerator). .. method:: GetShortcut(self) Returns the shortcut class used for ``EVT_SHORTCUT_CHANGED`` and ``EVT_SHORTCUT_CHANGING`` events. :return: An instance of :class:`Shortcut`. .. method:: SetAccelerator(self, accelerator) Sets the shortcut string for which the operation was performed for ``EVT_SHORTCUT_CHANGED`` and ``EVT_SHORTCUT_CHANGING`` events. :param string `accelerator`: a string representing the new shortcut string (accelerator). .. method:: SetOldAccelerator(self, accelerator) Sets the previous shortcut string for ``EVT_SHORTCUT_CHANGED`` and ``EVT_SHORTCUT_CHANGING`` events. :param string `accelerator`: a string representing the old shortcut string (accelerator). .. method:: SetShortcut(self, shortcut) Sets the shortcut class used for ``EVT_SHORTCUT_CHANGED`` and ``EVT_SHORTCUT_CHANGING`` events. :param `shortcut`: an instance of :class:`Shortcut`.