Document the order in which event tables are examined.
Static event tables are search top to bottom while dynamic event tables are searched in the most-recently-bound to the most-early-bound order. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -453,14 +453,19 @@ doesn't count as having handled the event and the search continues):
|
|||||||
Bind<>() was called, is consulted. Notice that this is done before
|
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
|
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
|
event handler match the same event, the static one is never going to be
|
||||||
used unless wxEvent::Skip() is called in the dynamic one.
|
used unless wxEvent::Skip() is called in the dynamic one. Also note that
|
||||||
|
the dynamically bound handlers are searched in order of their registration
|
||||||
|
during program run-time, i.e. later bound handlers take priority over the
|
||||||
|
previously bound ones.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li value="4">
|
<li value="4">
|
||||||
The event table containing all the handlers defined using the event table
|
The event table containing all the handlers defined using the event table
|
||||||
macros in this class and its base classes is examined. Notice that this
|
macros in this class and its base classes is examined. The search in an
|
||||||
means that any event handler defined in a base class will be executed at
|
event table respects the order of the event macros appearance in the source
|
||||||
this step.
|
code, i.e. earlier occurring entries take precedence over later occurring
|
||||||
|
ones. Notice that this means that any event handler defined in a base class
|
||||||
|
will be executed at this step.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li value="5">
|
<li value="5">
|
||||||
|
@@ -595,11 +595,13 @@ public:
|
|||||||
-# If the object is disabled (via a call to wxEvtHandler::SetEvtHandlerEnabled)
|
-# If the object is disabled (via a call to wxEvtHandler::SetEvtHandlerEnabled)
|
||||||
the function skips to step (7).
|
the function skips to step (7).
|
||||||
-# Dynamic event table of the handlers bound using Bind<>() is
|
-# Dynamic event table of the handlers bound using Bind<>() is
|
||||||
searched. If a handler is found, it is executed and the function
|
searched in the most-recently-bound to the most-early-bound order.
|
||||||
|
If a handler is found, it is executed and the function
|
||||||
returns @true unless the handler used wxEvent::Skip() to indicate
|
returns @true unless the handler used wxEvent::Skip() to indicate
|
||||||
that it didn't handle the event in which case the search continues.
|
that it didn't handle the event in which case the search continues.
|
||||||
-# Static events table of the handlers bound using event table
|
-# Static events table of the handlers bound using event table
|
||||||
macros is searched for this event handler. If this fails, the base
|
macros is searched for this event handler in the order of appearance
|
||||||
|
of event table macros in the source code. If this fails, the base
|
||||||
class event table is tried, and so on until no more tables
|
class event table is tried, and so on until no more tables
|
||||||
exist or an appropriate function was found. If a handler is found,
|
exist or an appropriate function was found. If a handler is found,
|
||||||
the same logic as in the previous step applies.
|
the same logic as in the previous step applies.
|
||||||
|
Reference in New Issue
Block a user