pub struct Slider { /* private fields */ }Expand description
A slider component for selecting numeric values within a range
Implementations§
Source§impl Slider
impl Slider
pub fn new( id: impl Into<ElementId>, value: f32, range: RangeInclusive<f32>, ) -> Self
pub fn label(self, label: impl Into<SharedString>) -> Self
pub fn step(self, step: f32) -> Self
pub fn show_value(self, show: bool) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn value(&self) -> f32
pub fn set_value(&mut self, value: f32, cx: &mut Context<'_, Self>)
Trait Implementations§
Source§impl ControlSized for Slider
impl ControlSized for Slider
Source§impl Disableable for Slider
impl Disableable for Slider
impl EventEmitter<SliderChanged> for Slider
Auto Trait Implementations§
impl Freeze for Slider
impl RefUnwindSafe for Slider
impl Send for Slider
impl Sync for Slider
impl Unpin for Slider
impl UnsafeUnpin for Slider
impl UnwindSafe for Slider
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more