Weak UI-affine navigation handle owned by an existing scene/model scope. Removing a view does not remove its context. Closing the scene cancels pending resolution and retires all callbacks. Handles retain no model, snapshot, widget, source or runtime. Copied immutable channel snapshots and bookmarks remain ordinary independent values.
More...
#include <managed_navigation.hpp>
|
|
| ManagedNavigation ()=default |
| | Empty handle; operations return CLOSED.
|
| template<class T> |
| std::expected< void, ManagedError > | setModel (ManagedModel< T > model, ModelRebindOptions options={}) const |
| template<class T> |
| bool | model (ManagedModel< T > model, ModelRebindOptions options={}) const |
| std::expected< ManagedSource< NavigationPosition >, TreeError > | current () const |
| std::expected< ManagedSource< NavigationSelection >, TreeError > | selection () const |
| std::expected< ManagedSource< NavigationPosition >, TreeError > | readingAnchor () const |
| std::expected< std::optional< ModelBookmark >, TreeError > | bookmark () const |
| std::expected< std::optional< ModelBookmark >, TreeError > | readingBookmark () const |
| std::expected< void, TreeError > | navigate (RowId id) const |
| std::expected< void, TreeError > | setCurrent (ModelBookmark bookmark) const |
| std::expected< void, TreeError > | clearCurrent () const |
| std::expected< void, TreeError > | setSelection (std::span< const RowId > rows) const |
| std::expected< void, TreeError > | setReadingAnchor (ModelBookmark bookmark) const |
| std::expected< void, TreeError > | clearReadingAnchor () const |
| std::expected< void, TreeError > | setChangeMap (PositionChangeMap changes) const |
| std::expected< PositionRequest, TreeError > | beginResolve (std::uint64_t revision) const |
| std::expected< bool, TreeError > | applyReply (const PositionReply &reply) const |
| std::expected< std::stop_token, TreeError > | stopToken () const |
|
|
class | ManagedScene |
|
struct | ui::detail::Access |
|
struct | ui::detail::EditAccess |
Weak UI-affine navigation handle owned by an existing scene/model scope. Removing a view does not remove its context. Closing the scene cancels pending resolution and retires all callbacks. Handles retain no model, snapshot, widget, source or runtime. Copied immutable channel snapshots and bookmarks remain ordinary independent values.
◆ applyReply()
- Parameters
-
| reply | Qualified provider receipt; stale results cannot replace newer navigation. |
- Returns
- True when admitted, false when stale, or malformed/access/allocation failure.
◆ beginResolve()
- Parameters
-
| revision | Exact target provider revision in this context's delivery session. |
- Returns
- Qualified metadata-only request, WOULD_BLOCK without current, or checked failure. The caller uses its existing worker path; this method neither dispatches nor blocks.
◆ bookmark()
- Returns
- Latest revision-qualified current metadata, or checked access failure.
◆ clearCurrent()
| std::expected< void, TreeError > portals::ManagedNavigation::clearCurrent |
( |
| ) |
const |
- Returns
- Success or checked access failure; cancels any older resolution request.
◆ clearReadingAnchor()
| std::expected< void, TreeError > portals::ManagedNavigation::clearReadingAnchor |
( |
| ) |
const |
- Returns
- Success or checked access failure; leaves current and selection unchanged.
◆ current()
- Returns
- Read-only current channel, WRONG_THREAD, or CLOSED.
◆ model()
- Template Parameters
-
| T | Immutable common domain row type. |
- Parameters
-
| model | Destination model. |
| options | Same policy as setModel. |
- Returns
- True on admission; false reports the original error once through the scene.
◆ navigate()
| std::expected< void, TreeError > portals::ManagedNavigation::navigate |
( |
RowId | id | ) |
const |
- Parameters
-
| id | Stable row in the original finite model, resolved through its bounded index. |
- Returns
- Success, WOULD_BLOCK for unavailable identity/data, or checked access/provider failure.
◆ readingAnchor()
- Returns
- Explicit logical reading-anchor channel, independent of current and pixels.
◆ readingBookmark()
| std::expected< std::optional< ModelBookmark >, TreeError > portals::ManagedNavigation::readingBookmark |
( |
| ) |
const |
- Returns
- Latest revision-qualified reading metadata, or checked access failure.
◆ selection()
- Returns
- Read-only selected-set channel, independent of current and keyboard focus.
◆ setChangeMap()
- Parameters
-
| changes | Complete bounded proof for a future finite-model reconciliation. |
- Returns
- Success or checked access failure. Missing proof never permits ordinal guessing.
◆ setCurrent()
- Parameters
-
| bookmark | Owning compatible source metadata, without retaining a provider. |
- Returns
- Success or validation/access failure; same logical current emits no notification.
◆ setModel()
- Template Parameters
-
| T | Immutable row type shared by the context and all participating views. |
- Parameters
-
| model | Same-scene destination; provider work is bounded and never performs UI I/O. |
| options | Remember/reset and bounded history policy. |
- Returns
- Atomic group admission, or a checked error preserving the installed group.
◆ setReadingAnchor()
- Parameters
-
| bookmark | Owning logical reading anchor, never a viewport offset. |
- Returns
- Success or validation/access failure; current and selection are unchanged.
◆ setSelection()
| std::expected< void, TreeError > portals::ManagedNavigation::setSelection |
( |
std::span< const RowId > | rows | ) |
const |
- Parameters
-
| rows | Selected IDs in this context's source domain; copied and canonicalized. |
- Returns
- Success, NODE_LIMIT for the configured limit, or validation/access/allocation failure.
◆ stopToken()
| std::expected< std::stop_token, TreeError > portals::ManagedNavigation::stopToken |
( |
| ) |
const |
- Returns
- Cooperative token for the currently admitted request, or checked access failure.
The documentation for this class was generated from the following files: