6#include <portals/grid.hpp>
7#include <portals/primitives.hpp>
83 std::expected<CellSize, TreeError>
measureChildren(std::span<const MeasuredChild> children)
const override;
92 friend struct detail::DialogAccess;
119 std::expected<CellSize, TreeError>
measureChildren(std::span<const MeasuredChild> children)
const override;
128 friend struct detail::DialogAccess;
130 std::optional<CellRect> anchor_;
std::expected< CellSize, TreeError > measureChildren(std::span< const MeasuredChild > children) const override
std::expected< std::vector< CellRect >, TreeError > arrangeChildren(std::span< const MeasuredChild > children, CellSize available) const override
static std::expected< void, TreeError > validate(DialogOptions options)
DialogOptions options() const
std::expected< CellSize, TreeError > childAvailable(CellSize available) const override
Dialog(DialogOptions options={})
Pure container interface; callbacks run inside tree.read and an enclosing tree.frame....
Definition layout.hpp:130
OverlayHost(OverlayHostOptions options={}, SizePolicy policy={})
std::expected< std::vector< CellRect >, TreeError > arrangeChildren(std::span< const MeasuredChild > children, CellSize available) const override
OverlayHostOptions hostOptions() const
std::expected< CellSize, TreeError > measureChildren(std::span< const MeasuredChild > children) const override
std::expected< CellSize, TreeError > childAvailable(CellSize available) const override
OverlayOptions options() const
Owning UI-thread copy.
Overlay(OverlayOptions options={}, SizePolicy policy={})
Own settings and size policies.
Public Portals API.
Definition action.hpp:8
@ CANCEL
Cancel the current interaction.
Definition action.hpp:12
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
DialogDismissReason
Generic dismissal cause, independent of application results.
Definition dialog.hpp:28
@ PROGRAMMATIC
Explicit semantic action, the default for caller-created ActionEvent.
Definition action.hpp:25
DialogPlacement
Preferred panel position within the owning host.
Definition dialog.hpp:21
@ ABOVE_START
Prefer above the body anchor, aligned to its leading edge.
Definition dialog.hpp:24
@ CENTER
Center in the usable viewport, rounding down.
Definition dialog.hpp:22
@ BELOW_START
Prefer below the body anchor, aligned to its leading edge.
Definition dialog.hpp:23
DialogClosePlacement
Which top-frame segment owns the close affordance.
Definition dialog.hpp:34
@ START
Immediately after the leading corner.
Definition dialog.hpp:35
@ END
Immediately before the trailing corner.
Definition dialog.hpp:36
TreeError
Checked tree failures; rejected operations never start the requested callback.
Definition widget_types.hpp:26
Owning frame decoration and finite paint-work policy.
Definition primitives.hpp:27
An owning available extent in terminal columns/rows.
Definition geometry.hpp:44
Optional finite close chrome settings; the glyph occupies three terminal cells.
Definition dialog.hpp:40
DialogClosePlacement placement
Top-edge placement.
Definition dialog.hpp:42
bool focusable
Include in focus traversal; initial action focus is unchanged.
Definition dialog.hpp:43
bool enabled
Enable this explicitly requested close affordance.
Definition dialog.hpp:41
Owning panel geometry and managed input settings, in terminal cells.
Definition dialog.hpp:52
bool closeOnEscape
Allow managed cancellation with Escape.
Definition dialog.hpp:58
std::int32_t anchorGap
Nonnegative distance from the anchor.
Definition dialog.hpp:57
DialogCloseOptions closeButton
Opt-in close chrome on the top frame edge.
Definition dialog.hpp:60
BorderOptions frame
Frame glyph policy and allocated opaque-area paint cap.
Definition dialog.hpp:59
std::int32_t viewportMargin
Nonnegative inset, reduced on tiny viewports.
Definition dialog.hpp:56
DialogPlacement placement
Preferred placement; anchors belong to the host body.
Definition dialog.hpp:54
CellSize maximumPanelSize
Strictly positive independent width and height caps.
Definition dialog.hpp:55
DialogMode mode
Modal input confinement by default.
Definition dialog.hpp:53
Owning identity, independent of addresses; zero is never a live identity.
Definition widget_types.hpp:15
Owning registration budget for a single scene overlay host.
Definition dialog.hpp:47
std::size_t maxLayers
Positive cap on registered layers, including hidden layers.
Definition dialog.hpp:48
Owning independent policies for width and height.
Definition layout.hpp:35