Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module Mosaic_ui.Scroll_bar
Scrollbar with proportional thumb sizing and arrow buttons.
Scroll bar widget with optional arrow buttons and a proportional slider thumb.
A scroll bar manages a scroll position within a range determined by scroll_size and viewport_size. The slider thumb is sized proportionally to the visible portion of content. Arrow buttons at each end provide incremental scrolling with hold-to-repeat.
Coordinate system
The scroll coordinate space is expressed in cells:
set_scroll_position t v sets the scroll position of t to v, clamped to the valid range. Fires the on_change callback if the clamped value differs from the current position.
val scroll_by : t->float ->unit:scroll_unit-> unit
scroll_by t delta ~unit adjusts the scroll position of t by delta expressed in unit. The resulting position is clamped to the valid range. See scroll_unit for the meaning of each unit.
apply_props t props replaces the visual properties of t with props. Creation-time fields such as orientation remain unchanged. Does not fire the on_change callback.