Struct ambient_ui::editor::Slider
source · pub struct Slider {
pub value: f32,
pub on_change: Option<Cb<dyn Fn(f32) + Sync + Send>>,
pub min: f32,
pub max: f32,
pub width: f32,
pub logarithmic: bool,
pub round: Option<u32>,
pub suffix: Option<&'static str>,
}
Expand description
A slider for a floating-point value.
Fields§
§value: f32
The value to edit.
on_change: Option<Cb<dyn Fn(f32) + Sync + Send>>
Callback for when the value is changed.
min: f32
The minimum value.
max: f32
The maximum value.
width: f32
The width of the slider.
logarithmic: bool
Whether the slider should be logarithmic.
round: Option<u32>
The number of decimal places to round to.
suffix: Option<&'static str>
The suffix to append to the value (display-only).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Slider
impl Send for Slider
impl Sync for Slider
impl Unpin 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> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.