pub struct SliderData {
pub sprites: Vec<Option<SpriteRef>>,
pub range: [f32; 2],
pub value: f32,
pub steps: i32,
pub inset: i32,
pub track_y: i32,
pub number: Option<NodeId>,
pub over_knob: bool,
pub drag: Option<(f32, i32)>,
}Expand description
The state of a slider.
Fields§
§sprites: Vec<Option<SpriteRef>>The sprites: the track’s ends and middle, the knob, and the knob under the pointer.
range: [f32; 2]The smallest and the largest value.
value: f32The value.
steps: i32Steps across the range (SliderDescription): a click on the track moves the value one of them.
inset: i32The space between the track’s ends and the knob’s travel, in pixels.
track_y: i32The track’s vertical position in the element, in pixels.
number: Option<NodeId>The number shown next to the slider, if it has one.
over_knob: boolThe pointer is over the knob (it draws the fifth sprite).
drag: Option<(f32, i32)>A drag from the knob (flag 0x200000): the value and pointer x when it began.
Implementations§
Trait Implementations§
Source§impl Clone for SliderData
impl Clone for SliderData
Source§fn clone(&self) -> SliderData
fn clone(&self) -> SliderData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SliderData
impl RefUnwindSafe for SliderData
impl Send for SliderData
impl Sync for SliderData
impl Unpin for SliderData
impl UnsafeUnpin for SliderData
impl UnwindSafe for SliderData
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