pub enum DragMode {
Follow,
TapOnly,
Slide {
origin: f32,
},
SlideThumb {
origin: f32,
radius: f32,
},
Thumbs {
values: [f32; 2],
radius: f32,
},
}Expand description
How a press and a slide move a dragged value (milestone 650) — the reference’s
SliderInteraction, in the terms the shell needs to apply it.
Variants§
Follow
The value goes where the pointer is, from the press on: a tap jumps it, a slide carries it. The default.
TapOnly
The press sets the value; the slide that follows changes nothing.
Slide
The press leaves the value where it is; the slide moves it by its own length, from
origin, the value’s place along the travel when the press landed.
SlideThumb
As Slide, and only for a press within radius logical pixels of
the thumb at origin: a press anywhere else starts nothing at all.
Fields
Thumbs
Two thumbs on one travel (milestone 651), the reference’s range slider: the
press picks one (DragTrack::pick_thumb) and the drag moves it with the pointer;
the widget hears it through Widget::on_thumb_drag.
Trait Implementations§
impl Copy for DragMode
impl StructuralPartialEq for DragMode
Auto Trait Implementations§
impl Freeze for DragMode
impl RefUnwindSafe for DragMode
impl Send for DragMode
impl Sync for DragMode
impl Unpin for DragMode
impl UnsafeUnpin for DragMode
impl UnwindSafe for DragMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.