Appendix H How wxWidgets Processes Events

This appendix takes a closer look at how wxWidgets processes events, going into details omitted from the simplified view we’ve seen so far.

When an event is received from the windowing system, wxWidgets calls wxEvtHandler::ProcessEvent on the first event handler object belonging to the window generating the event.

Figure H-1 summarizes the order of event table searching by ProcessEvent. Here’s how it works:

1. If the object is disabled (via a call to wxEvtHandler::SetEvtHandlerEnabled), the function skips to Step 6.

2. If the object is a wxWindow, ProcessEvent is recursively called on the window’s wxValidator. If this returns true, the function exits.

3. SearchEventTable is called for this event handler. ...

Get Cross-Platform GUI Programming with wxWidgets now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.