Copyable observing text property; copies own their resolver and last-operation result. Mutation is UI-affine, outside frames/preparation and nested text mutations. Caption changes use setControlText; editor changes accept a draft and apply its configured EditMode confirmation rules. Every rejected mutation preserves its target value and reports to the live scene collector on UI. WRONG_THREAD and an absent/destroyed scene are observable through result(), without unsafe reporting. Within an entered UI setup scope, even an unavailable target failure stops that setup after the callback returns. It never notifies a foreign owner; outside setup, existing runtime recovery remains unchanged. Each successful operation stands independently; a later failure does not roll back earlier changes. Methods return an owning proxy value so chains and saved results never borrow a temporary proxy. Resolver capture construction can throw before entry. Internally allocation/extension exceptions are translated to typed errors. Copy/move/assignment of this proxy may allocate in standard error storage.
More...
#include <ui_ref.hpp>
|
|
template<class T> |
| class | Ref |
|
class | DynamicRef |
|
struct | detail::RefAccess |
|
class | TextResult |
Copyable observing text property; copies own their resolver and last-operation result. Mutation is UI-affine, outside frames/preparation and nested text mutations. Caption changes use setControlText; editor changes accept a draft and apply its configured EditMode confirmation rules. Every rejected mutation preserves its target value and reports to the live scene collector on UI. WRONG_THREAD and an absent/destroyed scene are observable through result(), without unsafe reporting. Within an entered UI setup scope, even an unavailable target failure stops that setup after the callback returns. It never notifies a foreign owner; outside setup, existing runtime recovery remains unchanged. Each successful operation stands independently; a later failure does not roll back earlier changes. Methods return an owning proxy value so chains and saved results never borrow a temporary proxy. Resolver capture construction can throw before entry. Internally allocation/extension exceptions are translated to typed errors. Copy/move/assignment of this proxy may allocate in standard error storage.
◆ TextProperty() [1/2]
| portals::ui::TextProperty::TextProperty |
( |
const TextProperty & | other | ) |
|
|
default |
- Parameters
-
| other | Observing proxy copied without reading or changing a widget; errors/resolver are copied too. |
◆ TextProperty() [2/2]
| portals::ui::TextProperty::TextProperty |
( |
TextProperty && | other | ) |
|
|
default |
- Parameters
-
| other | Proxy transferred without reading or changing a widget; its source becomes empty. |
◆ append() [1/2]
| TextProperty portals::ui::TextProperty::append |
( |
const TextValue & | value, |
|
|
std::source_location | origin = std::source_location::current() ) |
- Parameters
-
| value | Owning literal/format/key expression, resolved once synchronously when required. |
| origin | Mutation call site retained in diagnostics. |
- Returns
- Owning proxy with the exact result; failure preserves the complete old caption/draft.
◆ append() [2/2]
| TextProperty portals::ui::TextProperty::append |
( |
std::string_view | value, |
|
|
std::source_location | origin = std::source_location::current() ) |
- Parameters
-
| value | Bytes appended to the complete current caption/draft, without selection replacement. |
| origin | Mutation call site retained in diagnostics. |
- Returns
- Owning proxy; the entire candidate is resegmented and validated before mutation.
◆ get()
| std::expected< std::string, ManagedError > portals::ui::TextProperty::get |
( |
| ) |
const |
Copy validated UTF-8 text out of the live widget without retaining its storage.
- Returns
- Owning bytes, or typed affinity/liveness/reentry/allocation error; does not report errors.
◆ operator+() [1/4]
| TextResult portals::ui::TextProperty::operator+ |
( |
const TextProperty & | value | ) |
const |
- Parameters
-
| value | Second property read synchronously without changing either source. |
- Returns
- Owning result under this property's width policy and default TextLimits, or original typed error.
◆ operator+() [2/4]
| TextResult portals::ui::TextProperty::operator+ |
( |
const TextResult & | value | ) |
const |
- Parameters
-
| value | Owning concatenation, read only during this call. |
- Returns
- Owning result under this property's policy, or the first unchanged typed error.
◆ operator+() [3/4]
| TextResult portals::ui::TextProperty::operator+ |
( |
const TextValue & | value | ) |
const |
- Parameters
-
| value | Owning expression resolved with this proxy's explicit resolver when required. |
- Returns
- Owning result or typed failure; no source mutation occurs.
◆ operator+() [4/4]
| TextResult portals::ui::TextProperty::operator+ |
( |
std::string_view | value | ) |
const |
- Parameters
-
| value | Literal suffix copied now, with full boundary resegmentation. |
- Returns
- Owning result or typed failure; no mutation, invalidation or automatic reporting occurs.
◆ operator+=() [1/3]
| TextProperty portals::ui::TextProperty::operator+= |
( |
const TextResult & | value | ) |
|
- Parameters
-
| value | Owning concatenation, whose successful bytes are appended and revalidated by the receiver. |
- Returns
- Owning proxy; source errors preserve the target and are reported with the concatenation origin.
◆ operator+=() [2/3]
- Parameters
-
| value | Owning suffix expression. |
- Returns
- Owning proxy with the same contract as append; diagnostics use the text() call site.
◆ operator+=() [3/3]
| TextProperty portals::ui::TextProperty::operator+= |
( |
std::string_view | value | ) |
|
- Parameters
-
| value | Literal suffix, copied only during this call. |
- Returns
- Owning proxy with the same contract as append; diagnostics use the text() call site.
◆ operator=() [1/4]
- Parameters
-
| value | Property read into an owning snapshot before replacing this proxy's target value. |
- Returns
- Owning proxy after value assignment; copying observations uses the copy constructor instead.
◆ operator=() [2/4]
| TextProperty portals::ui::TextProperty::operator= |
( |
const TextResult & | value | ) |
|
- Parameters
-
| value | Owning concatenation; a failed source preserves its typed cause and original node identity. |
- Returns
- Owning proxy after replacement; the receiver revalidates successful bytes with its own policy/limits.
◆ operator=() [3/4]
- Parameters
-
| value | Owning replacement expression. |
- Returns
- Owning proxy with the same contract as set; diagnostics use the text() call site.
◆ operator=() [4/4]
| TextProperty portals::ui::TextProperty::operator= |
( |
std::string_view | value | ) |
|
- Parameters
-
| value | Literal replacement, copied only during this call. |
- Returns
- Owning proxy with the same contract as set; diagnostics use the text() call site.
◆ result()
| std::expected< void, ManagedError > portals::ui::TextProperty::result |
( |
| ) |
const |
Inspect the last mutation of this particular proxy; newly created proxies have success.
- Returns
- Success or exact text-acceptance failure; no scene/widget access is performed. Copies preserve internal short-report provenance for same-collector configure/setup deduplication. Editor validation/publication outcomes use its LineEditResult callback, including accepted invalid drafts.
◆ set() [1/2]
| TextProperty portals::ui::TextProperty::set |
( |
const TextValue & | value, |
|
|
std::source_location | origin = std::source_location::current() ) |
- Parameters
-
| value | Owning literal/format/key expression copied before invoking the optional resolver. |
| origin | Mutation call site retained in diagnostics. |
- Returns
- Owning proxy for chaining; missing resolver or invalid resolved text preserves the old value.
◆ set() [2/2]
| TextProperty portals::ui::TextProperty::set |
( |
std::string_view | value, |
|
|
std::source_location | origin = std::source_location::current() ) |
- Parameters
-
| value | Bytes copied during this call; validation uses the receiving widget's width policy/limits. |
| origin | Mutation call site retained in diagnostics. |
- Returns
- Owning proxy for chaining, with this operation's result. Equal text is a no-op.
◆ source()
| TextSource portals::ui::TextProperty::source |
( |
| ) |
const |
|
inline |
- Returns
- Deferred visible-text identity for a caption factory; does not read or subscribe. Assignment between TextProperty values still copies once rather than creating a binding.
The documentation for this class was generated from the following file: