pub struct DragTracker { /* private fields */ }Expand description
Turns touch pans and mouse drags on one target into Drag steps. Keep one per
draggable thing (sheet handle, drawer edge, a row) across frames.
Implementations§
Source§impl DragTracker
impl DragTracker
Sourcepub fn take_swallow(&mut self) -> bool
pub fn take_swallow(&mut self) -> bool
True once after a mouse drag ended on the target: the release click that follows is the drag’s, not a tap (ignore that click).
Sourcepub fn update<S: Spec>(
&mut self,
view: &VisualView<S>,
id: &WidgetId,
grip: Grip,
axis: Option<Axis>,
now: f64,
) -> Vec<Drag>
pub fn update<S: Spec>( &mut self, view: &VisualView<S>, id: &WidgetId, grip: Grip, axis: Option<Axis>, now: f64, ) -> Vec<Drag>
The drag steps of this frame. id is the hit target’s id (for the mouse press),
axis limits touch pans to that direction (None: any), now is the frame
time in seconds.
Trait Implementations§
Source§impl Clone for DragTracker
impl Clone for DragTracker
Source§impl Debug for DragTracker
impl Debug for DragTracker
Auto Trait Implementations§
impl Forget for DragTracker
impl Freeze for DragTracker
impl Move for DragTracker
impl RefUnwindSafe for DragTracker
impl Send for DragTracker
impl Sync for DragTracker
impl Unpin for DragTracker
impl UnsafeUnpin for DragTracker
impl UnwindSafe for DragTracker
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