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

Copyable read-only source observing one caption, visible draft or accepted editor model. Construction and copying do not read, subscribe or retain the scene/widget. Operations are UI-affine; an unpublished source returns CLOSED, and removal preserves the original stale node identity. Caption factories can attach a live observation; snapshot() remains independent. No remount retargeting occurs. More...

#include <ui_ref.hpp>

Public Member Functions

std::expected< GraphemeText, ManagedError > snapshot () const

Friends

template<class T>
class Ref
class portals::ManagedScene
struct detail::Access
class TextProperty

Detailed Description

Copyable read-only source observing one caption, visible draft or accepted editor model. Construction and copying do not read, subscribe or retain the scene/widget. Operations are UI-affine; an unpublished source returns CLOSED, and removal preserves the original stale node identity. Caption factories can attach a live observation; snapshot() remains independent. No remount retargeting occurs.

Member Function Documentation

◆ snapshot()

std::expected< GraphemeText, ManagedError > portals::ui::TextSource::snapshot ( ) const
Returns
Owning text snapshot or the original typed availability/text failure, without reporting. Accepted editor values are read from the latest model, even while a dirty/conflicted draft differs. Model bytes are validated under the editor's width policy and limits; malformed values remain errors.

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