Module slider

Module slider 

Source
Expand description

Slider widget, styles and properties.

This widget allows selecting a value or range by dragging a selector thumb over a range line.

let value = var(0u8);
zng::slider::Slider! {
    // declare slider with single thumb
    selector = zng::slider::Selector::value(value.clone(), 0, 100);
    // show selected value
    zng::container::child_out_bottom = Text!(value.map_debug(false));
}

The example above creates a a slider with a single thumb that selects a u8 value in the 0..=100 range. The Selector type also supports creating multiple thumbs and custom range conversions.

§Full API

See zng_wgt_slider for the full widget API.

Modules§

thumb
Slider thumb widget, styles and properties.

Structs§

DefaultStyle
W Default slider style.
Selector
Defines the values and ranges selected by a slider.
Slider
W Value selector from a range of values.
SliderTrack
W Slider track container widget.
ThumbArgs
Arguments for a slider thumb widget generator.

Enums§

SliderDirection
Slider orientation and direction.

Statics§

SLIDER_DIRECTION_VAR
Orientation and direction of the parent slider.

Traits§

SelectorValue
Represents a type that can auto implement a Selector.