Struct ambient_api::prelude::IntegerSlider
source · pub struct IntegerSlider {
pub value: i32,
pub on_change: Option<Arc<CbDebuggable<dyn Fn(i32) + Sync + Send>>>,
pub min: i32,
pub max: i32,
pub width: f32,
pub logarithmic: bool,
pub suffix: Option<&'static str>,
}
Expand description
A slider for an integer value.
Fields§
§value: i32
The current value of the slider.
on_change: Option<Arc<CbDebuggable<dyn Fn(i32) + Sync + Send>>>
The callback that is called when the value changes.
min: i32
The minimum value of the slider.
max: i32
The maximum value of the slider.
width: f32
The width of the slider.
logarithmic: bool
Whether the slider should use a logarithmic scale.
suffix: Option<&'static str>
The suffix of the slider (display-only).
Trait Implementations§
source§impl Clone for IntegerSlider
impl Clone for IntegerSlider
source§fn clone(&self) -> IntegerSlider
fn clone(&self) -> IntegerSlider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IntegerSlider
impl Debug for IntegerSlider
source§impl ElementComponent for IntegerSlider
impl ElementComponent for IntegerSlider
Auto Trait Implementations§
impl !RefUnwindSafe for IntegerSlider
impl Send for IntegerSlider
impl Sync for IntegerSlider
impl Unpin for IntegerSlider
impl !UnwindSafe for IntegerSlider
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.