morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::Virtualization Struct Reference

When a keyed row list realizes a widget only for the rows in or near the visible range, instead of for every row regardless of scroll position. A row's own reactive state (its signal, rebuilt from the session on every change) is unaffected either way and is never released while its key exists; this setting only decides whether a row's mounted widget is also kept alive off-screen. More...

#include <view.hpp>

Public Attributes

std::size_t threshold = 2000
 Below this many rows, every row's widget is realized regardless of scroll position, matching today's behavior exactly; set once.
std::size_t overscan = 10
 How many rows beyond the visible range, on each side, keep a realized widget so a small scroll does not have to realize a widget on every frame; set once.

Detailed Description

When a keyed row list realizes a widget only for the rows in or near the visible range, instead of for every row regardless of scroll position. A row's own reactive state (its signal, rebuilt from the session on every change) is unaffected either way and is never released while its key exists; this setting only decides whether a row's mounted widget is also kept alive off-screen.

Definition at line 854 of file view.hpp.

Member Data Documentation

◆ threshold

std::size_t morph::ui::Virtualization::threshold = 2000

Below this many rows, every row's widget is realized regardless of scroll position, matching today's behavior exactly; set once.

Definition at line 857 of file view.hpp.

◆ overscan

std::size_t morph::ui::Virtualization::overscan = 10

How many rows beyond the visible range, on each side, keep a realized widget so a small scroll does not have to realize a widget on every frame; set once.

Definition at line 860 of file view.hpp.


The documentation for this struct was generated from the following file: