Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Mosaic_ui.Slider
Interactive horizontal or vertical slider.
Slider with sub-cell precision thumb.
A slider maps a float value in [min;max] to a visual thumb position along a horizontal or vertical track. The thumb size is proportional to viewport_size relative to the total range, giving scrollbar-style display where the thumb represents the visible portion of content.
The slider handles left-button mouse events: clicking on the track jumps the thumb, clicking on the thumb initiates a drag, and releasing ends it.
type t
The type for sliders. A slider owns a Renderable.t and manages its own rendering and mouse interaction.
set_min t v sets the lower bound. If the current value is below v, it is clamped up, which may fire on_change. No effect if v equals the current minimum.
set_max t v sets the upper bound. If the current value is above v, it is clamped down, which may fire on_change. No effect if v equals the current maximum.
set_viewport_size t v sets the visible portion size, clamped to [0.01;max -. min]. Controls thumb size relative to the range. No effect if the clamped result equals the current viewport size.