ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
VirtualList.hpp File Reference

A fixed-height virtualized scrolling list with prefab node recycling. More...

#include "Common.hpp"
#include "Layout.hpp"
#include "ScrollView.hpp"
#include <deque>
#include <functional>
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  ZenitUI::UI::VirtualList
 A fixed-height virtualized list that recycles ZMarkup prefab rows. More...

Detailed Description

A fixed-height virtualized scrolling list with prefab node recycling.

VirtualList extends ScrollView (Vertical) and materializes only the rows intersecting the viewport plus a configurable overscan buffer (default: 2 rows on each side). When rows scroll out of view, their Layout instances are recycled in FIFO order and re-bound to incoming indices via onBindRow (or onBindRowNode), bounding total node allocations to ceil(viewportHeight / rowHeight) + 2 * bufferRows.