Struct tuix::Knob[]

pub struct Knob<T> where
    T: NormalizedMap
{ pub normalized_value: f32, pub map: T, // some fields omitted }

Fields

normalized_value: f32map: T

Implementations

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);

Trait Implementations

Adds the widget into state and returns the associated type Ret - an entity id or a tuple of entity ids

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.