pub struct DragRecognizer { /* private fields */ }Expand description
Recognizes a drag gesture (pointer down + move beyond threshold).
Implementations§
Trait Implementations§
Source§impl Debug for DragRecognizer
impl Debug for DragRecognizer
Source§impl Default for DragRecognizer
impl Default for DragRecognizer
Source§impl GestureRecognizer for DragRecognizer
impl GestureRecognizer for DragRecognizer
Source§fn process(&mut self, event: &RawPointerEvent) -> GestureResult
fn process(&mut self, event: &RawPointerEvent) -> GestureResult
Feed a raw pointer event and return the recognition result.
Source§fn priority(&self) -> u32
fn priority(&self) -> u32
Priority for arbitration when multiple recognizers compete.
Higher priority wins.
Source§fn tick(&mut self, _now: Instant) -> GestureResult
fn tick(&mut self, _now: Instant) -> GestureResult
Advance any time-driven state (e.g. long-press elapsed timer).
Default is a no-op — only recognizers that depend on wall-clock
time (like
LongPressRecognizer) override this.Source§fn next_deadline(&self) -> Option<Instant>
fn next_deadline(&self) -> Option<Instant>
Earliest future
Instant at which calling GestureRecognizer::tick
could transition the recognizer into Recognized or Failed.
Returns None when the recognizer is idle or not time-driven. Used
by the event loop to schedule a wake-up before a long-press fires.Source§fn resets_on_peer_recognition(&self) -> bool
fn resets_on_peer_recognition(&self) -> bool
Whether this recognizer should be reset when a peer wins arbitration
in the same
GestureArena::process call. The default is true —
winner-take-all, the usual behaviour for mutually exclusive gestures
(tap vs drag, long-press vs tap). Multi-tap recognizers
(DoubleTapRecognizer, TripleTapRecognizer) override this to
false so a DoubleTap firing at click 2 does not wipe the
TripleTapRecognizer’s accumulated state before click 3 arrives.Auto Trait Implementations§
impl Freeze for DragRecognizer
impl RefUnwindSafe for DragRecognizer
impl Send for DragRecognizer
impl Sync for DragRecognizer
impl Unpin for DragRecognizer
impl UnsafeUnpin for DragRecognizer
impl UnwindSafe for DragRecognizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more