Expand description
A slider’s arithmetic: what value a pointer position, an arrow, a Page
key or Home / End means on a node whose role is Slider and that
declared on_change.
The core proposes a value and never applies it: the change event
carries the number, and nothing moves until the view declares it as
value_now. Nothing here is retained past a drag. The stock control is
widgets::slider; this module is what it and
a custom slider share.
Numbers are worked in f64 from the declared f32s read back through
their shortest decimal spelling, and a result is rounded to the
decimals the range and step are written in, so a step of 0.1 from
0 is 0.3 on the wire and not 0.30000001192092896.
Structs§
- Slider
Range - A slider’s range and step, as the view declared them. The ARIA defaults stand in for an unset end: 0 and 100.
- Slider
Track - A slider’s track as the pointer reads it: the node’s content box along
its main axis, and the range it maps onto. Registered on the node’s
hit region when it declared
on_change(HitRegion::slider).
Enums§
- Slider
Move - One keyboard (or assistive-technology) move of a slider.
Functions§
- change_
event {kind="change", value, phase, tag}on the slider.