|
ZenitUI
Retained-mode C++20 UI framework
|
A virtualized scrolling list with lazy materialization. More...
Go to the source code of this file.
Classes | |
| class | ZenitUI::UI::VirtualView |
| A virtualized list. More... | |
A virtualized scrolling list with lazy materialization.
VirtualView renders only the items currently in (or near) the viewport, so it can present lists with tens of thousands of items at 60 fps. It is a ScrollView subclass (Vertical flow), so it inherits scrolling, clipping and scrollbar rendering from the base.
Three data structures drive the virtualization:
The public API (getFirstVisibleItem, getLastVisibleItem, scrollToItem, setItemCount, setUniformHeight) uses the cumulative heights, which must have been built at least once. Before the first measure, they are empty and those methods return -1 / no-op.