Struct tuix::Knob [−]
pub struct Knob<T> where
T: NormalizedMap, {
pub normalized_value: f32,
pub map: T,
// some fields omitted
}
Fields
normalized_value: f32
map: T
Implementations
impl<T> Knob<T> where
T: NormalizedMap,
impl<T> Knob<T> where
T: NormalizedMap,
Set the callback triggered when the slider value is changing (dragging).
Takes a closure which triggers when the slider value is changing, either by pressing the track or dragging the thumb along the track.
Example
Slider::new()
.on_changing(|slider, state, entity| {
entity.emit(WindowEvent::Debug(format!("Slider on_changing: {}", slider.value)));
})
.build(state, parent, |builder| builder);
pub fn set_centered(self, val: bool) -> Knob<T>
Trait Implementations
impl<T> Widget for Knob<T> where
T: NormalizedMap,
impl<T> Widget for Knob<T> where
T: NormalizedMap,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Knob<T>
impl<T> !UnwindSafe for Knob<T>
Blanket Implementations
Mutably borrows from an owned value. Read more