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

   <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="wx.lib.agw.shortcuteditor.ShortcutEvent" alt="" coords="5,315,285,344"/> <area shape="rect" id="node2" href="wx.PyCommandEvent.html" title="wx.PyCommandEvent" alt="" coords="63,237,228,267"/> <area shape="rect" id="node3" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="71,160,220,189"/> <area shape="rect" id="node4" href="wx.Event.html" title="wx.Event" alt="" coords="104,83,187,112"/> <area shape="rect" id="node5" href="wx.Object.html" title="wx.Object" alt="" coords="102,5,189,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`.


