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 DragGestureswhere
*const RcInner<dyn Fn(DragStart)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(DragStart)>>: Freeze,
*const RcInner<dyn Fn(DragUpdate)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(DragUpdate)>>: Freeze,
*const RcInner<dyn Fn(DragEnd)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(DragEnd)>>: Freeze,
*const RcInner<dyn Fn()> is !null: Freeze,
PhantomData<RcInner<dyn Fn()>>: Freeze,
impl Move for DragGestures
impl Unpin for DragGestures
impl UnsafeUnpin for DragGestureswhere
*const RcInner<dyn Fn(DragStart)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(DragStart)>>: UnsafeUnpin,
*const RcInner<dyn Fn(DragUpdate)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(DragUpdate)>>: UnsafeUnpin,
*const RcInner<dyn Fn(DragEnd)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(DragEnd)>>: UnsafeUnpin,
*const RcInner<dyn Fn()> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn()>>: UnsafeUnpin,
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