PointerEventPass
Class
Common
enum class PointerEventPass
The enumeration of passes where PointerInputChange
traverses up and down the UI tree.
PointerInputChanges traverse throw the hierarchy in the following passes:
Initial
: Down the tree from ancestor to descendant.Main
: Up the tree from descendant to ancestor.Final
: Down the tree from ancestor to descendant.
These passes serve the following purposes:
- Initial: Allows ancestors to consume aspects of
PointerInputChange
before descendants. This is where, for example, a scroller may block buttons from getting tapped by other fingers once scrolling has started. - Main: The primary pass where gesture filters should react to and consume aspects of
PointerInputChange
s. This is the primary path where descendants will interact withPointerInputChange
s before parents. This allows for buttons to respond to a tap before a container of the bottom to respond to a tap. - Final: This pass is where children can learn what aspects of
PointerInputChange
s were consumed by parents during theMain
pass. For example, this is how a button determines that it should no longer respond to fingers lifting off of it because a parent scroller has consumed movement in aPointerInputChange
.