Expand description
Wheel and drag scrolling with optional momentum.
Low-level scroll algorithms (MomentumScroller, HardScroller) accumulate
per-axis offsets. Element managers combine wheel input, optional mouse drag, and
layout bounds to produce clamped scroll positions.
Scroll positions use 0.0 when content is aligned to the top-left of the clip
region. Scrolling content up or left produces negative values. Valid range
per axis is [−limits, 0] where limits = (internal_size − bound_size).max(0).
Layout bounds come from cotis_utils::element_state::ElementBoundingBox and
internal content size from cotis_utils::element_state::ElementClipInternalSize.
Structs§
- Double
Axis Scroll Element Manager - Per-element two-axis scroll manager with wheel, optional drag, and clamping.
- Double
Axis Scroll Manager - Independent scroll algorithms for horizontal (
[0]) and vertical ([1]) axes. - Hard
Scroller - Direct scroll offset without momentum.
- Momentum
Scroller - Scroll offset with velocity-based momentum and frame-rate-independent friction.
- Single
Axis Scroll Element Manager - Per-element single-axis scroll manager with wheel, optional drag, and clamping.
Enums§
- Scroll
Algorithm - Per-axis scroll algorithm wrapper.
- Single
Axis Scroll Manager - Scroll manager for a single axis.
Traits§
- Full
Element Scroll State - Combines cursor state, wheel input, and layout bounds for element scrolling.