Portals 0.7.0 · dev0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::Gauge Class Reference
Noninteractive horizontal determinate gauge with widget-owned fill text. Paint has no owning allocation or polling; text remains alive until the enclosing frame ends. Value mutations are UI-only and use checked tree operations or existing onPrepare callbacks. Manual style defaults are construction-only; dynamic styling uses the existing style resolver.
More...
Noninteractive horizontal determinate gauge with widget-owned fill text. Paint has no owning allocation or polling; text remains alive until the enclosing frame ends. Value mutations are UI-only and use checked tree operations or existing onPrepare callbacks. Manual style defaults are construction-only; dynamic styling uses the existing style resolver.
Owning layout constraints, checked by the existing solver. Construction may allocate or throw for an invalid width policy; tree emplacement translates exceptions.
Finite replacement in the inclusive range; equal values are a no-op.
Returns
Success, or INVALID_ARGUMENT without mutation. This snapshot helper does not invalidate; use setGaugeValue between frames, or call display from an already dirty onPrepare callback.
Synchronous sink borrowing widget-owned glyph text through this frame.
Returns
Success, INVALID_ARGUMENT, WOULD_BLOCK above the allocated-area cap before submit, or unchanged sink error. Sink exceptions propagate to the existing WidgetTree::paint boundary; discard a failed frame.
Borrowed UI owner; mutation is allowed only between frames.
node
Live gauge belonging to tree.
delta
Finite amount added to the current value without clamping.
Returns
Checked boundary/value error, or success. Nonfinite/out-of-range results preserve state; unchanged results request no redraw, other changes invalidate PAINT before publication.