wx.lib.agw.aui.tabart.AuiCommandCapture¶
A class to handle the dropdown window menu.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Returns the event command identifier. |
|
Processes an event, searching event tables and calling zero or more suitable |
Class API¶
- class AuiCommandCapture(wx.EvtHandler)¶
A class to handle the dropdown window menu.
Methods¶
- __init__(self)¶
Default class constructor.
- GetCommandId(self)¶
Returns the event command identifier.
- ProcessEvent(self, event)¶
Processes an event, searching event tables and calling zero or more suitable event handler function(s).
- Parameters:
event – the event to process.
Note
Normally, your application would not call this function: it is called in the wxPython implementation to dispatch incoming user interface events to the framework (and application). However, you might need to call it if implementing new functionality (such as a new control) where you define new event types, as opposed to allowing the user to override functions.
An instance where you might actually override the
ProcessEvent
function is where you want to direct event processing to event handlers not normally noticed by wxPython. For example, in the document/view architecture, documents and views are potential event handlers. When an event reaches a frame,ProcessEvent
will need to be called on the associated document and view in case event handler functions are associated with these objects.The normal order of event table searching is as follows:
If the object is disabled (via a call to
EvtHandler.SetEvtHandlerEnabled
) the function skips to step (6).If the object is a
wx.Window
,ProcessEvent
is recursively called on the window’swx.Validator
. If this returnsTrue
, the function exits.wxWidgets SearchEventTable is called for this event handler. If this fails, the base class table is tried, and so on until no more tables exist or an appropriate function was found, in which case the function exits.
The search is applied down the entire chain of event handlers (usually the chain has a length of one). If this succeeds, the function exits.
If the object is a
wx.Window
and the event is aCommandEvent
,ProcessEvent
is recursively applied to the parent window’s event handler. If this returnsTrue
, the function exits.Finally,
ProcessEvent
is called on theApp
object.