pub struct TapGestures { /* private fields */ }Expand description
Tap, double tap, and long press.
With on_double_tap set, a first tap waits one double_tap_ms window
before it is reported as a tap. A long press fires while the finger is still
down; releasing afterwards reports nothing.
Implementations§
Source§impl TapGestures
impl TapGestures
pub fn new() -> Self
pub fn on_tap(self, f: impl Fn(TapEvent) + 'static) -> Self
pub fn on_double_tap(self, f: impl Fn(TapEvent) + 'static) -> Self
pub fn on_long_press(self, f: impl Fn(TapEvent) + 'static) -> Self
pub fn touch_slop(self, px: f32) -> Self
pub fn double_tap_window(self, ms: f32) -> Self
pub fn long_press_window(self, ms: f32) -> Self
Trait Implementations§
Source§impl Clone for TapGestures
impl Clone for TapGestures
Source§impl Default for TapGestures
impl Default for TapGestures
Source§impl PointerInputHandler for TapGestures
impl PointerInputHandler for TapGestures
Source§fn clone_handler(&self) -> Box<dyn PointerInputHandler>
fn clone_handler(&self) -> Box<dyn PointerInputHandler>
Build a fresh handler with the same configuration and no runtime state.
Source§fn sync(&mut self, next: &dyn PointerInputHandler)
fn sync(&mut self, next: &dyn PointerInputHandler)
Copy configuration from a freshly built handler into this one, leaving
runtime state (press position, accumulated drag) alone.
fn on_event(&mut self, event: &PointerEvent) -> bool
fn on_detach(&mut self)
fn on_attach(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for TapGestures
impl !Send for TapGestures
impl !Sync for TapGestures
impl !UnwindSafe for TapGestures
impl Forget for TapGestures
impl Freeze for TapGestures
impl Move for TapGestures
impl Unpin for TapGestures
impl UnsafeUnpin for TapGestures
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