Show the order in which different event handlers are called.

Update the event sample to define (as) many (as possible) event handlers for a
test button and log messages in all of the handlers to leave a trace of the
order in which they were executed.

Add a pointer to this feature of the event sample to the events overview.

Closes #11156.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-09-07 23:00:21 +00:00
parent 758f356c53
commit 7c9cc312e7
2 changed files with 168 additions and 5 deletions

View File

@@ -428,7 +428,10 @@ in simple situations where this extra flexibility is not needed.
The previous sections explain how to define event handlers but don't address
the question of how exactly wxWidgets finds the handler to call for the
given event. This section describes the algorithm used in detail.
given event. This section describes the algorithm used in detail. Notice that
you may want to run the @ref page_samples_event while reading this section and
look at its code and the output when the button which can be used to test the
event handlers execution order is clicked to understand it better.
When an event is received from the windowing system, wxWidgets calls
wxEvtHandler::ProcessEvent() on the first event handler object belonging to the
@@ -454,7 +457,7 @@ doesn't count as having handled the event and the search continues):
</li>
<li value="3">
The list of dynamically bind event handlers, i.e., those for which
The list of dynamically bound event handlers, i.e., those for which
Bind<>() was called, is consulted. Notice that this is done before
checking the static event table entries, so if both a dynamic and a static
event handler match the same event, the static one is never going to be