ScrollView class
#include <Jazz2/UI/Menu/MenuWidgets.h>
Vertical list that scrolls when its children overflow the available area.
Centers the content when it fits, otherwise clamps a scroll offset and supports kinetic touch dragging, keyboard scrolling (keeping the selected item visible), and scroll-edge fade glows.
Base classes
- class ListContainer
- Base of vertical lists of selectable children.
Constructors, destructors, conversion operators
Public functions
- void OnUpdate(float timeMult) override
- Advances the widget's animations.
-
void Draw(IMenuContainer* root,
Canvas* canvas,
const Rectf& bounds,
std::
int32_t& charOffset) override - Draws the widget within the given bounds.
-
auto OnTouchEvent(const nCine::
TouchEvent& event, Vector2i viewSize, IMenuContainer* root) -> bool override - Handles a touch event; returns
trueif it was consumed.
Public variables
- float ContentPadding
- Empty space reserved before the first and after the last item so they aren't flush against the frame; sections with oversized rows can raise it.
Protected functions
- void OnSelectionMoved() override
- Called when the selection moves, so a scrolling container can keep it visible.
- void OnSelectionSet() override
- Called when the selection is set programmatically, so a scrolling container can reveal it.