|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
One mounted row of a ForEach or Table. More...
#include <mount.hpp>
Public Attributes | |
| Key | key |
| The row's key. | |
| std::unique_ptr< reactive::Scope > | stateScope |
| Owns the row's slot; made once, for as long as the key is in the data. | |
| RowSlot * | slot = nullptr |
| The row's slot, owned by stateScope. | |
| std::unique_ptr< reactive::Scope > | widgetScope |
| Owns the row's widget and its bindings; null while the row is dewindowed or has no view. | |
| Widget * | widget = nullptr |
| The row's widget, owned by widgetScope; null exactly when widgetScope is null. | |
| RowWidgetState | widgetState = RowWidgetState::NullView |
| Which of the three states above widget is in. | |
| std::size_t | viewPosition = 0 |
| This row's position in view order, as of the most recent reconcile pass – not its position in KeyedRows::list, which reorder groups realized rows ahead of dewindowed ones within (so the container only ever holds the widgets that exist), and so no longer matches view order once any row is dewindowed. applyWindow compares this against the visible range; reconcile is the only writer. | |
One mounted row of a ForEach or Table.
A row's state (its slot, and the signal it reads) and its widget are owned by two separate scopes so a virtualized table can release a row's widget – the expensive part of mounting a row – while its key is still in the data, without losing the row's place: stateScope is made once, when the key first appears, and lives until the key is gone; widgetScope comes and goes with whether the row is realized. A non-virtualized ForEach/Table (below its Virtualization::threshold, or on a backend that never dewindows a row) always has widgetScope set alongside stateScope, so this costs nothing when windowing never applies.
| std::unique_ptr<reactive::Scope> morph::ui::detail::KeyedRow::stateScope |
| RowSlot* morph::ui::detail::KeyedRow::slot = nullptr |
The row's slot, owned by stateScope.
| std::unique_ptr<reactive::Scope> morph::ui::detail::KeyedRow::widgetScope |
| Widget* morph::ui::detail::KeyedRow::widget = nullptr |
The row's widget, owned by widgetScope; null exactly when widgetScope is null.
| RowWidgetState morph::ui::detail::KeyedRow::widgetState = RowWidgetState::NullView |
| std::size_t morph::ui::detail::KeyedRow::viewPosition = 0 |
This row's position in view order, as of the most recent reconcile pass – not its position in KeyedRows::list, which reorder groups realized rows ahead of dewindowed ones within (so the container only ever holds the widgets that exist), and so no longer matches view order once any row is dewindowed. applyWindow compares this against the visible range; reconcile is the only writer.