pub struct RangeSlider { /* private fields */ }Expand description
Range slider with two thumbs for min/max selection
§Example
use armas_basic::components::RangeSlider;
let mut min = 20.0;
let mut max = 80.0;
RangeSlider::new(0.0, 100.0)
.label("Price range")
.show(ui, &mut min, &mut max);Implementations§
Source§impl RangeSlider
impl RangeSlider
Sourcepub const fn show_value(self, show: bool) -> Self
pub const fn show_value(self, show: bool) -> Self
Show or hide the value label
Sourcepub fn suffix(self, suffix: impl Into<String>) -> Self
pub fn suffix(self, suffix: impl Into<String>) -> Self
Set a suffix for the values (e.g., “%”, “ms”, “Hz”)
Sourcepub const fn allow_range_drag(self, allow: bool) -> Self
pub const fn allow_range_drag(self, allow: bool) -> Self
Allow dragging the filled region to move both thumbs together
Auto Trait Implementations§
impl Freeze for RangeSlider
impl RefUnwindSafe for RangeSlider
impl Send for RangeSlider
impl Sync for RangeSlider
impl Unpin for RangeSlider
impl UnsafeUnpin for RangeSlider
impl UnwindSafe for RangeSlider
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