.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>ShortcutEvent</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.agw.shortcuteditor.ShortcutEvent_inheritance.png" alt="Inheritance diagram of ShortcutEvent" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.shortcuteditor.ShortcutEvent.html" title="ShortcutEvent is a special subclassing of PyCommandEvent." alt="" coords="5,315,296,344"/> <area shape="rect" id="node2" href="wx.PyCommandEvent.html" title="PyCommandEvent can be used as a base class for implementing" alt="" coords="67,237,235,267"/> <area shape="rect" id="node3" href="wx.CommandEvent.html" title="This event class contains information about command events, which originate from a variety of simple controls." alt="" coords="75,160,227,189"/> <area shape="rect" id="node4" href="wx.Event.html" title="An event is a structure holding information about an event passed to a callback or member function." alt="" coords="109,83,192,112"/> <area shape="rect" id="node5" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="107,5,195,35"/> </map> 
   </p>
   </div>

|


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