#[non_exhaustive]pub struct TapEvent {
pub position: Point,
pub button: PointerButton,
pub modifiers: Modifiers,
}Expand description
Information about a recognized click-style gesture, passed to the
four tap-family handlers (on_tap, on_double_tap, on_triple_tap,
on_long_press).
The struct is #[non_exhaustive] so future fields (timestamp, click
count for a hypothetical on_n_tap, pressure for stylus events) can
land without breaking existing match patterns.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.position: PointPointer position in widget-local coords, captured at the
finalising event (the Up of the last tap for tap / double-tap /
triple-tap; the held Down for long-press, since long-press
recognises on a tick before any Up).
Which button finalised the gesture. Multi-tap recognizers require every tap in the sequence to use the same button — mixed-button sequences fail rather than spuriously firing.
modifiers: ModifiersModifier keys held at the finalising event. Sourced from
WidgetEvent::PointerUp { modifiers, .. } (or PointerDown for
long-press).