Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
ui_dialogs.hpp
1// Copyright (c) 2026 ttldtor.
2// SPDX-License-Identifier: BSL-1.0
3#pragma once
4
5#include <portals/ui_controls.hpp>
6#include <portals/ui_layout.hpp>
7#include <portals/ui_scene_recipes.hpp>
8
9namespace portals::ui {
10
19template <detail::DescriptionInput Body>
20Description<Overlay> notifications(NotificationCenter center, Body &&body, NotificationOptions options = {}) {
21 auto layout = detail::Access::captureLayouts(body);
22 auto description = detail::Access::cold<Overlay>(
23 [center = std::move(center), body = std::forward<Body>(body),
24 options](ManagedScene &scene, Node<Widget> parent,
25 detail::MountContext &context) mutable -> std::expected<Node<Overlay>, ManagedError> {
26 auto effective = detail::controlOverlayOptions(*context.controlSettings, {});
27 if (!effective) {
28 return std::unexpected(detail::error(parent, effective.error()));
29 }
30 auto wrapper = scene.emplace<Overlay>(parent, *effective);
31 if (!wrapper) {
32 return std::unexpected(wrapper.error());
33 }
34 if (context.root == Node<Widget>{}) {
35 context.root = *wrapper;
36 }
37 auto content = detail::Access::mount(std::move(body), scene, *wrapper, context);
38 if (!content) {
39 return std::unexpected(content.error());
40 }
41 auto effectiveOptions = detail::controlNotificationOptions(*context.controlSettings, options);
42 auto bound = detail::Access::notifications(scene, *wrapper, *content, center, effectiveOptions, context);
43 return bound ? wrapper : std::unexpected(bound.error());
44 });
45
46 // The semantic identity inherits only Notifications defaults, never unrelated ordinary Overlay declarations.
47 return detail::Access::notificationControl(detail::Access::withLayout(std::move(description), std::move(layout)));
48}
49
58template <detail::DescriptionInput Body>
59Description<Overlay> notifications(Ref<Overlay> reference, NotificationCenter center, Body &&body,
60 NotificationOptions options = {}) {
61 return notifications(std::move(center), std::forward<Body>(body), std::move(options)).reference(std::move(reference));
62}
63
73 requires((std::same_as<std::remove_cvref_t<Layers>, Description<Dialog>> ||
74 std::same_as<std::remove_cvref_t<Layers>, Description<PopupMenu>>) && ...)
75Description<OverlayHost> overlayHost(OverlayHostOptions options, Body &&body, Layers &&...layers) {
76 auto layout = detail::Access::captureLayouts(body, layers...);
77 auto description = detail::Access::cold<OverlayHost>(
78 [options, body = std::forward<Body>(body), layers = std::tuple(std::forward<Layers>(layers)...)](
79 ManagedScene &scene, Node<Widget> parent,
80 detail::MountContext &context) mutable -> std::expected<Node<OverlayHost>, ManagedError> {
81 const auto effective = detail::controlOverlayHostOptions(*context.controlSettings, options);
82 auto host = scene.emplace<OverlayHost>(parent, effective);
83 if (!host) {
84 return std::unexpected(host.error());
85 }
86 if (context.root == Node<Widget>{}) {
87 context.root = *host;
88 }
89 auto content = detail::Access::mount(std::move(body), scene, *host, context);
90 if (!content) {
91 return std::unexpected(content.error());
92 }
93 const auto bodyRoot = context.mountedOuter != Node<Widget>{} ? context.mountedOuter : Node<Widget>(*content);
94 auto bound = scene.overlayHost(*host, bodyRoot);
95 if (!bound) {
96 return std::unexpected(bound.error());
97 }
98 auto styled = scene.style(*host, StyleTarget{.type = "OverlayHost", .classes = {"overlay-host"}});
99 if (!styled) {
100 return std::unexpected(styled.error());
101 }
102 std::expected<void, ManagedError> result;
103 std::apply(
104 [&](auto &...layer) {
105 [[maybe_unused]] const auto mount = [&](auto &recipe) {
106 if (result) {
107 auto child = detail::Access::mount(std::move(recipe), scene, *host, context);
108 if (!child) {
109 result = std::unexpected(child.error());
110 }
111 }
112 };
113 (mount(layer), ...);
114 },
115 layers);
116 return result ? host : std::unexpected(result.error());
117 });
118
120 detail::Access::choiceHost(detail::Access::withLayout(std::move(description), std::move(layout)), true),
121 "OverlayHost");
122}
123
130template <detail::DescriptionInput Body, detail::DescriptionInput... Layers>
131 requires((std::same_as<std::remove_cvref_t<Layers>, Description<Dialog>> ||
132 std::same_as<std::remove_cvref_t<Layers>, Description<PopupMenu>>) && ...)
133Description<OverlayHost> overlayHost(Body &&body, Layers &&...layers) {
134 return overlayHost(OverlayHostOptions{}, std::forward<Body>(body), std::forward<Layers>(layers)...);
135}
136
144template <detail::DescriptionInput Body, detail::DescriptionInput... Layers>
145 requires((std::same_as<std::remove_cvref_t<Layers>, Description<Dialog>> ||
146 std::same_as<std::remove_cvref_t<Layers>, Description<PopupMenu>>) && ...)
147Description<OverlayHost> overlayHost(Ref<OverlayHost> reference, Body &&body, Layers &&...layers) {
148 return overlayHost(std::forward<Body>(body), std::forward<Layers>(layers)...).reference(std::move(reference));
149}
150
158template <detail::DescriptionInput Body>
159Description<Dialog> dialog(TextValue title, Body &&body, DialogOptions options = {}) {
160 auto heading = label(std::move(title)).style(StyleTarget{.type = "Label", .classes = {"dialog-title"}});
161 auto content = detail::Access::dialogContent(column(std::forward<Body>(body)))
162 .style(StyleTarget{.type = "Column", .classes = {"dialog-body"}});
163 auto layout = detail::Access::captureLayouts(heading, content);
164 auto description =
165 detail::Access::cold<Dialog>([options, heading = std::move(heading), content = std::move(content)](
166 ManagedScene &scene, Node<Widget> parent,
167 detail::MountContext &context) mutable -> std::expected<Node<Dialog>, ManagedError> {
168 const auto effective = detail::controlDialogOptions(*context.controlSettings, options);
169
170 if (context.controlSettings->title) {
171 heading = std::move(heading).settings({.text = *context.controlSettings->title});
172
173 if (context.controlPrepared) {
174 detail::Access::preparedDialogHeading(heading, *context.controlSettings->title);
175 }
176 }
177
178 auto valid = Dialog::validate(effective);
179 if (!valid) {
180 return std::unexpected(detail::error(parent, valid.error()));
181 }
182 auto root = scene.emplace<Dialog>(parent, effective);
183 if (!root) {
184 return std::unexpected(root.error());
185 }
186 if (context.root == Node<Widget>{}) {
187 context.root = *root;
188 }
189 auto panel = detail::Access::dialogPanel(scene, *root, effective.frame);
190 if (!panel) {
191 return std::unexpected(panel.error());
192 }
193 context.nodes.push_back(*panel);
194 auto column = scene.emplace<Column>(*panel);
195 if (!column) {
196 return std::unexpected(column.error());
197 }
198 context.nodes.push_back(*column);
199 auto titleNode = detail::Access::mount(std::move(heading), scene, *column, context);
200 if (!titleNode) {
201 return std::unexpected(titleNode.error());
202 }
203 auto mounted = detail::Access::mount(std::move(content), scene, *column, context);
204 if (!mounted) {
205 return std::unexpected(mounted.error());
206 }
207 auto bound = scene.dialog(*root, *panel, *mounted);
208 if (!bound) {
209 return std::unexpected(bound.error());
210 }
211 auto styled = scene.style(
212 *root, StyleTarget{.type = "Dialog",
213 .classes = {"dialog", effective.mode == DialogMode::MODAL ? "modal" : "nonmodal"}});
214 return styled ? root : std::unexpected(styled.error());
215 });
216
217 return detail::Access::configuredControl(detail::Access::withLayout(std::move(description), std::move(layout)),
218 "Dialog");
219}
220
228template <detail::DescriptionInput Body>
229Description<Dialog> dialog(Ref<Dialog> reference, TextValue title, Body &&body, DialogOptions options = {}) {
230 return dialog(std::move(title), std::forward<Body>(body), options).reference(std::move(reference));
231}
232
239template <detail::DescriptionInput Body>
240Description<Dialog> dialog(std::string_view title, Body &&body, DialogOptions options = {}) {
241 return dialog(TextValue(title), std::forward<Body>(body), options);
242}
243
251template <detail::DescriptionInput Body>
252Description<Dialog> dialog(Ref<Dialog> reference, std::string_view title, Body &&body, DialogOptions options = {}) {
253 return dialog(std::move(reference), TextValue(title), std::forward<Body>(body), options);
254}
255
262template <detail::DescriptionInput Body>
263Description<Dialog> dialog(Ref<MessageDialog> reference, TextValue title, Body &&body, DialogButtons buttons,
264 MessageOptions options = {}) {
265 auto layout = detail::Access::captureLayouts(body);
266 auto description =
267 detail::MessageAccess::describe(std::move(reference), std::move(title), {},
268 detail::Access::erase(std::forward<Body>(body)), std::move(options), buttons);
269
270 return detail::Access::withLayout(std::move(description), std::move(layout));
271}
272
277template <detail::DescriptionInput Body>
278Description<Dialog> dialog(Ref<MessageDialog> reference, std::string_view title, Body &&body, DialogButtons buttons,
279 MessageOptions options = {}) {
280 return dialog(std::move(reference), TextValue(title), std::forward<Body>(body), buttons, std::move(options));
281}
282
286inline Description<Dialog> dialog(Ref<MessageDialog> reference, TextValue title, TextValue body, DialogButtons buttons,
287 MessageOptions options = {}) {
288 return detail::MessageAccess::describe(std::move(reference), std::move(title), std::move(body), {},
289 std::move(options), buttons);
290}
291
295inline Description<Dialog> dialog(Ref<MessageDialog> reference, std::string_view title, std::string_view body,
296 DialogButtons buttons, MessageOptions options = {}) {
297 return dialog(std::move(reference), TextValue(title), TextValue(body), buttons, std::move(options));
298}
299
301namespace detail {
302Description<Dialog> defaultThemeSelector(ThemeSelectorRef reference, std::span<const ThemeChoice> choices,
303 const ThemeSelectionOptions &selection,
304 const std::optional<std::string> &initialId, ThemeSelectorOptions options);
305} // namespace detail
306
307template <std::size_t N>
308 requires(N > 0)
309Description<Dialog> themeSelector(ThemeSelectorRef reference, const ThemeChoice (&choices)[N],
310 ThemeSelectorOptions options) {
311 return detail::defaultThemeSelector(std::move(reference), choices, ThemeSelectionOptions{}, {}, std::move(options));
312}
313
314template <class Catalog>
315 requires std::same_as<std::remove_cvref_t<Catalog>, ThemeSelectorCatalog>
316Description<Dialog> themeSelector(ThemeSelectorRef reference, Catalog &&catalog, ThemeSelectorOptions options) {
317 return detail::defaultThemeSelector(std::move(reference), catalog.choices, catalog.selection, catalog.initialId,
318 std::move(options));
319}
320
322
325 std::size_t value;
326
331 return std::move(description).maxLayers(modifier.value);
332 }
333};
334
336inline OverlayHostModifier maxLayers(std::size_t value) {
337 return {value};
338}
339
342 ~DialogModifier() = default;
343
345
350 if (modifier.patch.title) {
351 (void)std::move(description).title(std::move(*modifier.patch.title));
352 }
353
354 return std::move(description).dialogSettings(modifier.patch.dialog);
355 }
356};
357
360 ~MessageModifier() = default;
361
363 bool options{};
364
369 if (modifier.patch.body) {
370 (void)std::move(description).body(std::move(*modifier.patch.body));
371 }
372 if (modifier.options) {
373 (void)std::move(description).messageSettings(std::move(modifier.patch.message));
374 }
375
376 return std::move(description);
377 }
378};
379
381inline MessageModifier body(TextValue value) {
382 return {{.body = std::move(value)}, false};
383}
384
386inline MessageModifier body(std::string_view value) {
387 return body(TextValue(value));
388}
389
391inline MessageModifier messageSettings(ControlMessageSettings value) {
392 return {{.message = std::move(value)}, true};
393}
394
396inline DialogModifier title(TextValue value) {
397 return {{.title = std::move(value)}};
398}
399
401inline DialogModifier title(std::string_view value) {
402 return title(TextValue(value));
403}
404
406inline DialogModifier mode(DialogMode value) {
407 return {{.dialog = {.mode = value}}};
408}
409
415inline DialogModifier nonModal() {
416 return mode(DialogMode::NON_MODAL);
417}
418
420inline DialogModifier placement(DialogPlacement value) {
421 return {{.dialog = {.placement = value}}};
422}
423
425inline DialogModifier maximumPanelSize(CellSize value) {
426 return {{.dialog = {.maximumPanelSize = {.width = value.width, .height = value.height}}}};
427}
428
430inline DialogModifier viewportMargin(std::int32_t value) {
431 return {{.dialog = {.viewportMargin = value}}};
432}
433
435inline DialogModifier anchorGap(std::int32_t value) {
436 return {{.dialog = {.anchorGap = value}}};
437}
438
440inline DialogModifier closeOnEscape(bool value = true) {
441 return {{.dialog = {.closeOnEscape = value}}};
442}
443
445inline DialogModifier closeButton(DialogCloseOptions options = {}) {
446 return {{.dialog = {.closeButton = {
447 .enabled = options.enabled, .placement = options.placement, .focusable = options.focusable}}}};
448}
449
451inline DialogModifier dialogSettings(ControlDialogSettings value) {
452 return {{.dialog = value}};
453}
454
458 std::optional<std::string> empty{};
459 std::optional<std::string> unavailable{};
460
465 template <class T>
466 requires(std::same_as<T, HelpView> || std::same_as<T, KeyHints>)
467 friend Description<T> operator|(Description<T> &&description, KeyHelpModifier modifier) {
468 (void)std::move(description).format(std::move(modifier.formatter));
469 if (modifier.empty) {
470 (void)std::move(description).emptyText(std::move(*modifier.empty));
471 }
472 if (modifier.unavailable) {
473 (void)std::move(description).unavailableText(std::move(*modifier.unavailable));
474 }
475 return std::move(description);
476 }
477};
478
480inline KeyHelpModifier format(ControlKeyFormatSettings values) {
481 return {std::move(values), {}, {}};
482}
483
485inline KeyHelpModifier emptyText(std::string value) {
486 return {{}, std::move(value), {}};
487}
488
490inline KeyHelpModifier unavailableText(std::string value) {
491 return {{}, {}, std::move(value)};
492}
493
496 bool value;
497
502 return std::move(description).initiallyOpen(modifier.value);
503 }
504};
505
507inline HelpOpenModifier initiallyOpen(bool value = true) {
508 return {value};
509}
510
513 ~KeyHintsModifier() = default;
514
515 std::optional<std::string> separator;
516 std::optional<std::string> overflow;
517
522 if (modifier.separator) {
523 (void)std::move(description).entrySeparator(std::move(*modifier.separator));
524 }
525 if (modifier.overflow) {
526 (void)std::move(description).overflowMarker(std::move(*modifier.overflow));
527 }
528 return std::move(description);
529 }
530};
531
533inline KeyHintsModifier entrySeparator(std::string value) {
534 return {std::move(value), {}};
535}
536
538inline KeyHintsModifier overflowMarker(std::string value) {
539 return {{}, std::move(value)};
540}
541
544 ~ThemeCatalogModifier() = default;
546
552 return std::move(description).themeCatalogSettings(std::move(modifier.patch));
553 }
554};
555
559inline ThemeCatalogModifier themeCatalogSettings(ControlThemeCatalogSettings values) {
560 return {std::move(values)};
561}
562
565 ~ThemeSelectorModifier() = default;
566
568
573 return std::move(description).themeSelectorSettings(std::move(modifier.patch));
574 }
575};
576
578inline ThemeSelectorModifier themeSelectorSettings(ControlThemeSelectorSettings values) {
579 return {std::move(values)};
580}
581
585
590 return std::move(description).notificationSettings(modifier.patch);
591 }
592};
593
597inline NotificationModifier notificationSettings(ControlNotificationSettings values) {
598 return {values};
599}
600
601namespace detail {
609template <DescriptionInput Body, SceneLayer... Layers> Description<Widget> layered(Body &&body, Layers &&...layers) {
610 auto hosted = [&] {
611 if constexpr (std::same_as<std::remove_cvref_t<Body>, Description<OverlayHost>>) {
612 return std::forward<Body>(body);
613 } else {
614 return overlayHost(std::forward<Body>(body));
615 }
616 }();
617
618 auto layout = Access::captureLayouts(hosted, layers...);
619 auto description =
620 Access::transaction([hosted = std::move(hosted), layers = std::tuple(std::forward<Layers>(layers)...)](
621 ManagedScene &owner, Node<Widget> parent,
622 MountContext &context) mutable -> std::expected<Node<Widget>, ManagedError> {
623 auto root = Access::mount(std::move(hosted), owner, parent, context);
624
625 if (!root) {
626 return std::unexpected(root.error());
627 }
628
629 auto host = Access::layerHost(owner, *root);
630
631 if (!host) {
632 return std::unexpected(host.error());
633 }
634
635 std::expected<void, ManagedError> result;
636
637 std::apply(
638 [&](auto &...layer) {
639 const auto mountLayer = [&](auto &recipe) {
640 if (!result) {
641 return;
642 }
643
644 auto mounted = Access::mount(std::move(recipe), owner, *host, context);
645
646 result = mounted ? Access::checkLayer(owner, *mounted) : std::unexpected(mounted.error());
647 };
648
649 (mountLayer(layer), ...);
650 },
651 layers);
652
653 return result ? std::expected<Node<Widget>, ManagedError>(*root) : std::unexpected(result.error());
654 });
655
656 return Access::withLayout(std::move(description), std::move(layout));
657}
658
659} // namespace detail
660
674template <class Body, detail::SceneLayer First, detail::SceneLayer... Layers>
676Scene scene(SceneOptions options, std::source_location origin, Body &&body, First &&first, Layers &&...layers) {
677 if constexpr (detail::DescriptionInput<Body>) {
678 return scene(detail::layered(std::forward<Body>(body), std::forward<First>(first), std::forward<Layers>(layers)...),
679 options, origin);
680 } else {
681 return scene(
682 [factory = std::forward<Body>(body),
683 layers = std::tuple(std::forward<First>(first), std::forward<Layers>(layers)...)](
684 ManagedScene &owner) mutable -> std::expected<Description<Widget>, ManagedError> {
685 auto recipe = [&] {
686 if constexpr (std::invocable<decltype(factory) &, ManagedScene &>) {
687 return std::invoke(factory, owner);
688 } else {
689 return std::invoke(factory, owner, detail::SceneAccess::application(owner));
690 }
691 }();
692
693 const auto compose = [&](auto &&content) {
694 return std::apply(
695 [&](auto &...layer) {
696 return detail::layered(std::move(content), std::move(layer)...);
697 },
698 layers);
699 };
700
701 if constexpr (detail::IsDescription<decltype(recipe)>::value) {
702 return compose(std::move(recipe));
703 } else {
704 if (!recipe) {
705 return std::unexpected(recipe.error());
706 }
707
708 return compose(std::move(*recipe));
709 }
710 },
711 options, origin);
712 }
713}
714
725template <class Body, detail::SceneLayer First, detail::SceneLayer... Layers>
727Scene scene(SceneOptions options, Body &&body, First &&first, Layers &&...layers) {
728 return scene(options, std::source_location::current(), std::forward<Body>(body), std::forward<First>(first),
729 std::forward<Layers>(layers)...);
730}
731
741template <class Body, detail::SceneLayer First, detail::SceneLayer... Layers>
743Scene scene(Body &&body, First &&first, Layers &&...layers) {
744 return scene(SceneOptions{}, std::source_location::current(), std::forward<Body>(body), std::forward<First>(first),
745 std::forward<Layers>(layers)...);
746}
747
748} // namespace portals::ui
static std::expected< void, TreeError > validate(DialogOptions options)
Node()=default
Empty observer; checked access fails.
Owning literal bytes or a resource key, measured only at resolution.
Definition text_value.hpp:42
constexpr TextValue(const TextValue &other)=default
Copy expression bytes and kind into independent storage.
Single-use owning construction recipe; no mounted widget ownership.
Definition ui_description.hpp:48
Description && reference(NodeRef< T > reference) &&
Definition ui_description.hpp:1251
Copyable weak UI-affine semantic handle; the scene owns all queue, action and timer storage....
Definition toast.hpp:311
Typed Widget observation; explicit composite specializations reuse their existing weak facades.
Definition ui_ref.hpp:761
Single-use lazy owner of one Application and ManagedScene; no second runtime. Construct and operate o...
Definition ui_scene.hpp:253
Owning catalog input; legacy factories run synchronously once per explicit preview attempt on UI....
Definition theme_selection.hpp:95
Weak UI-affine observation of one scene-owned selector view. Commands are checked only: they never re...
Definition theme_selector.hpp:82
Admit only consuming recipe arguments, rejecting implicit moves from lvalues.
Definition ui_recipe_context.hpp:71
Select the legacy factory signature before considering an Application borrow.
Definition ui_scene_recipes.hpp:43
Admit a declared dialog layer or an erased recipe checked after its existing factory runs.
Definition ui_recipe_context.hpp:82
DialogMode
Input policy applied by the managed dialog owner.
Definition dialog.hpp:15
@ NON_MODAL
Let input outside the panel reach the scene.
Definition dialog.hpp:17
@ MODAL
Confine input to the active modal layer.
Definition dialog.hpp:16
DialogPlacement
Preferred panel position within the owning host.
Definition dialog.hpp:21
Sparse native dialog geometry/input options, merged per leaf.
Definition ui_control_context.hpp:342
Sparse owning literal formatter settings; omitted strings preserve the receiving options.
Definition ui_control_context.hpp:183
Sparse native MessageBox options, preserving captured values and kind-specific checks.
Definition ui_control_context.hpp:252
Sparse immutable notification-center construction options; runtime posts stay code-owned.
Definition ui_control_context.hpp:318
Owning sparse literals only; never contains IDs, models, handlers or live history.
Definition ui_control_context.hpp:391
std::optional< TextValue > body
Owning native MessageBox paragraph expression.
Definition ui_control_context.hpp:454
ControlDialogSettings dialog
Native Dialog-only options, merged per leaf.
Definition ui_control_context.hpp:453
ControlMessageSettings message
Native MessageBox-only sparse options.
Definition ui_control_context.hpp:455
std::optional< TextValue > title
Owning Dialog caption expression; unspecified keeps the actual caption.
Definition ui_control_context.hpp:452
Constructor-only scalars for a real owning default catalog recipe.
Definition ui_control_context.hpp:299
Native ThemeSelector view settings, independent of model/catalog construction.
Definition ui_control_context.hpp:311
Owning exact Dialog stage; no title resolution occurs while staging.
Definition ui_dialogs.hpp:341
ControlSettings patch
Only title and the nine dialog leaves are staged by these helpers.
Definition ui_dialogs.hpp:344
friend Description< Dialog > operator|(Description< Dialog > &&description, DialogModifier modifier)
Definition ui_dialogs.hpp:349
Owning exact HelpView initial-open stage.
Definition ui_dialogs.hpp:495
friend Description< HelpView > operator|(Description< HelpView > &&description, HelpOpenModifier modifier)
Definition ui_dialogs.hpp:501
bool value
Initial open state.
Definition ui_dialogs.hpp:496
Owning sparse native help presentation stage.
Definition ui_dialogs.hpp:456
std::optional< std::string > unavailable
Optional literal unavailable presentation.
Definition ui_dialogs.hpp:459
std::optional< std::string > empty
Optional literal empty presentation.
Definition ui_dialogs.hpp:458
ControlKeyFormatSettings formatter
Sparse owning formatter leaves.
Definition ui_dialogs.hpp:457
Owning exact KeyHints literal strip stage.
Definition ui_dialogs.hpp:512
friend Description< KeyHints > operator|(Description< KeyHints > &&description, KeyHintsModifier modifier)
Definition ui_dialogs.hpp:521
std::optional< std::string > separator
Complete-entry separator.
Definition ui_dialogs.hpp:515
std::optional< std::string > overflow
Nonempty overflow marker.
Definition ui_dialogs.hpp:516
Owning MessageBox-only stage, checked against actual native capability at preparation.
Definition ui_dialogs.hpp:359
bool options
Distinguish an explicit empty message group from a body stage.
Definition ui_dialogs.hpp:363
ControlSettings patch
Owning body and grouped native message options.
Definition ui_dialogs.hpp:362
friend Description< Dialog > operator|(Description< Dialog > &&description, MessageModifier modifier)
Definition ui_dialogs.hpp:368
Immutable settings for a ready-made modal choice dialog.
Definition message_box.hpp:90
Sparse immutable native notification-center construction stage.
Definition ui_dialogs.hpp:583
ControlNotificationSettings patch
Numeric/native enum literals only; no runtime resolver is added.
Definition ui_dialogs.hpp:584
friend Description< Overlay > operator|(Description< Overlay > &&description, NotificationModifier modifier)
Definition ui_dialogs.hpp:589
Exact host stage; does not opt into ordinary Overlay layout modifiers.
Definition ui_dialogs.hpp:324
std::size_t value
Positive layer-registration cap, including hidden layers.
Definition ui_dialogs.hpp:325
friend Description< OverlayHost > operator|(Description< OverlayHost > &&description, OverlayHostModifier modifier)
Definition ui_dialogs.hpp:330
Policies for one lazy facade over the existing managed runtime.
Definition ui_scene.hpp:17
Constructor-only stage for a real owning default-catalog selector.
Definition ui_dialogs.hpp:543
friend Description< Dialog > operator|(Description< Dialog > &&description, ThemeCatalogModifier modifier)
Definition ui_dialogs.hpp:551
ControlThemeCatalogSettings patch
Owning sparse admission and startup inputs.
Definition ui_dialogs.hpp:545
Finite normalization budgets and optional first-preview layer admission.
Definition theme_selection.hpp:77
Advanced owning catalog settings for a selector with its scene-owned default model....
Definition theme_selector.hpp:70
Sparse native ThemeSelector view stage; model/catalog inputs remain code-owned.
Definition ui_dialogs.hpp:564
ControlThemeSelectorSettings patch
Owning captions, limits and optional shortcut.
Definition ui_dialogs.hpp:567
friend Description< Dialog > operator|(Description< Dialog > &&description, ThemeSelectorModifier modifier)
Definition ui_dialogs.hpp:572
Owning selector captions, established dialog settings and optional application delivery.
Definition theme_selector.hpp:44
static Description< Overlay > notificationControl(Description< Overlay > description)
Definition ui_description.hpp:3356
static Description< T > withLayout(Description< T > description, std::shared_ptr< RecipeLayout > layout)
Definition ui_description.hpp:3229
static std::expected< Node< T >, ManagedError > mount(Description< T > &&description, ManagedScene &scene, Node< Widget > parent, MountContext &context)
Mount a root or child inside the same transaction.
Definition ui_description.hpp:3560
static std::expected< Node< OverlayHost >, ManagedError > layerHost(ManagedScene &scene, Node< Widget > root)
static std::shared_ptr< RecipeLayout > captureLayouts(Children &...children)
Definition ui_description.hpp:3202
static void preparedDialogHeading(Description< Label > &description, const TextValue &title)
Definition ui_description.hpp:3302
static std::expected< void, ManagedError > checkLayer(ManagedScene &scene, Node< Widget > node)
static Description< T > configuredControl(Description< T > description, std::string_view type, bool inherit=true)
Attach a builtin configuration identity to an owning recipe.
Definition ui_description.hpp:3409
static Description< Widget > erase(Description< T > description)
Erase only the observer type while preserving one mount transaction.
Definition ui_description.hpp:3534
static Description< Widget > transaction(Factory factory)
Definition ui_description.hpp:3489
Recognize an owning recipe after cv/ref normalization.
Definition ui_recipe_context.hpp:35
Stack-owned transaction bookkeeping, discarded after one description mount.
Definition ui_recipe_context.hpp:554
static Application & application(ManagedScene &owner) noexcept
Definition ui_scene.hpp:1168