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

.. highlight:: python



.. _wx.lib.eventStack.AppEventHandlerMixin:

==========================================================================================================================================
|phoenix_title|  **wx.lib.eventStack.AppEventHandlerMixin**
==========================================================================================================================================

The purpose of the AppEventHandlerMixin is to provide a centralized
location to manage menu and toolbar events. In an IDE which may have
any number of file editors and services open that may want to respond
to certain menu and toolbar events (e.g. copy, paste, select all),
we need this to efficiently make sure that the right handler is handling
the event.

To work with this system, views must call::

        AddHandlerForID(ID, handlerFunc)


or::

        AddUIHandlerForID(ID, handlerFunc)


in their EVT_SET_FOCUS handler, and call Remove(UI)HandlerForID(ID) in their
EVT_KILL_FOCUS handler.



|

|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>AppEventHandlerMixin</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.eventStack.AppEventHandlerMixin_inheritance.png" alt="Inheritance diagram of AppEventHandlerMixin" 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.eventStack.AppEventHandlerMixin.html" title="wx.lib.eventStack.AppEventHandlerMixin" alt="" coords="5,5,296,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.__init__`                         Initialize self.  See help(type(self)) for accurate signature.
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.AddHandlerForID`                  
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.AddHandlerForIDs`                 
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.AddUIHandlerForID`                
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.HandleEvent`                      
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.HandleUpdateUIEvent`              
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.RemoveHandlerForID`               
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.RemoveHandlerForIDs`              
:meth:`~wx.lib.eventStack.AppEventHandlerMixin.RemoveUIHandlerForID`             
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: AppEventHandlerMixin

   The purpose of the AppEventHandlerMixin is to provide a centralized
   location to manage menu and toolbar events. In an IDE which may have
   any number of file editors and services open that may want to respond
   to certain menu and toolbar events (e.g. copy, paste, select all),
   we need this to efficiently make sure that the right handler is handling
   the event.
   
   To work with this system, views must call::
   
           AddHandlerForID(ID, handlerFunc)
   
   
   or::
   
           AddUIHandlerForID(ID, handlerFunc)
   
   
   in their EVT_SET_FOCUS handler, and call Remove(UI)HandlerForID(ID) in their
   EVT_KILL_FOCUS handler.

   .. method:: __init__(self)

      Initialize self.  See help(type(self)) for accurate signature.


   .. method:: AddHandlerForID(self, eventID, handlerFunc)


   .. method:: AddHandlerForIDs(self, eventID_list, handlerFunc)


   .. method:: AddUIHandlerForID(self, eventID, handlerFunc)


   .. method:: HandleEvent(self, event)


   .. method:: HandleUpdateUIEvent(self, event)


   .. method:: RemoveHandlerForID(self, eventID)


   .. method:: RemoveHandlerForIDs(self, eventID_list)


   .. method:: RemoveUIHandlerForID(self, eventID)


