Cold owning declarations, transferred to one managed scene on first button/menu/key binding. UI-affine. Cold recipes and key stages retain declarations until managed attachment. Scene close clears callbacks and invalidates refs even when this descriptor survives. Construction may throw; no router, scheduler, resource executable or binding token is created here.
More...
#include <ui_action.hpp>
|
| | ActionSet (ActionSetOptions options={}) |
| | ActionSet (ActionSet &&other) noexcept |
| ActionSet & | operator= (ActionSet &&other) noexcept |
|
| ActionSet (const ActionSet &)=delete |
|
ActionSet & | operator= (const ActionSet &)=delete |
|
| ~ActionSet () |
| | Release cold declarations on UI; attached scenes/recipes retain their own ownership.
|
| std::expected< ActionRef, TreeError > | add (std::string_view key, Action action) |
| ActionRef | action (std::string_view key, Action action) |
template<class Callback = detail::QuitCommand>
requires (std::copy_constructible<Callback> && portals::detail::ManagedAction<Callback, ActionInvocation>) |
| ActionRef | action (std::string_view key, std::string_view caption, Callback callback) |
template<class Callback = detail::QuitCommand>
requires (std::copy_constructible<Callback> && portals::detail::ManagedAction<Callback, ActionInvocation>) |
| std::expected< ActionRef, TreeError > | add (std::string_view key, std::string_view caption, Callback callback) |
Cold owning declarations, transferred to one managed scene on first button/menu/key binding. UI-affine. Cold recipes and key stages retain declarations until managed attachment. Scene close clears callbacks and invalidates refs even when this descriptor survives. Construction may throw; no router, scheduler, resource executable or binding token is created here.
◆ ActionSet() [1/2]
- Parameters
-
| options | Positive finite admission budgets, checked when admitting an action. |
◆ ActionSet() [2/2]
| portals::ui::ActionSet::ActionSet |
( |
ActionSet && | other | ) |
|
|
noexcept |
- Parameters
-
| other | UI-affine declaration owner, left empty; foreign-thread moves terminate. |
◆ action() [1/2]
| ActionRef portals::ui::ActionSet::action |
( |
std::string_view | key, |
|
|
Action | action ) |
- Parameters
-
| key | Unique organizational key. |
| action | Owning callback and metadata. |
- Returns
- Compact weak ref; admission failure is delivered at its later scene binding.
◆ action() [2/2]
| ActionRef portals::ui::ActionSet::action |
( |
std::string_view | key, |
|
|
std::string_view | caption, |
|
|
Callback | callback ) |
|
inline |
- Parameters
-
| key | Unique organizational key. |
| caption | Shared owning caption copied inside admission. |
| callback | Compact callback. |
- Returns
- Weak ref with sticky typed failure on rejected admission.
◆ add() [1/2]
- Parameters
-
| key | Nonempty unique organizational key, independent of exclusiveGroup. |
| action | Owning callback and metadata. |
- Returns
- Weak action or typed failure without partial entry publication.
◆ add() [2/2]
| std::expected< ActionRef, TreeError > portals::ui::ActionSet::add |
( |
std::string_view | key, |
|
|
std::string_view | caption, |
|
|
Callback | callback ) |
|
inline |
- Parameters
-
| key | Unique organizational key. |
| caption | Shared caption. |
| callback | Compact callback. |
- Returns
- Checked admission without a partial entry.
◆ operator=()
- Parameters
-
| other | UI-affine declaration owner. |
- Returns
- This owner; foreign-thread assignment terminates.
The documentation for this class was generated from the following file: