Expand description
ScrollView — scrolling container with egui-style scrollbars.
Supports vertical, horizontal, or bidirectional scrolling. The scrollbar
can be styled in detail (bar width, margins, fade, solid vs floating) via
ScrollBarStyle — set by value, by builder, or bound to an
Rc<Cell<ScrollBarStyle>> for live tweaking (used by the demo Appearance
tab).
§Coordinate system
All local coordinates are Y-up. scroll_offset is “how far the user has
scrolled down from the top” — 0 shows the TOP of the content,
max_scroll_y shows the BOTTOM. Same convention for horizontal:
h_scroll_offset = 0 shows the LEFT of the content.
§Virtual rendering
with_viewport_cell(Rc<Cell<Rect>>) publishes the currently-visible
content-space rect each layout. Children that want to cull off-viewport
work (e.g. painting 10k row labels) read this cell and limit their paint.
Structs§
- Scroll
BarStyle - Full scrollbar appearance configuration — mirrors egui’s
style.spacing.scroll. - Scroll
View
Enums§
- Scroll
BarColor - Which pair of colours is used for the track vs thumb.
- Scroll
BarKind - Whether the bar reserves layout space (Solid) or floats over content (Floating).
- Scroll
BarVisibility - How the scrollbar is shown. Matches egui’s
ScrollBarVisibility.
Functions§
- current_
scroll_ style - Read the current global scroll-bar style.
- current_
scroll_ visibility - Read the current global scroll-bar visibility policy.
- set_
scroll_ style - Replace the global scroll-bar style. All subsequent
ScrollViewlayouts that don’t have an explicit override pick this up. - set_
scroll_ visibility - Replace the global scroll-bar visibility policy. Every
ScrollViewthat doesn’t bind its ownwith_bar_visibility_cell(...)or callwith_bar_visibility(...)reads this value on each layout.