Explicit resource-loader configuration; no process-global registry or locale. Configure without concurrent access, then transfer/copy into a scene on its UI thread. Factories own their captures; referenced services must outlive synchronous prepare. Copies retain the first fluent registration failure; checked registry.add failures are independent.
More...
#include <ui_scene_resource.hpp>
|
| SceneResourceOptions & | popupMenu (std::string_view name, Ref< PopupMenu > reference, std::initializer_list< PopupEntry > entries, const PopupMenuOptions &options={}) &noexcept |
| | Bind a loaded popup and retain the first registration failure for checked prepare/runApp.
|
| SceneResourceOptions && | popupMenu (std::string_view name, Ref< PopupMenu > reference, std::initializer_list< PopupEntry > entries, const PopupMenuOptions &options={}) &&noexcept |
| | Bind a loaded popup on a temporary without copying existing adapters.
|
template<class T, class Factory>
requires detail::ResourceFactory<T, std::decay_t<Factory>> |
| SceneResourceOptions & | control (std::string_view name, Factory &&factory, bool children=false) &noexcept |
| | Register a typed resource control and retain the first failure for checked prepare/runApp.
|
template<class T, class Factory, class Schema>
requires detail::ResourceFactory<T, std::decay_t<Factory>> && std::same_as<std::remove_cvref_t<Schema>, std::span<const
ControlPropertyDescriptor>> |
| SceneResourceOptions & | control (std::string_view name, Factory &&factory, Schema &&schema) &noexcept |
| | Select a finite native composite schema and collect registration failure for prepare/runApp.
|
template<class T, class Factory, class Schema>
requires detail::ResourceFactory<T, std::decay_t<Factory>> && std::same_as<std::remove_cvref_t<Schema>, std::span<const
ControlPropertyDescriptor>> |
| SceneResourceOptions && | control (std::string_view name, Factory &&factory, Schema &&schema) &&noexcept |
| | Select the finite native composite schema on a temporary without adapter copies.
|
template<class T, class Factory>
requires detail::ResourceFactory<T, std::decay_t<Factory>> |
| SceneResourceOptions && | control (std::string_view name, Factory &&factory, bool children=false) &&noexcept |
| | Register on a temporary without copying its existing adapters.
|
|
|
SceneResourceRegistry | registry {} |
| | Owning copied/moved typed allowlist and factory captures.
|
|
TextResolver | resolver {} |
| | Existing owning synchronous i18n adapter, used only at prepare.
|
|
SceneResourceLimits | limits {} |
| | Finite parser bounds, independent of managed/tree limits.
|
|
detail::ResourceRegistrationState | registration {} |
| | Internal sticky failure; not a configuration/reset API.
|
| SceneResourceFormat | format |
| | Explicit grammar; ordinary resources retain their syntax.
|
|
std::optional< ControlContext > | controls {} |
| | Local immutable snapshot; absent inherits the containing scene context.
|
Explicit resource-loader configuration; no process-global registry or locale. Configure without concurrent access, then transfer/copy into a scene on its UI thread. Factories own their captures; referenced services must outlive synchronous prepare. Copies retain the first fluent registration failure; checked registry.add failures are independent.
◆ control() [1/4]
template<class T, class Factory>
requires detail::ResourceFactory<T, std::decay_t<Factory>>
| SceneResourceOptions && portals::ui::SceneResourceOptions::control |
( |
std::string_view | name, |
|
|
Factory && | factory, |
|
|
bool | children = false ) && |
|
inlinenoexcept |
Register on a temporary without copying its existing adapters.
- Template Parameters
-
| T | Public Widget subtype returned by the factory. |
| Factory | Copyable typed recipe factory, as in the lvalue overload. |
- Parameters
-
| name | Unique case-sensitive ASCII identifier copied now. |
| factory | Owning callable transferred into the registry; borrows outlive prepare. |
| children | Whether resource child nodes are allowed. |
- Returns
- This configuration as an rvalue, with the same sticky checked-error contract.
◆ control() [2/4]
template<class T, class Factory>
requires detail::ResourceFactory<T, std::decay_t<Factory>>
| SceneResourceOptions & portals::ui::SceneResourceOptions::control |
( |
std::string_view | name, |
|
|
Factory && | factory, |
|
|
bool | children = false ) & |
|
inlinenoexcept |
Register a typed resource control and retain the first failure for checked prepare/runApp.
- Template Parameters
-
- Parameters
-
| name | Case-sensitive ASCII identifier copied now, unique including builtin names. |
| factory | Owning adapter copied/moved now and invoked at prepare after validation. Borrowed captures must outlive prepare; no factory is invoked during registration. |
| children | Whether this type accepts resource child nodes; defaults to a leaf. |
- Returns
- This same configuration for chaining. The first failure stops later fluent registrations and rejects prepare before file reads, parsing, resolvers, factories or terminal entry. Internal allocation/capture exceptions become NO_MEMORY/CALLBACK_FAILED; caller argument evaluation and construction/copying of the options or scene may still throw.
◆ control() [3/4]
template<class T, class Factory, class Schema>
requires detail::ResourceFactory<T, std::decay_t<Factory>> && std::same_as<std::remove_cvref_t<Schema>, std::span<const
ControlPropertyDescriptor>>
| SceneResourceOptions && portals::ui::SceneResourceOptions::control |
( |
std::string_view | name, |
|
|
Factory && | factory, |
|
|
Schema && | schema ) && |
|
inlinenoexcept |
Select the finite native composite schema on a temporary without adapter copies.
- Template Parameters
-
| T | Factory widget result. |
| Factory | Existing resource callable. |
| Schema | Canonical span. |
- Parameters
-
| name | Unique owning name. |
| factory | Owning actual native composite recipe producer. |
| schema | Complete metadata read only now. |
- Returns
- This rvalue, with the same sticky error boundary.
◆ control() [4/4]
template<class T, class Factory, class Schema>
requires detail::ResourceFactory<T, std::decay_t<Factory>> && std::same_as<std::remove_cvref_t<Schema>, std::span<const
ControlPropertyDescriptor>>
| SceneResourceOptions & portals::ui::SceneResourceOptions::control |
( |
std::string_view | name, |
|
|
Factory && | factory, |
|
|
Schema && | schema ) & |
|
inlinenoexcept |
Select a finite native composite schema and collect registration failure for prepare/runApp.
- Template Parameters
-
| T | Factory widget result. |
| Factory | Existing owning resource callable. |
| Schema | Exactly the canonical metadata span; no span is retained. |
- Parameters
-
| name | Unique owning registry name. |
| factory | Real native MessageBox or Notifications recipe factory. |
| schema | Complete canonical native composite vocabulary, checked immediately by content. |
- Returns
- This configuration; the existing first-error and exception boundary is preserved.
◆ popupMenu() [1/2]
Bind a loaded popup on a temporary without copying existing adapters.
- Parameters
-
| name | Unique owning resource type name. |
| reference | Observing popup slot. |
| entries | Code-owned action tree copied now. |
| options | Popup settings borrowed only now; copied inside the checked boundary. |
- Returns
- This rvalue, with the same sticky checked-error contract as the lvalue overload.
◆ popupMenu() [2/2]
Bind a loaded popup and retain the first registration failure for checked prepare/runApp.
- Parameters
-
| name | Unique case-sensitive resource type name copied now. |
| reference | Observing popup slot, bound when the resource mounts. |
| entries | Owning code-defined action tree copied now; no ActionRefs are deserialized. |
| options | Finite popup budgets and caps, borrowed only during this call; the registry copies them inside the checked exception boundary. |
- Returns
- This configuration for chaining. The first failure stops later fluent registrations and rejects prepare before file reads, parsing, resolvers, factories or terminal entry. Internal allocation/capture exceptions become NO_MEMORY/CALLBACK_FAILED; caller argument evaluation and construction/copying of the options or scene may still throw.
◆ format
| SceneResourceFormat portals::ui::SceneResourceOptions::format |
Initial value:{
SceneResourceFormat::LEGACY}
Explicit grammar; ordinary resources retain their syntax.
The documentation for this struct was generated from the following file: