|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable. Application/tree/router/scheduler must outlive this owner. Destroy outside callbacks and tree frames; self/ancestor node removal in callbacks is supported. Standard controls retain their existing binding and LineEdit semantics. Use run() to preserve detailed managed failures alongside runner and restoration errors. No raw owning Property or individual binding token escapes this owner. More...
#include <managed.hpp>
Public Member Functions | |
| ~ManagedScene () | |
| Retire bindings and the owned subtree on UI; wrong-thread/frame destruction terminates. | |
| ManagedScene (const ManagedScene &)=delete | |
| ManagedScene & | operator= (const ManagedScene &)=delete |
| Node< Widget > | root () const noexcept |
| WidthPolicy | widthPolicy () const noexcept |
| std::expected< ManagedSource< GraphemeText >, ManagedError > | liveText (const ui::TextSource &source, PropertyOptions options={}, std::source_location origin=std::source_location::current()) |
| Attach a readonly node-scoped source to a published caption, draft or accepted editor value. | |
| std::expected< void, ManagedError > | remove (Node< Widget > node) |
| Retire one managed subtree and immediately reclaim its managed entry budget. | |
| template<class T, class... Args> requires std::derived_from<T, Widget> | |
| std::expected< Node< T >, ManagedError > | emplace (Node< Widget > parent, Args &&...args) |
| Checked mount with automatic standard presentation and style registration. Failure retires only the attempted child; earlier children remain owned. Destroying the scene on a failed form construction cleans the entire partial form. | |
| std::expected< Node< LogView >, ManagedError > | logView (Node< Widget > parent, std::string_view initial={}, LogViewConfig config={}, ControlStyle style={}, SizePolicy policy=DEFAULT_LOG_VIEW_POLICY, std::optional< FrameOptions > frame={}) |
| std::expected< LogAppendReceipt, ManagedError > | appendLogBatch (Node< LogView > node, std::string_view bytes) |
| std::expected< void, ManagedError > | setLogModel (Node< LogView > node, ui::LogSource source) |
| std::expected< void, ManagedError > | followLogTail (Node< LogView > node) |
| std::expected< void, ManagedError > | clearLog (Node< LogView > node) |
| std::expected< LogStatus, ManagedError > | logStatus (Node< LogView > node) |
| std::expected< Node< ScrollBar >, ManagedError > | scrollBar (Node< Widget > parent, std::shared_ptr< ScrollController > controller={}, ScrollAxis axis=ScrollAxis::VERTICAL, ScrollBarOptions options={}, ControlStyle style={}, bool geometryWriter=true) |
| std::expected< void, ManagedError > | setScrollOffset (Node< Widget > node, ScrollAxis axis, ScrollOffset offset) |
| std::expected< void, ManagedError > | setScrollMetrics (Node< ScrollBar > node, ScrollAxisMetrics metrics) |
| std::expected< void, ManagedError > | ensureVisible (Node< Widget > node, Node< Widget > root={}) |
| template<std::equality_comparable T> | |
| std::expected< ManagedState< T >, ManagedError > | state (T initial, Invalidation kind=Invalidation::PAINT, PropertyOptions options={}) |
| Create UI-owned state with guaranteed dirty-frame recovery of missed notifications. | |
| std::expected< NumericState, ManagedError > | numericState (double initial=0, NumericRange range={}) |
| template<class W, std::equality_comparable T, class Callback> requires std::copy_constructible<std::decay_t<Callback>> && (std::same_as<std::invoke_result_t<Callback &, const T &>, void> || std::same_as<std::invoke_result_t<Callback &, const T &>, std::expected<void, TreeError>>) | |
| std::expected< void, ManagedError > | observe (Node< W > receiver, ManagedState< T > model, Callback &&callback) |
| Own a one-way presentation observer until its receiver or scene retires. Initial delivery reads the latest value at dirty preparation after complete declarative mount. Later queued revisions may coalesce. Callbacks borrow an immutable value only for their invocation; captures must not destroy this scene. Equal updates do not deliver again. Registration never invokes user code. | |
| template<std::equality_comparable T, class Callback> requires std::copy_constructible<std::decay_t<Callback>> && (std::same_as<std::invoke_result_t<Callback &, const T &>, void> || std::same_as<std::invoke_result_t<Callback &, const T &>, std::expected<void, TreeError>>) | |
| std::expected< void, ManagedError > | observe (ManagedState< T > model, Callback &&callback) |
| template<class W, std::equality_comparable T, class Callback> requires std::copy_constructible<std::decay_t<Callback>> && (std::same_as<std::invoke_result_t<Callback &, const T &>, void> || std::same_as<std::invoke_result_t<Callback &, const T &>, std::expected<void, TreeError>>) | |
| std::expected< void, ManagedError > | observe (Node< W > receiver, ManagedSource< T > source, Callback &&callback) |
| template<std::equality_comparable T, class Callback> requires std::copy_constructible<std::decay_t<Callback>> && (std::same_as<std::invoke_result_t<Callback &, const T &>, void> || std::same_as<std::invoke_result_t<Callback &, const T &>, std::expected<void, TreeError>>) | |
| std::expected< void, ManagedError > | observe (ManagedSource< T > source, Callback &&callback) |
| template<std::equality_comparable In, class Transform> requires detail::ManagedDerivation<Transform, In> | |
| std::expected< ManagedSource< detail::DerivedOutput< Transform, In > >, ManagedError > | derive (ManagedState< In > input, Transform &&transform, Invalidation kind=Invalidation::PAINT, PropertyOptions options={}, std::source_location origin=std::source_location::current()) |
| Create an owning read-only computation using the existing observer runtime. | |
| template<std::equality_comparable In, class Transform> requires detail::ManagedDerivation<Transform, In> | |
| std::expected< ManagedSource< detail::DerivedOutput< Transform, In > >, ManagedError > | derive (ManagedSource< In > input, Transform &&transform, Invalidation kind=Invalidation::PAINT, PropertyOptions options={}, std::source_location origin=std::source_location::current()) |
| std::expected< void, ManagedError > | onClick (Node< Button > node, std::function< std::expected< void, TreeError >()> action) |
| template<class Callback> requires detail::ManagedAction<Callback, ClickEvent> | |
| std::expected< void, ManagedError > | onClick (Node< Button > node, Callback action) |
| template<class Callback> requires detail::ManagedAction<Callback, KeyEvent> | |
| std::expected< void, ManagedError > | onKey (KeyEvent chord, Callback action) |
| template<class Callback> requires detail::ManagedAction<Callback, KeyEvent> | |
| std::expected< KeyBinding, ManagedError > | onKey (const KeySelection &selection, KeyInfo info, Callback action, std::source_location origin=std::source_location::current()) |
| std::expected< KeyBindingsSnapshot, ManagedError > | keyBindings () |
| std::expected< void, ManagedError > | setKeyCapabilities (KeyCapabilities capabilities) |
| template<class Value, class Callback> requires std::same_as<std::remove_cvref_t<Value>, Shortcut> && detail::ManagedAction<Callback, KeyEvent> | |
| std::expected< void, ManagedError > | onKey (Value &&shortcut, Callback action, ShortcutBehavior behavior={}, ShortcutOptions options={}, std::source_location origin=std::source_location::current()) |
| template<class Callback> requires detail::ManagedAction<Callback, KeyEvent> | |
| std::expected< void, ManagedError > | onKey (const KeySelection &selection, Callback action, std::source_location origin=std::source_location::current()) |
| std::expected< bool, ManagedError > | checkedValue (Node< CheckBox > node) |
| std::expected< PropertyUpdate< bool >, ManagedError > | setChecked (Node< CheckBox > node, bool value) |
| std::expected< void, ManagedError > | bind (Node< CheckBox > node, ManagedState< bool > model, std::function< std::expected< void, TreeError >(CheckBoxResult)> changed={}) |
| std::expected< ManagedState< RadioGroupValue >, ManagedError > | radioState (std::span< const TextValue > captions, KeyTextResolver resolver={}, CollectionLimits limits={}) |
| std::expected< ManagedState< RadioGroupValue >, ManagedError > | radioState (std::span< const RadioOption > options, KeyTextResolver resolver={}, CollectionLimits limits={}) |
| std::expected< ManagedState< RadioGroupValue >, ManagedError > | radioState (std::initializer_list< std::string_view > captions) |
| std::expected< void, ManagedError > | bind (Node< RadioGroup > node, ManagedState< RadioGroupValue > model, std::function< std::expected< void, TreeError >(RadioGroupResult)> changed={}) |
| std::expected< RadioGroupValue, ManagedError > | radioValue (Node< RadioGroup > node) |
| std::expected< PropertyUpdate< RadioGroupValue >, ManagedError > | selectRadio (Node< RadioGroup > node, std::optional< RowId > id) |
| template<class Callback, class T> requires (std::derived_from<T, RadioGroup> && std::copy_constructible<Callback> && detail::ChangeAction<Callback, RadioGroupValue>) | |
| std::expected< void, ManagedError > | onChange (Node< T > node, Callback callback, std::source_location origin=std::source_location::current()) |
| std::expected< void, ManagedError > | bind (Node< CheckBox > node, ManagedState< CheckState > model, std::function< std::expected< void, TreeError >(CheckStateResult)> changed={}, CheckBoxOptions options={}) |
| template<class Callback, class T> requires (std::derived_from<T, CheckBox> && std::copy_constructible<Callback> && (detail::ChangeAction<Callback, bool> || detail::ChangeAction<Callback, CheckState>)) | |
| std::expected< void, ManagedError > | onChange (Node< T > node, Callback callback, std::source_location origin=std::source_location::current()) |
| std::expected< void, ManagedError > | bind (Node< Slider > node, NumericState model, std::function< std::expected< void, TreeError >(SliderResult)> changed={}) |
| std::expected< void, ManagedError > | bind (Node< SpinBox > node, NumericState model, LineEditOptions options={}, std::uint64_t pageSteps=10) |
| template<class Callback, class T> requires ((std::derived_from<T, Slider> || std::same_as<T, SpinBox>) && std::copy_constructible<std::decay_t<Callback>> && (detail::ChangeValueAction<std::decay_t<Callback>, double> || requires(std::decay_t<Callback> &action, const PropertyUpdate<NumericValue> &receipt) { { action(receipt) } -> detail::ManagedActionResult; })) | |
| std::expected< void, ManagedError > | onChange (Node< T > node, const Callback &callback, std::source_location origin=std::source_location::current()) |
| template<class Callback, class T> requires (std::derived_from<T, Slider> && std::copy_constructible<std::decay_t<Callback>> && detail::ManagedAction<std::decay_t <Callback>, SliderOperationEvent>) | |
| std::expected< void, ManagedError > | onEditingFinished (Node< T > node, const Callback &callback, std::source_location origin=std::source_location::current()) |
| std::expected< void, ManagedError > | bind (Node< LineEdit > node, ManagedState< std::string > model, std::function< std::expected< void, TreeError >(LineEditResult)> result={}, std::shared_ptr< Clipboard > clipboard={}, std::function< bool(std::string_view)> validate={}) |
| std::expected< void, ManagedError > | bind (Node< Password > node, ManagedState< PasswordValue > model, std::function< std::expected< void, TreeError >(PasswordResult)> result={}, std::shared_ptr< Clipboard > clipboard={}, std::function< bool(SecretView)> validate={}) |
| std::expected< PasswordValue, ManagedError > | passwordValue (Node< Password > node) const |
| std::expected< void, ManagedError > | setPasswordValue (Node< Password > node, PasswordValue value) |
| template<class Callback> requires detail::ManagedAction<Callback, TextEditedEvent> | |
| std::expected< void, ManagedError > | onTextEdited (Node< LineEdit > node, Callback callback, std::source_location origin=std::source_location::current()) |
| template<class Callback, class T> requires (std::derived_from<T, LineEdit> && detail::ManagedAction<Callback, EditingFinishedEvent>) | |
| std::expected< void, ManagedError > | onEditingFinished (Node< T > node, Callback callback, std::source_location origin=std::source_location::current()) |
| std::expected< void, ManagedError > | bindText (Node< Control > node, ManagedState< std::string > model) |
| Observe accepted text as a one-way caption, independently of the control's action. | |
| std::expected< void, ManagedError > | bindText (Node< Control > node, ManagedSource< std::string > source) |
| std::expected< void, ManagedError > | focusScope (Node< Widget > node) |
| Declare a nested focus scope; this scene owns its disconnect token. | |
| std::expected< void, ManagedError > | overlayHost (Node< OverlayHost > host, Node< Widget > body) |
| Bind the scene's sole retained host to its exact ordinary body. | |
| std::expected< void, ManagedError > | dialog (Node< Dialog > node, Node< Widget > panel, Node< Widget > body) |
| Register an initially hidden layer under the declared host. | |
| std::expected< void, ManagedError > | openDialog (Node< Widget > node) |
| Open a ready registered layer; an already open layer is unchanged. | |
| std::expected< void, ManagedError > | dismissDialog (Node< Widget > node) |
| Dismiss a layer; a closed layer is unchanged and callbacks never replay. | |
| std::expected< bool, ManagedError > | dialogOpened (Node< Widget > node) |
| std::expected< void, ManagedError > | dialogAnchor (Node< Widget > node, Node< Widget > anchor, DialogPlacement placement) |
| Set the body-only anchor before the first activation. | |
| template<class Callback> requires std::copy_constructible<Callback> && (std::same_as<std::invoke_result_t<Callback &, DialogDismissReason>, void> || std::same_as<std::invoke_result_t<Callback &, DialogDismissReason>, std::expected<void, TreeError>>) | |
| std::expected< void, ManagedError > | onDismiss (Node< Dialog > node, Callback callback) |
| std::expected< void, ManagedError > | focusDefault (Node< Widget > node) |
| Set a live managed node as its nearest scope's default. | |
| std::expected< void, ManagedError > | focus (Node< Widget > node) |
| Enter a scope or focus an ordinary registered control through the same blur path. | |
| std::expected< void, ManagedError > | enterFocusScope (Node< Widget > node) |
| Enter a declared scope while saving exact previous focus in the existing router. This focus-only operation does not restrict input or global Tab traversal. | |
| std::expected< void, ManagedError > | leaveFocusScope (Node< Widget > node) |
| Leave the top focus-return scope; callback errors retain the published return. | |
| template<class T> | |
| std::expected< void, ManagedError > | onEvent (Node< T > node, std::type_identity_t< ManagedEventHandler< T > > callback) |
| Own one custom event callback, without subclassing or an additional router. | |
| template<class T> | |
| std::expected< void, ManagedError > | onPrepare (Node< T > node, std::type_identity_t< ManagedPrepareHandler< T > > callback) |
| Register custom presentation work at the existing dirty-frame boundary. | |
| std::expected< void, ManagedError > | style (Node< Widget > node, StyleTarget target) |
| std::expected< void, ManagedError > | id (Node< Widget > node, std::string_view value) |
| std::expected< void, ManagedError > | classes (Node< Widget > node, std::vector< std::string > values) |
| std::expected< void, ManagedError > | theme (StyleSheet sheet) |
| std::expected< void, ManagedError > | enableStyleLayers (StyleLayerOptions options={}) |
| Opt into owning style tiers; failure preserves pending registrations and legacy controllers. | |
| std::expected< StyleLayerHandle, ManagedError > | styleDocument (StyleTier tier, std::string_view name, const PssDocument &document, std::optional< StyleLayerOptions > options=std::nullopt) |
| Atomically install owning declarations and provenance in an APPLICATION or USER layer. | |
| std::expected< std::vector< StyleLayerSource >, ManagedError > | styleSources () const |
| Copy every actual layer row in installation order on the UI thread. | |
| std::expected< void, ManagedError > | validateStyleLayer (StyleLayerHandle handle) const |
| Validate an observing layer identity without resolving styles or invoking callbacks. | |
| std::expected< StyleLayerHandle, ManagedError > | addLayer (StyleTier tier, std::string_view name, const StyleSheet &sheet) |
| std::expected< Invalidation, ManagedError > | replaceLayer (StyleLayerHandle handle, const StyleSheet &sheet) |
| std::expected< Invalidation, ManagedError > | removeLayer (StyleLayerHandle handle) |
| std::expected< Invalidation, ManagedError > | updateLayers (std::span< const StyleLayerUpdate > updates) |
| std::expected< StyleLayerHandle, ManagedError > | baseLayer (StyleTier tier) const |
| std::expected< Invalidation, ManagedError > | styleDefaults (const StyleSheet &sheet) |
| std::expected< void, ManagedError > | onInput (std::function< std::expected< bool, ManagedError >(const InputEvent &)> callback) |
| std::expected< void, TreeError > | reportError (ManagedError failure, std::span< const ManagedDiagnosticContext > contexts={}, std::source_location origin=std::source_location::current()) noexcept |
| Record an explicit error without changing runtime stop/recovery policy. | |
| std::expected< void, ManagedError > | onError (ManagedErrorHandler callback) |
| Retain or clear the UI error observer; empty clears it. | |
| std::expected< ManagedDiagnosticBatch, TreeError > | diagnostics () const |
| Copy the bounded error history on UI, including after close. | |
| std::expected< void, TreeError > | clearErrors () noexcept |
| Clear history and counters while preserving capacity and runtime first failure. | |
| std::expected< ManagedDiagnosticBatch, TreeError > | drainErrors () |
| Copy then clear history and counters; allocation failure leaves them unchanged. | |
| template<class T> | |
| std::expected< ManagedModel< T >, ManagedError > | model (std::shared_ptr< const ModelSnapshot< T > > initial, ModelOptions options={}, ManagedViewHandler< T > prepared={}) |
| Create a scene-owned model and a weak typed UI handle. | |
| template<class Source> requires detail::ManagedCollectionSource<Source> | |
| std::expected< ManagedModel< typename detail::CollectionSource< std::remove_cvref_t< Source > >::Row >, ManagedError > | model (Source &&source, CollectionModelOptions options={}) |
| Bind owning immutable rows to a fresh sink-only model using the existing UI transaction. | |
| std::expected< ManagedNavigation, ManagedError > | navigation (ModelResource resource, SourceStamp session, NavigationOptions options={}) |
| std::expected< LogNavigation, ManagedError > | logNavigation (LogCheckpointOptions options={}) |
| template<class T> | |
| std::expected< ManagedNavigation, ManagedError > | navigation (ManagedModel< T > model, NavigationOptions options={}) |
| template<class T> | |
| std::expected< ManagedNavigation, ManagedError > | navigation (ManagedModel< T > model, ModelResource resource, SourceStamp session, NavigationOptions options={}) |
| template<class T> | |
| std::expected< void, ManagedError > | bindNavigation (Node< VirtualList< T > > node, ManagedNavigation navigation, NavigationBindingOptions options={}) |
| template<class T> | |
| std::expected< void, ManagedError > | bindNavigation (Node< VirtualTable< T > > node, ManagedNavigation navigation, NavigationBindingOptions options={}) |
| template<class T> | |
| std::expected< Node< VirtualTable< T > >, ManagedError > | virtualTable (Node< Widget > parent, ManagedModel< T > model, std::type_identity_t< std::span< const TableColumn< T > > > columns, VirtualTableOptions options={}, SizePolicy policy=DEFAULT_VIEWPORT_POLICY, std::type_identity_t< ManagedViewHandler< T > > prepared={}) |
| Mount a table with owned range, input binding, style and automatic preparation. | |
| template<class T> | |
| std::expected< Node< VirtualList< T > >, ManagedError > | virtualList (Node< Widget > parent, ManagedModel< T > model, std::type_identity_t< ManagedListFormatter< T > > delegate, VirtualListOptions options={}, SizePolicy policy=DEFAULT_VIEWPORT_POLICY, std::type_identity_t< ManagedViewHandler< T > > prepared={}) |
| Mount a list with owned range, input binding, style and automatic preparation. | |
| template<class T> | |
| std::expected< void, ManagedError > | setModel (Node< VirtualList< T > > node, ManagedModel< T > model, std::type_identity_t< std::optional< ManagedViewHandler< T > > > prepared=std::nullopt, ModelRebindOptions options={}) |
| Atomically replace a managed list's model without replacing its node or presentation. | |
| template<class T> | |
| std::expected< void, ManagedError > | setModel (Node< VirtualTable< T > > node, ManagedModel< T > model, std::type_identity_t< std::optional< ManagedViewHandler< T > > > prepared=std::nullopt, ModelRebindOptions options={}) |
| Atomically replace a managed table's model, preserving columns, options and node identity. | |
| template<class T> | |
| std::expected< std::optional< PositionResolution >, ManagedError > | restoreStatus (Node< VirtualList< T > > node) const |
| template<class T> | |
| std::expected< std::optional< PositionResolution >, ManagedError > | restoreStatus (Node< VirtualTable< T > > node) const |
| template<class T> | |
| std::expected< Node< Chart< T > >, ManagedError > | chart (Node< Widget > parent, ManagedModel< T > model, std::type_identity_t< ManagedChartAccessor< T > > accessor, ChartOptions options={}, ManagedChartOrigin first={}, std::type_identity_t< ManagedViewHandler< T > > prepared={}, SizePolicy policy=DEFAULT_VIEWPORT_POLICY) |
| Mount a chart with owned range, style and automatic preparation. | |
| std::expected< Node< Spinner >, ManagedError > | spinner (Node< Widget > parent, SpinnerOptions options={}, ControlStyle style={}, SizePolicy policy=DEFAULT_CONTENT_POLICY, SpinnerLabelResolver resolver={}) |
| bool | usesPreparedLayout () const noexcept override |
| Opt into bounded layout-driven view preparation; default is false. | |
| bool | usesGeometrySnapshot () const noexcept override |
| bool | requiresPointerMotion () const noexcept override |
| std::expected< NodeGeometry, ManagedError > | geometry (Node< Widget > node) const |
| Read an owning final arranged value without performing layout or reporting errors. | |
| template<class T> | |
| std::expected< VisibleModelSnapshot< T >, VisibleModelError > | visibleModelSnapshot (Node< VirtualTable< T > > node) const |
| Read ready physical rows after successful final layout publication. | |
| template<class Callback> requires detail::ManagedAction<Callback, NodeGeometry> | |
| std::expected< void, ManagedError > | onLayout (Node< Widget > node, Callback callback, std::source_location origin=std::source_location::current()) |
| std::expected< void, TreeError > | completedLayout (Application &app) override |
| std::expected< void, TreeError > | afterDispatch (Application &app) override |
| bool | hasPendingLayout () const noexcept override |
| std::expected< void, TreeError > | prepareViews (Application &app, const LayoutSnapshot &snapshot) override |
| Prepare registered views from the pins captured by prepare(), in registration order. | |
| bool | requiresBackgroundExecutor () const noexcept override |
| std::expected< ApplicationStats, ManagedError > | run (std::stop_token stop={}) |
| std::expected< ApplicationStats, ManagedError > | run (ApplicationTerminal &terminal, std::stop_token stop={}) |
| std::expected< void, ManagedError > | start (ApplicationReadyTerminal &terminal, std::stop_token stop={}) |
| std::expected< ApplicationStep, ManagedError > | step () |
| std::expected< void, ManagedError > | close () |
| Idempotently retire callbacks and subtree; properties survive until scene destruction. A facade-installed shutdown action runs once before root/model retirement. Its failure does not skip subtree cleanup; an independent tree cleanup failure is retained in the shutdown error's cleanup field. | |
| std::expected< void, TreeError > | prepare (Application &app, CellSize size) override |
| std::expected< bool, TreeError > | input (Application &app, const InputEvent &event) override |
| void | stop (Application &app) override |
| Public Member Functions inherited from portals::ApplicationScene | |
| virtual | ~ApplicationScene ()=default |
Static Public Member Functions | |
| static std::expected< std::unique_ptr< ManagedScene >, ManagedError > | create (Application &app, ManagedOptions options={}) |
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable. Application/tree/router/scheduler must outlive this owner. Destroy outside callbacks and tree frames; self/ancestor node removal in callbacks is supported. Standard controls retain their existing binding and LineEdit semantics. Use run() to preserve detailed managed failures alongside runner and restoration errors. No raw owning Property or individual binding token escapes this owner.
| std::expected< StyleLayerHandle, ManagedError > portals::ManagedScene::addLayer | ( | StyleTier | tier, |
| std::string_view | name, | ||
| const StyleSheet & | sheet ) |
| tier | APPLICATION or USER priority. |
| name | Nonempty tier-unique name, copied after budget admission. |
| sheet | Borrowed declarations, normalized into engine ownership on success. |
|
overridevirtual |
| app | Same borrowed application used at creation. |
Reimplemented from portals::ApplicationScene.
| std::expected< LogAppendReceipt, ManagedError > portals::ManagedScene::appendLogBatch | ( | Node< LogView > | node, |
| std::string_view | bytes ) |
| node | Live log. |
| bytes | Complete borrowed batch. |
| std::expected< StyleLayerHandle, ManagedError > portals::ManagedScene::baseLayer | ( | StyleTier | tier | ) | const |
| tier | DEFAULTS or THEME slot. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< CheckBox > | node, |
| ManagedState< bool > | model, | ||
| std::function< std::expected< void, TreeError >(CheckBoxResult)> | changed = {} ) |
| node | Managed checkbox without a prior event binding. |
| model | State created by this scene; shared internally on UI only. |
| changed | Optional callback after the standard toggle, receiving its exact commit receipt. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< CheckBox > | node, |
| ManagedState< CheckState > | model, | ||
| std::function< std::expected< void, TreeError >(CheckStateResult)> | changed = {}, | ||
| CheckBoxOptions | options = {} ) |
| node | Managed checkbox without a prior event binding. |
| model | State created by this scene; shared internally on UI only. |
| changed | Optional callback after the standard toggle, receiving its exact commit receipt. |
| options | Typed activation cycle; invalid values return INVALID_ARGUMENT. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< LineEdit > | node, |
| ManagedState< std::string > | model, | ||
| std::function< std::expected< void, TreeError >(LineEditResult)> | result = {}, | ||
| std::shared_ptr< Clipboard > | clipboard = {}, | ||
| std::function< bool(std::string_view)> | validate = {} ) |
| node | Managed editor without a prior event binding. |
| model | State created by this scene. |
| result | Optional callback after standard editing/commit/conflict handling; cannot undo a commit. |
| clipboard | Existing clipboard adapter retained by the binding, or null. |
| validate | Existing commit validator; false rejects Enter without changing the model. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< Password > | node, |
| ManagedState< PasswordValue > | model, | ||
| std::function< std::expected< void, TreeError >(PasswordResult)> | result = {}, | ||
| std::shared_ptr< Clipboard > | clipboard = {}, | ||
| std::function< bool(SecretView)> | validate = {} ) |
| node | Managed protected editor without an existing action binding. |
| model | Protected state created by this scene; no plaintext snapshots are retained. |
| result | Optional owning result handler after native editing semantics. |
| clipboard | Optional service used only by an explicitly enabled paste policy. |
| validate | Scoped plaintext predicate; false retains the protected draft. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< RadioGroup > | node, |
| ManagedState< RadioGroupValue > | model, | ||
| std::function< std::expected< void, TreeError >(RadioGroupResult)> | changed = {} ) |
| node | Managed group without a prior binding. |
| model | Authoritative state from this scene. |
| changed | Optional exact user-operation receipt callback. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< Slider > | node, |
| NumericState | model, | ||
| std::function< std::expected< void, TreeError >(SliderResult)> | changed = {} ) |
| node | Managed slider without a prior event binding. |
| model | Numeric source created by this scene; the existing Property remains authoritative. |
| changed | Optional legacy exact receipt callback, before compact user-change handlers. |
| std::expected< void, ManagedError > portals::ManagedScene::bind | ( | Node< SpinBox > | node, |
| NumericState | model, | ||
| LineEditOptions | options = {}, | ||
| std::uint64_t | pageSteps = 10 ) |
| node | Empty numeric row. |
| model | Scene-owned authoritative numeric source. |
| options | Existing editor policy; no independent editing state is introduced. |
| pageSteps | Positive increments per page action. |
| std::expected< void, ManagedError > portals::ManagedScene::bindNavigation | ( | Node< VirtualList< T > > | node, |
| ManagedNavigation | navigation, | ||
| NavigationBindingOptions | options = {} ) |
| T | Immutable row type shared with the bound list. |
| node | Existing managed list in this scene. |
| navigation | Scope-owned navigation context. |
| options | Explicit projection and independent current/reading synchronization policy. |
| std::expected< void, ManagedError > portals::ManagedScene::bindNavigation | ( | Node< VirtualTable< T > > | node, |
| ManagedNavigation | navigation, | ||
| NavigationBindingOptions | options = {} ) |
| T | Immutable row type shared with the bound table. |
| node | Existing managed table in this scene. |
| navigation | Scope-owned navigation context. |
| options | Explicit projection and independent current/reading synchronization policy. |
|
inline |
| node | Live managed caption receiver. |
| source | Read-only owning string source from this scene. |
| std::expected< void, ManagedError > portals::ManagedScene::bindText | ( | Node< Control > | node, |
| ManagedState< std::string > | model ) |
Observe accepted text as a one-way caption, independently of the control's action.
| node | Live managed control without an existing caption binding. |
| model | Text state created by this scene; ownership stays with the scene. |
| std::expected< Node< Chart< T > >, ManagedError > portals::ManagedScene::chart | ( | Node< Widget > | parent, |
| ManagedModel< T > | model, | ||
| std::type_identity_t< ManagedChartAccessor< T > > | accessor, | ||
| ChartOptions | options = {}, | ||
| ManagedChartOrigin | first = {}, | ||
| std::type_identity_t< ManagedViewHandler< T > > | prepared = {}, | ||
| SizePolicy | policy = DEFAULT_VIEWPORT_POLICY ) |
Mount a chart with owned range, style and automatic preparation.
| T | Immutable row projected into an optional OHLC value. |
| parent | Managed parent; failure removes only the attempted child. |
| model | Model belonging to this scene. |
| accessor | Owning OHLC projection; nullopt introduces a gap. |
| options | Existing chart mode, width and glyph configuration. |
| first | Optional source of the first row; empty means zero. Runs in registration order. |
| prepared | Optional view override after preparation; empty uses model-owned preparation. Pending work without either callback is rejected with INVALID_ARGUMENT. |
| policy | Owning viewport constraints; explicit policies remain authoritative. |
| std::expected< bool, ManagedError > portals::ManagedScene::checkedValue | ( | Node< CheckBox > | node | ) |
| node | Managed bool-bound checkbox or subtype. |
| std::expected< void, ManagedError > portals::ManagedScene::classes | ( | Node< Widget > | node, |
| std::vector< std::string > | values ) |
| node | Live scene-owned node whose style classes are changed. |
| values | Owning ordered class names; duplicates are preserved and empty clears classes. |
|
noexcept |
Clear history and counters while preserving capacity and runtime first failure.
| std::expected< void, ManagedError > portals::ManagedScene::clearLog | ( | Node< LogView > | node | ) |
| node | Live log. |
| std::expected< void, ManagedError > portals::ManagedScene::close | ( | ) |
Idempotently retire callbacks and subtree; properties survive until scene destruction. A facade-installed shutdown action runs once before root/model retirement. Its failure does not skip subtree cleanup; an independent tree cleanup failure is retained in the shutdown error's cleanup field.
|
overridevirtual |
| app | Same borrowed application used at creation. |
Reimplemented from portals::ApplicationScene.
|
static |
| app | Borrowed existing runtime, used exclusively by this scene during run. |
| options | Positive limits on managed entries and state ownership. |
|
inline |
| In | Owning equality-comparable input value. |
| Transform | Copyable pure owning computation with the writable input overload's contract. |
| input | Previously created read-only source; fresh outputs make declared dependency cycles unexpressible. |
| transform | Owned synchronous computation. |
| kind | Output invalidation, PAINT or LAYOUT. |
| options | Positive output Property observer capacity. |
| origin | Derivation registration retained in diagnostics. |
| std::expected< ManagedSource< detail::DerivedOutput< Transform, In > >, ManagedError > portals::ManagedScene::derive | ( | ManagedState< In > | input, |
| Transform && | transform, | ||
| Invalidation | kind = Invalidation::PAINT, | ||
| PropertyOptions | options = {}, | ||
| std::source_location | origin = std::source_location::current() ) |
Create an owning read-only computation using the existing observer runtime.
| In | Owning equality-comparable input value. |
| Transform | Copyable pure function returning an owning Out or expected<Out, TreeError>. |
| input | Existing source owned by this scene; its immutable value is borrowed during computation. |
| transform | Owned synchronous computation; must not mutate UI or depend on Ref publication. |
| kind | PAINT or LAYOUT invalidation for changed output; NONE is rejected. |
| options | Positive existing output Property observer capacity. |
| origin | Derivation registration retained in failure diagnostics. |
| std::expected< ManagedDiagnosticBatch, TreeError > portals::ManagedScene::diagnostics | ( | ) | const |
Copy the bounded error history on UI, including after close.
| std::expected< void, ManagedError > portals::ManagedScene::dialog | ( | Node< Dialog > | node, |
| Node< Widget > | panel, | ||
| Node< Widget > | body ) |
Register an initially hidden layer under the declared host.
| node | Exact full-host dialog root. |
| panel | Its sole opaque panel child. |
| body | Application content inside the panel. |
| std::expected< void, ManagedError > portals::ManagedScene::dialogAnchor | ( | Node< Widget > | node, |
| Node< Widget > | anchor, | ||
| DialogPlacement | placement ) |
Set the body-only anchor before the first activation.
| node | Registered dialog root. |
| anchor | Ordinary body descendant of the same host. |
| placement | BELOW_START or ABOVE_START; CENTER ignores the anchor. |
| std::expected< bool, ManagedError > portals::ManagedScene::dialogOpened | ( | Node< Widget > | node | ) |
| node | Exact registered dialog root. |
| std::expected< void, ManagedError > portals::ManagedScene::dismissDialog | ( | Node< Widget > | node | ) |
Dismiss a layer; a closed layer is unchanged and callbacks never replay.
| node | Exact dialog root; only the top modal can be dismissed. |
| std::expected< ManagedDiagnosticBatch, TreeError > portals::ManagedScene::drainErrors | ( | ) |
Copy then clear history and counters; allocation failure leaves them unchanged.
|
inline |
Checked mount with automatic standard presentation and style registration. Failure retires only the attempted child; earlier children remain owned. Destroying the scene on a failed form construction cleans the entire partial form.
| T | Public Widget subtype constructible from Args; final classes are supported. |
| Args | Perfect-forwarded constructor argument types. |
| parent | Root or node created by this scene; low-level external children are not adopted. |
| args | Constructor arguments, borrowed only during construction. |
| std::expected< void, ManagedError > portals::ManagedScene::enableStyleLayers | ( | StyleLayerOptions | options = {} | ) |
Opt into owning style tiers; failure preserves pending registrations and legacy controllers.
| options | Aggregate owning layer limits, fixed after successful opt-in. |
| std::expected< void, ManagedError > portals::ManagedScene::ensureVisible | ( | Node< Widget > | node, |
| Node< Widget > | root = {} ) |
| node | Live managed descendant to reveal once. |
| root | Optional managed ancestor limiting the request; empty uses this scene root. |
| std::expected< void, ManagedError > portals::ManagedScene::enterFocusScope | ( | Node< Widget > | node | ) |
Enter a declared scope while saving exact previous focus in the existing router. This focus-only operation does not restrict input or global Tab traversal.
| node | Live eligible managed scope root, absent from the return stack. |
| std::expected< void, ManagedError > portals::ManagedScene::focus | ( | Node< Widget > | node | ) |
Enter a scope or focus an ordinary registered control through the same blur path.
| node | Live managed target; scope selection uses last/default/preorder fallback. |
| std::expected< void, ManagedError > portals::ManagedScene::focusDefault | ( | Node< Widget > | node | ) |
Set a live managed node as its nearest scope's default.
| node | Default descendant; hidden/disabled defaults are skipped on entry. |
| std::expected< void, ManagedError > portals::ManagedScene::focusScope | ( | Node< Widget > | node | ) |
Declare a nested focus scope; this scene owns its disconnect token.
| node | Live managed scope root, possibly also an ordinary bound control. |
| std::expected< void, ManagedError > portals::ManagedScene::followLogTail | ( | Node< LogView > | node | ) |
| node | Live log. |
| std::expected< NodeGeometry, ManagedError > portals::ManagedScene::geometry | ( | Node< Widget > | node | ) | const |
Read an owning final arranged value without performing layout or reporting errors.
| node | Full identity of a managed widget in this scene. |
|
overridevirtualnoexcept |
Reimplemented from portals::ApplicationScene.
| std::expected< void, ManagedError > portals::ManagedScene::id | ( | Node< Widget > | node, |
| std::string_view | value ) |
| node | Live scene-owned node whose style identity is changed. |
| value | Case-sensitive id copied during this call; existing type/classes are preserved. |
|
overridevirtual |
| app | The same borrowed Application used at creation. |
| event | Owning input borrowed for this call only. |
Reimplemented from portals::ApplicationScene.
| std::expected< KeyBindingsSnapshot, ManagedError > portals::ManagedScene::keyBindings | ( | ) |
| std::expected< void, ManagedError > portals::ManagedScene::leaveFocusScope | ( | Node< Widget > | node | ) |
Leave the top focus-return scope; callback errors retain the published return.
| node | Live managed root matching the top stack record. |
| std::expected< ManagedSource< GraphemeText >, ManagedError > portals::ManagedScene::liveText | ( | const ui::TextSource & | source, |
| PropertyOptions | options = {}, | ||
| std::source_location | origin = std::source_location::current() ) |
Attach a readonly node-scoped source to a published caption, draft or accepted editor value.
| source | Weak text identity belonging to this scene; unpublished references return CLOSED. |
| options | Positive Property observer capacity; sharing requires identical admitted options. |
| origin | Registration site retained on capture failures. |
| std::expected< LogNavigation, ManagedError > portals::ManagedScene::logNavigation | ( | LogCheckpointOptions | options = {} | ) |
| options | Positive metadata bounds; no source-count limit or LRU eviction. |
| std::expected< LogStatus, ManagedError > portals::ManagedScene::logStatus | ( | Node< LogView > | node | ) |
| node | Live log. |
| std::expected< Node< LogView >, ManagedError > portals::ManagedScene::logView | ( | Node< Widget > | parent, |
| std::string_view | initial = {}, | ||
| LogViewConfig | config = {}, | ||
| ControlStyle | style = {}, | ||
| SizePolicy | policy = DEFAULT_LOG_VIEW_POLICY, | ||
| std::optional< FrameOptions > | frame = {} ) |
| parent | Live managed parent. |
| initial | Complete UTF-8 batch, copied before return. |
| config | Positive bounded storage and navigation settings. |
| style | Manual appearances. |
| policy | Existing layout constraints. |
| frame | Optional owning native frame customization. |
| std::expected< ManagedModel< typename detail::CollectionSource< std::remove_cvref_t< Source > >::Row >, ManagedError > portals::ManagedScene::model | ( | Source && | source, |
| CollectionModelOptions | options = {} ) |
Bind owning immutable rows to a fresh sink-only model using the existing UI transaction.
| Source | Exact ManagedSource<RowCollection<T>>, with copyable equality-comparable immutable T. |
| source | Read-only collection owned by this scene; explicit IDs survive updates and reordering. |
| options | Positive whole-collection and existing Model budgets. |
| std::expected< ManagedModel< T >, ManagedError > portals::ManagedScene::model | ( | std::shared_ptr< const ModelSnapshot< T > > | initial, |
| ModelOptions | options = {}, | ||
| ManagedViewHandler< T > | prepared = {} ) |
Create a scene-owned model and a weak typed UI handle.
| T | Immutable domain row satisfying Model<T>'s provider contract. |
| initial | Non-null immutable initial snapshot, retained by the model. |
| options | Positive existing model range, consumer and work limits. |
| prepared | Model-owned preparation callback used by views without an explicit override. |
| std::expected< ManagedNavigation, ManagedError > portals::ManagedScene::navigation | ( | ManagedModel< T > | model, |
| ModelResource | resource, | ||
| SourceStamp | session, | ||
| NavigationOptions | options = {} ) |
| T | Immutable finite model row type. |
| model | Original source model in this scene. |
| resource | Explicit provider domain for reopen/integration. |
| session | Existing provider delivery session. |
| options | Positive bounded metadata limits. |
| std::expected< ManagedNavigation, ManagedError > portals::ManagedScene::navigation | ( | ManagedModel< T > | model, |
| NavigationOptions | options = {} ) |
| T | Immutable finite model row type. |
| model | Original source model in this scene; projections bind explicitly later. |
| options | Positive bounded metadata limits. |
| std::expected< ManagedNavigation, ManagedError > portals::ManagedScene::navigation | ( | ModelResource | resource, |
| SourceStamp | session, | ||
| NavigationOptions | options = {} ) |
| resource | Explicit logical provider domain; independent of the mounted views. |
| session | Current provider delivery session. |
| options | Positive bounded metadata limits. |
| std::expected< NumericState, ManagedError > portals::ManagedScene::numericState | ( | double | initial = 0, |
| NumericRange | range = {} ) |
| initial | Explicit finite value, retained without user-step snapping. |
| range | Ordered finite bounds and positive representable user increment. |
|
inline |
| T | Owning derived value. |
| Callback | Copyable presentation callback with the receiving overload's result contract. |
| source | Read-only source owned by this scene. |
| callback | Action scoped to the scene root. |
|
inline |
| T | Owning equality-comparable state value. |
| Callback | Copyable callback with the receiving observe overload's result contract. |
| model | State created by this scene. |
| callback | Presentation action retained until scene retirement. |
|
inline |
| W | Receiving managed widget type. |
| T | Owning derived value. |
| Callback | Copyable presentation callback with the writable source overload's result contract. |
| receiver | Live node that scopes the observation. |
| source | Read-only source owned by this scene. |
| callback | Owned callback, first invoked after complete mount. |
|
inline |
Own a one-way presentation observer until its receiver or scene retires. Initial delivery reads the latest value at dirty preparation after complete declarative mount. Later queued revisions may coalesce. Callbacks borrow an immutable value only for their invocation; captures must not destroy this scene. Equal updates do not deliver again. Registration never invokes user code.
| W | Managed receiving widget type. |
| T | Owning equality-comparable state value. |
| Callback | Copyable callable taking const T&, returning void or expected<void, TreeError>. |
| receiver | Live managed identity, or this scene's root. |
| model | State created by this scene. |
| callback | Owned presentation action; node removal during invocation is allowed. |
|
inline |
| Callback | Copyable action taking the actual bool/CheckState value or const PropertyUpdate<T>&. |
| T | CheckBox view type, admitted before callback constraints are instantiated. |
| node | Live checkbox with its existing managed binding. |
| callback | FIFO notification of successful changed activation receipts, never a veto. |
| origin | Registration site used by checked callback diagnostics. |
|
inline |
| Callback | Copyable value/receipt action. |
| T | RadioGroup or a public derived control. |
| node | Bound group. |
| callback | FIFO post-commit user notification. |
| origin | Registration provenance. |
|
inline |
| Callback | Owning action taking double or the exact numeric Property receipt. |
| T | Slider view type, checked before instantiating callback constraints. |
| node | Live bound numeric slider. |
| callback | FIFO changed-user-commit observation. |
| origin | Registration site retained for diagnostics. |
|
inline |
| Callback | Owning void, expected<Value, TreeError> or EditorCommandResult action, optionally taking ClickEvent. |
| node | Live managed button without another action binding. |
| action | Owning checked editor command callback; return Ref.undo/redo directly to preserve provenance. |
| std::expected< void, ManagedError > portals::ManagedScene::onClick | ( | Node< Button > | node, |
| std::function< std::expected< void, TreeError >()> | action ) |
| node | Managed button without a prior event binding. |
| action | Typed business callback, run after standard activation admission; may remove its node. |
|
inline |
| Callback | Copyable callback taking DialogDismissReason, returning void or expected<void,TreeError>. |
| node | Registered layer receiving this owning callback. |
| callback | Admitted once after dismissal publication; self-removal is supported. |
|
inline |
| Callback | Owning managed action accepting EditingFinishedEvent or no arguments. |
| T | LineEdit view type, admitted before callback constraints are instantiated. |
| node | Editor whose existing binding supplies Enter and focus-loss boundaries. |
| callback | FIFO action; return checked failures through the existing diagnostics. |
| origin | Registration site retained for diagnostics. |
|
inline |
| Callback | Owning action taking the local operation event or no arguments. |
| T | Slider view type, checked before callback constraints. |
| node | Bound slider. |
| callback | Completion/interruption observation; teardown can suppress delivery. |
| origin | Registration site retained for diagnostics. |
| std::expected< void, ManagedError > portals::ManagedScene::onError | ( | ManagedErrorHandler | callback | ) |
Retain or clear the UI error observer; empty clears it.
| callback | Borrowing observer called after recording, including history overflow. It must not retain the diagnostic reference. Exceptions only increment diagnostic counters. |
|
inline |
Own one custom event callback, without subclassing or an additional router.
| T | Custom Widget type; callable signature is checked through std::function. |
| node | Managed node without another binding; standard bound controls reject replacement. |
| callback | Typed handler borrowing T and event for this invocation only. Errors stop run. |
| std::expected< void, ManagedError > portals::ManagedScene::onInput | ( | std::function< std::expected< bool, ManagedError >(const InputEvent &)> | callback | ) |
| callback | Scene-level interceptor before routing; true suppresses routing, false continues. Mutable captures persist between events. Empty clears the interceptor; replacement retains an active call. |
|
inline |
| Callback | Owning compact action, optionally receiving const KeyEvent&. |
| selection | Immutable owning alternatives or a deferred helper error. |
| action | Checked callback invoked once for an admitted native phase. |
| origin | Registration site preserved for configuration and action failures. |
|
inline |
| Callback | Exact compact managed action, optionally borrowing the admitted key. |
| selection | Owning normalized alternatives and native phases. |
| info | Owning annotated metadata, resolved before publication. |
| action | Action owned only by the canonical registration. |
| origin | Registration site used only when the error has no more precise provenance. |
|
inline |
| Callback | Owning compact action, optionally borrowing the admitted KeyEvent. |
| chord | Exact key/scalar/modifiers; PRESS and REPEAT are admitted, RELEASE is ignored. |
| action | Void, expected<Value, TreeError> or EditorCommandResult callback; success payloads are ignored. |
|
inline |
| Value | Owning Shortcut value, borrowed until copied/moved inside the checked boundary. |
| Callback | Owning compact action, optionally receiving the admitted semantic KeyEvent. |
| shortcut | Normalized alternatives, validated before owning transfer and publication. |
| action | Checked callback invoked once, preserving the existing command-error receipt. |
| behavior | PRESS-only default; REPEAT is explicit. |
| options | Positive finite alternative budgets. |
| origin | Registration site retained for errors from this admitted action, including throws. |
|
inline |
| Callback | Owning compact action accepting const NodeGeometry& or no arguments. |
| node | Live managed widget whose local, surface and clip bounds are observed. |
| callback | Void, checked TreeError or EditorCommandResult callback owned by this scene. |
| origin | Registration site retained in diagnostics. |
|
inline |
Register custom presentation work at the existing dirty-frame boundary.
| T | Concrete custom Widget type, including final types. |
| node | Managed target, borrowed through tree.edit while the callback runs. |
| callback | Called with widget and recovered focus. Read latest state, change only unequal presentation values, and invalidate PAINT/LAYOUT if needed. Do not retain widget references. |
|
inline |
| Callback | Owning managed action accepting TextEditedEvent or no arguments. |
| node | Editor whose existing binding supplies accepted user text changes. |
| callback | FIFO action; retained by the scene, including during self-removal. |
| origin | Registration site retained for diagnostics. |
| std::expected< void, ManagedError > portals::ManagedScene::openDialog | ( | Node< Widget > | node | ) |
Open a ready registered layer; an already open layer is unchanged.
| node | Exact dialog root; anchored initial admission requires arranged body geometry. |
| std::expected< void, ManagedError > portals::ManagedScene::overlayHost | ( | Node< OverlayHost > | host, |
| Node< Widget > | body ) |
Bind the scene's sole retained host to its exact ordinary body.
| host | Managed host with body as its first child. |
| body | Live ordinary body subtree, retained across activations. |
| std::expected< PasswordValue, ManagedError > portals::ManagedScene::passwordValue | ( | Node< Password > | node | ) | const |
| node | Live protected editor. |
|
overridevirtual |
| app | The same borrowed Application used at creation. |
| size | Current viewport; custom layout remains the existing tree layout's responsibility. |
Reimplemented from portals::ApplicationScene.
|
overridevirtual |
Prepare registered views from the pins captured by prepare(), in registration order.
| app | Same application used at creation. |
| snapshot | Owning layout for this pass; hidden views retain cancellation semantics. |
Reimplemented from portals::ApplicationScene.
| std::expected< ManagedState< RadioGroupValue >, ManagedError > portals::ManagedScene::radioState | ( | std::initializer_list< std::string_view > | captions | ) |
| captions | Ordinary string initializer copied into scene-owned immutable rows. |
| std::expected< ManagedState< RadioGroupValue >, ManagedError > portals::ManagedScene::radioState | ( | std::span< const RadioOption > | options, |
| KeyTextResolver | resolver = {}, | ||
| CollectionLimits | limits = {} ) |
| options | Cold owning captions with eligibility. |
| resolver | Synchronous localization adapter. |
| limits | Existing collection cap. |
| std::expected< ManagedState< RadioGroupValue >, ManagedError > portals::ManagedScene::radioState | ( | std::span< const TextValue > | captions, |
| KeyTextResolver | resolver = {}, | ||
| CollectionLimits | limits = {} ) |
| captions | Owning literal/resource expressions, resolved with this scene's width policy. |
| resolver | Optional synchronous localization adapter. |
| limits | Existing resident collection cap. |
| std::expected< RadioGroupValue, ManagedError > portals::ManagedScene::radioValue | ( | Node< RadioGroup > | node | ) |
| node | Bound managed group. |
| std::expected< void, ManagedError > portals::ManagedScene::remove | ( | Node< Widget > | node | ) |
Retire one managed subtree and immediately reclaim its managed entry budget.
| node | Managed node other than root(); an already retired managed identity is accepted. |
| std::expected< Invalidation, ManagedError > portals::ManagedScene::removeLayer | ( | StyleLayerHandle | handle | ) |
| handle | Live layer observer; base removal clears declarations but retains the slot. |
| std::expected< Invalidation, ManagedError > portals::ManagedScene::replaceLayer | ( | StyleLayerHandle | handle, |
| const StyleSheet & | sheet ) |
| handle | Live non-base layer observer. |
| sheet | Borrowed replacement preserving identity and installation order. |
|
noexcept |
Record an explicit error without changing runtime stop/recovery policy.
| failure | Original typed error; argument construction precedes this call. |
| contexts | Borrowed breadcrumbs copied under the configured count and byte budgets. |
| origin | Report call site; supply the earlier origin for deferred operations. |
|
inlineoverridevirtualnoexcept |
Reimplemented from portals::ApplicationScene.
|
overridevirtualnoexcept |
Reimplemented from portals::ApplicationScene.
| std::expected< std::optional< PositionResolution >, ManagedError > portals::ManagedScene::restoreStatus | ( | Node< VirtualList< T > > | node | ) | const |
| T | Immutable row type of the existing managed view. |
| node | Live list in this scene. |
| std::expected< std::optional< PositionResolution >, ManagedError > portals::ManagedScene::restoreStatus | ( | Node< VirtualTable< T > > | node | ) | const |
| T | Immutable row type of the existing managed view. |
| node | Live table. |
| std::expected< ApplicationStats, ManagedError > portals::ManagedScene::run | ( | ApplicationTerminal & | terminal, |
| std::stop_token | stop = {} ) |
| terminal | Borrowed existing replay/custom transport, required to outlive run. |
| stop | Optional cooperative cancellation. |
| std::expected< ApplicationStats, ManagedError > portals::ManagedScene::run | ( | std::stop_token | stop = {} | ) |
| stop | Optional cooperative cancellation. |
| std::expected< Node< ScrollBar >, ManagedError > portals::ManagedScene::scrollBar | ( | Node< Widget > | parent, |
| std::shared_ptr< ScrollController > | controller = {}, | ||
| ScrollAxis | axis = ScrollAxis::VERTICAL, | ||
| ScrollBarOptions | options = {}, | ||
| ControlStyle | style = {}, | ||
| bool | geometryWriter = true ) |
| parent | Live managed parent. |
| controller | Owning shared values; empty creates standalone values. |
| axis | Projected axis. |
| options | Owning input and paint settings. |
| style | Manual appearance defaults. |
| geometryWriter | True for standalone metrics ownership, false for an area projection. |
| std::expected< PropertyUpdate< RadioGroupValue >, ManagedError > portals::ManagedScene::selectRadio | ( | Node< RadioGroup > | node, |
| std::optional< RowId > | id ) |
| node | Bound managed group. |
| id | Existing full ID or no selection. |
| std::expected< PropertyUpdate< bool >, ManagedError > portals::ManagedScene::setChecked | ( | Node< CheckBox > | node, |
| bool | value ) |
| node | Managed bool-bound checkbox or subtype. |
| value | Replacement bool. |
| std::expected< void, ManagedError > portals::ManagedScene::setKeyCapabilities | ( | KeyCapabilities | capabilities | ) |
| capabilities | Explicit native phase knowledge. |
| std::expected< void, ManagedError > portals::ManagedScene::setLogModel | ( | Node< LogView > | node, |
| ui::LogSource | source ) |
| node | Live managed log, including rolling mode. |
| source | Owning deferred binding. |
| std::expected< void, ManagedError > portals::ManagedScene::setModel | ( | Node< VirtualList< T > > | node, |
| ManagedModel< T > | model, | ||
| std::type_identity_t< std::optional< ManagedViewHandler< T > > > | prepared = std::nullopt, | ||
| ModelRebindOptions | options = {} ) |
Atomically replace a managed list's model without replacing its node or presentation.
| T | Existing immutable row type shared by both models. |
| node | Live list created by this scene's virtualList factory. |
| model | Live replacement owned by this scene; admission performs no provider I/O. |
| prepared | Omitted keeps a same-model override; a new model uses its own preparation callback. An explicitly empty handler clears the override. |
| options | Remember/reset and bounded metadata policy. |
| std::expected< void, ManagedError > portals::ManagedScene::setModel | ( | Node< VirtualTable< T > > | node, |
| ManagedModel< T > | model, | ||
| std::type_identity_t< std::optional< ManagedViewHandler< T > > > | prepared = std::nullopt, | ||
| ModelRebindOptions | options = {} ) |
Atomically replace a managed table's model, preserving columns, options and node identity.
| T | Existing immutable row type shared by both models. |
| node | Live table created by this scene's virtualTable factory. |
| model | Live replacement owned by this scene. |
| prepared | Optional override with the same keep/replace/clear policy as the list overload. |
| options | Remember/reset and bounded metadata policy. |
| std::expected< void, ManagedError > portals::ManagedScene::setPasswordValue | ( | Node< Password > | node, |
| PasswordValue | value ) |
| node | Live protected editor with a native binding. |
| value | Protected candidate subject to the editor's ordinary publication/validation mode. |
| std::expected< void, ManagedError > portals::ManagedScene::setScrollMetrics | ( | Node< ScrollBar > | node, |
| ScrollAxisMetrics | metrics ) |
| node | Live managed standalone metrics writer. |
| metrics | Exact extent and viewport. |
| std::expected< void, ManagedError > portals::ManagedScene::setScrollOffset | ( | Node< Widget > | node, |
| ScrollAxis | axis, | ||
| ScrollOffset | offset ) |
| node | Live managed area or bar. |
| axis | Requested axis. |
| offset | Exact integral and fractional position; programmatic commands allow readOnly. |
| std::expected< Node< Spinner >, ManagedError > portals::ManagedScene::spinner | ( | Node< Widget > | parent, |
| SpinnerOptions | options = {}, | ||
| ControlStyle | style = {}, | ||
| SizePolicy | policy = DEFAULT_CONTENT_POLICY, | ||
| SpinnerLabelResolver | resolver = {} ) |
| parent | Checked receiving parent in this scene. |
| options | Owning finite indicator configuration, validated before publication. |
| style | Manual active/dim defaults beneath existing theme rules. |
| policy | Existing size constraints. |
| resolver | Optional synchronous label localization adapter, never retained after mounting. |
| std::expected< void, ManagedError > portals::ManagedScene::start | ( | ApplicationReadyTerminal & | terminal, |
| std::stop_token | stop = {} ) |
| terminal | Ready-only transport borrowed until terminal step or destruction. |
| stop | Cooperative cancellation sampled by each ready operation. |
|
inline |
Create UI-owned state with guaranteed dirty-frame recovery of missed notifications.
| T | Equality-comparable, owning value satisfying Property<T>'s contract. |
| initial | Initial value moved into revision zero, except string copied inside the checked boundary; argument construction precedes this call. |
| kind | PAINT or LAYOUT; NONE is rejected because it cannot guarantee recovery. |
| options | Positive existing Property observer capacity. |
| std::expected< ApplicationStep, ManagedError > portals::ManagedScene::step | ( | ) |
|
overridevirtual |
| app | The same runtime, already stopped by Application; cleanup failure is retained by run(). |
Reimplemented from portals::ApplicationScene.
| std::expected< void, ManagedError > portals::ManagedScene::style | ( | Node< Widget > | node, |
| StyleTarget | target ) |
| node | Managed node whose style metadata will be staged. |
| target | Owning custom identity; standard controls already have type Control. |
| std::expected< Invalidation, ManagedError > portals::ManagedScene::styleDefaults | ( | const StyleSheet & | sheet | ) |
| sheet | Borrowed DEFAULTS declarations below THEME and application/user overrides. |
| std::expected< StyleLayerHandle, ManagedError > portals::ManagedScene::styleDocument | ( | StyleTier | tier, |
| std::string_view | name, | ||
| const PssDocument & | document, | ||
| std::optional< StyleLayerOptions > | options = std::nullopt ) |
Atomically install owning declarations and provenance in an APPLICATION or USER layer.
Legacy mode becomes layered in the same commit, retaining the old sheet in THEME. Failure preserves mode, authority, pending registrations, computed values, and provenance. Equal declarations with changed metadata alone do not call defaults, advance revision, or request redraw.
| tier | APPLICATION or USER priority; base tiers are rejected. |
| name | Nonempty tier identity; replacement preserves its handle and installation order. |
| document | Borrowed mutable document, validated and deep-copied into immutable ownership before publication. |
| options | Omitted limits adopt established budgets, or defaults at first enable; incompatible values reject. |
Metadata has a separate MAX_PSS_DOCUMENT_BYTES logical budget per document. Checked maxLayers times that limit bounds resident logical metadata; records also incur the layer payload charge. Document copies and candidate sheets may coexist while staging. These limits do not cap RSS. Coordinates are checked structurally; original bytes are unavailable for proving their exact positions. Non-allocation errors retain a best-effort owning source label. NO_MEMORY never allocates a fallback label. A facade may attach its already-owned immutable identity without allocating or changing the original cause.
| std::expected< std::vector< StyleLayerSource >, ManagedError > portals::ManagedScene::styleSources | ( | ) | const |
Copy every actual layer row in installation order on the UI thread.
Unknown sources have null metadata. Legacy mode returns an empty snapshot. Retained documents may outlive cleanup; observing handles never keep the scene alive. Allocator reentry cannot mutate or retire the scene while the snapshot is copied.
| std::expected< void, ManagedError > portals::ManagedScene::theme | ( | StyleSheet | sheet | ) |
| sheet | Owning stylesheet installed with the existing atomic style engine. |
| std::expected< Invalidation, ManagedError > portals::ManagedScene::updateLayers | ( | std::span< const StyleLayerUpdate > | updates | ) |
| updates | Borrowed unique existing-handle updates, committed together with pending metadata. |
|
overridevirtualnoexcept |
Reimplemented from portals::ApplicationScene.
|
overridevirtualnoexcept |
Opt into bounded layout-driven view preparation; default is false.
Reimplemented from portals::ApplicationScene.
| std::expected< void, ManagedError > portals::ManagedScene::validateStyleLayer | ( | StyleLayerHandle | handle | ) | const |
Validate an observing layer identity without resolving styles or invoking callbacks.
| handle | UI-affine weak identity issued by this scene. |
| std::expected< Node< VirtualList< T > >, ManagedError > portals::ManagedScene::virtualList | ( | Node< Widget > | parent, |
| ManagedModel< T > | model, | ||
| std::type_identity_t< ManagedListFormatter< T > > | delegate, | ||
| VirtualListOptions | options = {}, | ||
| SizePolicy | policy = DEFAULT_VIEWPORT_POLICY, | ||
| std::type_identity_t< ManagedViewHandler< T > > | prepared = {} ) |
Mount a list with owned range, input binding, style and automatic preparation.
| T | Immutable row accepted by the owning text delegate. |
| parent | Managed parent; failure removes only the attempted child. |
| model | Model belonging to this scene. |
| delegate | Owning row formatter, invoked only for visible rows. |
| options | Existing list configuration, validated by preparation. |
| policy | Existing layout policy for the list. |
| prepared | Optional view override after preparation; empty uses model-owned preparation. Pending work without either callback is rejected with INVALID_ARGUMENT. |
| std::expected< Node< VirtualTable< T > >, ManagedError > portals::ManagedScene::virtualTable | ( | Node< Widget > | parent, |
| ManagedModel< T > | model, | ||
| std::type_identity_t< std::span< const TableColumn< T > > > | columns, | ||
| VirtualTableOptions | options = {}, | ||
| SizePolicy | policy = DEFAULT_VIEWPORT_POLICY, | ||
| std::type_identity_t< ManagedViewHandler< T > > | prepared = {} ) |
Mount a table with owned range, input binding, style and automatic preparation.
| T | Immutable model row accepted by the owning column delegates. |
| parent | Managed parent; failure removes only the attempted child. |
| model | Model belonging to this scene; no owner or pin escapes. |
| columns | Column descriptions copied by the table. |
| options | Existing table configuration, validated by preparation. |
| policy | Existing layout policy for the table. |
| prepared | Optional view override after preparation; empty uses the model's preparation callback. Pending work without either callback is rejected with INVALID_ARGUMENT. |
| std::expected< VisibleModelSnapshot< T >, VisibleModelError > portals::ManagedScene::visibleModelSnapshot | ( | Node< VirtualTable< T > > | node | ) | const |
Read ready physical rows after successful final layout publication.
| T | Immutable domain row type retained by the resulting pin. |
| node | Original managed table identity; removal never retargets another node. |
|
inlinenoexcept |