pub struct DragGestures { /* private fields */ }Expand description
Drag detection with a touch slop before the gesture starts.
Implementations§
Source§impl DragGestures
impl DragGestures
pub fn new() -> Self
pub fn on_start(self, f: impl Fn(DragStart) + 'static) -> Self
pub fn on_drag(self, f: impl Fn(DragUpdate) + 'static) -> Self
pub fn on_end(self, f: impl Fn(DragEnd) + 'static) -> Self
pub fn on_cancel(self, f: impl Fn() + 'static) -> Self
pub fn touch_slop(self, px: f32) -> Self
Trait Implementations§
Source§impl Clone for DragGestures
impl Clone for DragGestures
Source§impl Default for DragGestures
impl Default for DragGestures
Source§impl PointerInputHandler for DragGestures
impl PointerInputHandler for DragGestures
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_attach(&mut self)
fn on_detach(&mut self)
Auto Trait Implementations§
impl !RefUnwindSafe for DragGestures
impl !Send for DragGestures
impl !Sync for DragGestures
impl !UnwindSafe for DragGestures
impl Forget for DragGestures
impl Freeze for DragGestures
impl Move for DragGestures
impl Unpin for DragGestures
impl UnsafeUnpin for DragGestures
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