|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Frame using the existing vertical LinearLayout with one-cell insets for each present side. Paint borrows only widget-owned glyphs until the enclosing tree.frame ends. The inner child clip prevents fixed/minimum-size children from painting or receiving input on edges. Manual style defaults are construction-only; dynamic styling uses the existing style resolver. No I/O, timer, retained command storage or allocation occurs inside paint itself. More...
#include <primitives.hpp>
Public Member Functions | |
| Border (WidthPolicy width={}, BorderOptions options={}, ControlStyle style={}, SizePolicy policy={}) | |
| Border (WidthPolicy width, FrameOptions options, ControlStyle style, SizePolicy policy, std::in_place_t advanced) | |
| std::expected< CellSize, TreeError > | measure (CellSize available) override |
| std::expected< CellSize, TreeError > | childAvailable (CellSize available) const override |
| std::expected< std::vector< CellRect >, TreeError > | arrangeChildren (std::span< const MeasuredChild > children, CellSize available) const override |
| std::expected< CellSize, TreeError > | measureChildren (std::span< const MeasuredChild > children) const override |
| std::expected< void, TreeError > | arrange (CellRect local) override |
| std::expected< CellRect, TreeError > | childClip (CellSize available) const override |
| std::expected< void, TreeError > | paint (PaintContext &context) override |
| ComputedStyle | styleDefaults () const override |
| std::expected< void, TreeError > | preparation () const noexcept |
| Public Member Functions inherited from portals::SizedWidget | |
| SizedWidget (SizePolicy policy={}) | |
| Own the supplied policies; checked by layout. | |
| SizePolicy | sizePolicy () const override |
| Copy current policy without borrowing storage. | |
| Public Member Functions inherited from portals::Widget | |
| virtual | ~Widget ()=default |
| Destroy on UI after the last active tree borrow. | |
| virtual void | mount () |
| Called exactly once after attachment; exceptions are reported. | |
| virtual void | unmount () |
| Called once before destruction, children first; cleanup continues on exceptions. | |
| virtual bool | styleReadOnly () const noexcept |
| Read actual view-only state during style staging; false by default. | |
| const std::shared_ptr< const StyleSnapshot > & | computedStyle () const noexcept |
| Inspect the last atomically installed theme inside tree.read/frame. | |
| std::uint64_t | styleRevision () const noexcept |
| Public Member Functions inherited from portals::LayoutItem | |
| virtual | ~LayoutItem ()=default |
| Destroy with the implementing widget. | |
| Public Member Functions inherited from portals::Layout | |
| virtual | ~Layout ()=default |
| Destroy with the implementing widget. | |
| virtual std::expected< LayoutChildPolicy, TreeError > | childLayoutFor (NodeId child, CellSize available) const |
| Describe one child's clip and reveal policy after arrangeChildren. | |
Static Public Member Functions | |
| static std::expected< void, TreeError > | validate (BorderOptions options) |
| static std::expected< void, TreeError > | validateFrame (const FrameOptions &options) noexcept |
Friends | |
| struct | detail::GlyphProfileAccess |
| std::expected< void, TreeError > | syncBorder (WidgetTree &tree, Node< Border > node) |
| std::expected< void, TreeError > | syncBorder (WidgetTree &tree, Node< Border > node, Node< Widget > focused) |
| std::expected< void, TreeError > | setBorderTitle (WidgetTree &tree, Node< Border > node, const GraphemeText &title) |
| Replace a frame title through the existing checked tree mutation boundary. | |
Frame using the existing vertical LinearLayout with one-cell insets for each present side. Paint borrows only widget-owned glyphs until the enclosing tree.frame ends. The inner child clip prevents fixed/minimum-size children from painting or receiving input on edges. Manual style defaults are construction-only; dynamic styling uses the existing style resolver. No I/O, timer, retained command storage or allocation occurs inside paint itself.
|
explicit |
| width | Complete owning text policy, shared with the receiving frame. |
| options | Owning glyph mode and finite paint cap; checked by measure/paint. |
| style | Construction-only owning manual normal/focused/disabled defaults beneath theme rules. |
| policy | Owning size constraints, checked by the existing layout solver. Construction may allocate; tree emplacement translates allocation failures. preparation() reports invalid text policy. |
| portals::Border::Border | ( | WidthPolicy | width, |
| FrameOptions | options, | ||
| ControlStyle | style, | ||
| SizePolicy | policy, | ||
| std::in_place_t | advanced ) |
| width | Complete receiving text-width policy. |
| options | Owning advanced frame appearance and finite construction/paint limits. |
| style | Construction-only manual style defaults. |
| policy | Owning size constraints checked by the existing solver. |
| advanced | Explicit tag preserving unambiguous legacy brace-initialized calls. Text compilation precedes painting; preparation() reports semantic errors without throwing. |
| local | Parent-local allocation; only its extent is retained. |
Reimplemented from portals::Widget.
|
overridevirtual |
| children | Visible child measurements and policies, borrowed only during placement. |
| available | Allocated outer extent in cells. |
Implements portals::Layout.
|
overridevirtual |
| available | Allocated outer extent offered by the parent, in cells. |
Implements portals::Layout.
|
overridevirtual |
| available | Allocated normalized outer extent in cells. |
Reimplemented from portals::Layout.
| available | Offered extent; titles do not enlarge intrinsic frame width. |
Reimplemented from portals::Widget.
|
overridevirtual |
| children | Visible child measurements and policies, borrowed only for this calculation. |
Implements portals::Layout.
|
overridevirtual |
| context | Synchronous sink; borrowed glyph text remains widget-owned through this frame. |
Reimplemented from portals::Widget.
|
noexcept |
|
overridevirtual |
Reimplemented from portals::Widget.
|
static |
| options | Owning settings to validate without allocation or mutation. |
|
staticnoexcept |
| options | Borrowed owning settings; no text segmentation or allocation occurs. |
|
friend |
Replace a frame title through the existing checked tree mutation boundary.
| tree | Borrowed UI owner, between frames. |
| node | Live passive frame, without changing its size policy or title decoration. |
| title | Validated text borrowed only during this call, using this frame's width policy. |
|
friend |
| tree | Borrowed UI owner, between frames. |
| node | Live frame whose input eligibility is copied for disabled presentation; focus projection is cleared. |
|
friend |
| tree | Borrowed UI owner; synchronization is allowed only between frames. |
| node | Live frame receiving disabled/focused/normal presentation without becoming a focus target. |
| focused | Empty observer, this frame, or another live node in tree; descendants project focused appearance. |