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.