pub struct Slider<'a, T = usize>where
T: RangeOp<Step: Copy + Debug> + MapRange<u16> + Debug + Default + Copy + PartialEq,
u16: MapRange<T>,{ /* private fields */ }Expand description
Implementations§
Source§impl<'a, T> Slider<'a, T>
impl<'a, T> Slider<'a, T>
Sourcepub fn styles(self, styles: SliderStyle) -> Self
pub fn styles(self, styles: SliderStyle) -> Self
Set all styles.
Sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Style for focus.
Sourcepub fn bounds_style(self, style: Style) -> Self
pub fn bounds_style(self, style: Style) -> Self
Style for the bounds text.
Sourcepub fn knob_style(self, style: Style) -> Self
pub fn knob_style(self, style: Style) -> Self
Style for the knob.
Sourcepub fn text_align(self, align: Alignment) -> Self
pub fn text_align(self, align: Alignment) -> Self
Text alignment. Used for the bounds and the knob.
Sourcepub fn lower_bound(self, bound: impl Into<Cow<'a, str>>) -> Self
pub fn lower_bound(self, bound: impl Into<Cow<'a, str>>) -> Self
Text for the lower bound. Can contain newlines.
Sourcepub fn upper_bound(self, bound: impl Into<Cow<'a, str>>) -> Self
pub fn upper_bound(self, bound: impl Into<Cow<'a, str>>) -> Self
Text for the upper bound. Can contain newlines.
Sourcepub fn track_char(self, bound: impl Into<Cow<'a, str>>) -> Self
pub fn track_char(self, bound: impl Into<Cow<'a, str>>) -> Self
Fill char for the track.
Sourcepub fn horizontal_knob(self, knob: impl Into<Cow<'a, str>>) -> Self
pub fn horizontal_knob(self, knob: impl Into<Cow<'a, str>>) -> Self
Text for the horizontal knob. Can contain newlines for multiline sliders.
Sourcepub fn vertical_knob(self, knob: impl Into<Cow<'a, str>>) -> Self
pub fn vertical_knob(self, knob: impl Into<Cow<'a, str>>) -> Self
Text for the vertical knob. Can contain newlines for a multiline knob.
pub fn width(&self) -> u16
pub fn height(&self) -> u16
Trait Implementations§
Source§impl<'a, T> StatefulWidget for &Slider<'a, T>
impl<'a, T> StatefulWidget for &Slider<'a, T>
Source§impl<T> StatefulWidget for Slider<'_, T>
impl<T> StatefulWidget for Slider<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Slider<'a, T>
impl<'a, T> RefUnwindSafe for Slider<'a, T>
impl<'a, T> Send for Slider<'a, T>
impl<'a, T> Sync for Slider<'a, T>
impl<'a, T> Unpin for Slider<'a, T>
impl<'a, T> UnwindSafe for Slider<'a, T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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