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§
- Default
Style WDefault slider style.- Selector
- Defines the values and ranges selected by a slider.
- Slider
WValue selector from a range of values.- Slider
Track WSlider track container widget.- Thumb
Args - Arguments for a slider thumb widget generator.
Enums§
- Slider
Direction - Slider orientation and direction.
Statics§
- SLIDER_
DIRECTION_ VAR - Orientation and direction of the parent slider.
Traits§
- Selector
Value - Represents a type that can auto implement a
Selector.