Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::StatusBar Class Reference

Ordinary horizontal status sections with a full-allocation background. Children retain their existing layout, text and input contracts. The bar is not a focus stop and has no message timer. Managed scenes synchronize eligibility; low-level callers call syncStatusBar before painting after eligibility changes. More...

#include <status_bar.hpp>

Inheritance diagram for portals::StatusBar:
portals::StatusBarportals::StatusBar portals::Row portals::LinearLayout portals::SizedWidget portals::Layout portals::Widget portals::LayoutItem

Public Member Functions

 StatusBar (LinearOptions options={}, ControlStyle style={}, SizePolicy policy=DEFAULT_STATUS_BAR_POLICY)
std::expected< void, TreeError > arrange (CellRect local) override
std::expected< void, TreeError > paint (PaintContext &context) override
ComputedStyle styleDefaults () const override
Public Member Functions inherited from portals::Row
 Row (LinearOptions options={}, SizePolicy policy={})
 Own settings and policies.
Public Member Functions inherited from portals::LinearLayout
std::expected< CellSize, TreeError > childAvailable (CellSize available) const override
 Checked inset extent.
std::expected< CellSize, TreeError > measureChildren (std::span< const MeasuredChild > children) const override
 Checked sum/max.
std::expected< std::vector< CellRect >, TreeError > arrangeChildren (std::span< const MeasuredChild > children, CellSize available) const override
 Deterministic bounded solve.
LinearOptions options () const
 Owning copy; no invalidation.
bool horizontal () const
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 std::expected< CellSize, TreeError > measure (CellSize available)
 Default desired size is empty.
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< CellRect, TreeError > childClip (CellSize available) const
 Clip descendants within this container without changing allocation.
virtual std::expected< LayoutChildPolicy, TreeError > childLayoutFor (NodeId child, CellSize available) const
 Describe one child's clip and reveal policy after arrangeChildren.

Friends

std::expected< void, TreeError > syncStatusBar (WidgetTree &tree, Node< StatusBar > node)
 Synchronize the bar's own disabled appearance between frames on UI.

Additional Inherited Members

Protected Member Functions inherited from portals::LinearLayout
 LinearLayout (bool horizontal, LinearOptions options, SizePolicy policy)
 Initialize axis and owning settings.

Detailed Description

Ordinary horizontal status sections with a full-allocation background. Children retain their existing layout, text and input contracts. The bar is not a focus stop and has no message timer. Managed scenes synchronize eligibility; low-level callers call syncStatusBar before painting after eligibility changes.

Constructor & Destructor Documentation

◆ StatusBar()

portals::StatusBar::StatusBar ( LinearOptions options = {},
ControlStyle style = {},
SizePolicy policy = DEFAULT_STATUS_BAR_POLICY )
explicit
Parameters
optionsOwning ordinary Row gap, padding, alignment and overflow settings.
styleConstruction-only presentation defaults beneath the theme.
policyOwning cell sizing; default fills width and requests one row.

Member Function Documentation

◆ arrange()

std::expected< void, TreeError > portals::StatusBar::arrange ( CellRect local)
overridevirtual
Parameters
localParent-relative allocation; only its checked extent is retained.
Returns
Success or INVALID_GEOMETRY for an unrepresentable local extent.

Reimplemented from portals::Widget.

◆ paint()

std::expected< void, TreeError > portals::StatusBar::paint ( PaintContext & context)
overridevirtual
Parameters
contextSynchronous borrowed sink; no context or command escapes this call.
Returns
The sink's unchanged result after one local fill command.

Reimplemented from portals::Widget.

◆ styleDefaults()

ComputedStyle portals::StatusBar::styleDefaults ( ) const
overridevirtual
Returns
Owning manual normal/focused/disabled defaults beneath stylesheet declarations.

Reimplemented from portals::Widget.

◆ syncStatusBar

std::expected< void, TreeError > syncStatusBar ( WidgetTree & tree,
Node< StatusBar > node )
friend

Synchronize the bar's own disabled appearance between frames on UI.

Parameters
treeOwning live tree, borrowed synchronously.
nodeLive observing bar identity in that tree.
Returns
Existing checked tree errors; changed eligibility invalidates paint before publication.

The documentation for this class was generated from the following file: