.. include:: headings.inc .. currentmodule:: lib.eventStack .. highlight:: python .. _lib.eventStack.AppEventHandlerMixin: ========================================================================================================================================== |phoenix_title| **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| Inheritance Diagram ===================================== Inheritance diagram for class **AppEventHandlerMixin** .. raw:: html

Inheritance diagram of AppEventHandlerMixin

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.eventStack.AppEventHandlerMixin.__init__` :meth:`~lib.eventStack.AppEventHandlerMixin.AddHandlerForID` :meth:`~lib.eventStack.AppEventHandlerMixin.AddHandlerForIDs` :meth:`~lib.eventStack.AppEventHandlerMixin.AddUIHandlerForID` :meth:`~lib.eventStack.AppEventHandlerMixin.HandleEvent` :meth:`~lib.eventStack.AppEventHandlerMixin.HandleUpdateUIEvent` :meth:`~lib.eventStack.AppEventHandlerMixin.RemoveHandlerForID` :meth:`~lib.eventStack.AppEventHandlerMixin.RemoveHandlerForIDs` :meth:`~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) .. 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)