|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
Scoped action/model ownership on the tree UI thread, outside frames. Tree, router and scheduler outlive the binding. Admitted operations retain their state across callback removal. Deferred drafts retain their baseline revision and never overwrite external changes. No operation exposes an ordinary text draft or history. More...
#include <password.hpp>
Public Member Functions | |
| ~PasswordBinding () | |
| Disconnect future actions/subscriptions; admitted callbacks retain owners. | |
| PasswordBinding (PasswordBinding &&other) noexcept | |
| PasswordBinding & | operator= (PasswordBinding &&other) noexcept |
| PasswordBinding (const PasswordBinding &)=delete | |
| PasswordBinding & | operator= (const PasswordBinding &)=delete |
| std::expected< void, PasswordFailure > | sync (Node< Widget > focused) |
| std::expected< PasswordResult, PasswordFailure > | confirm () |
| std::expected< PasswordResult, PasswordFailure > | cancel () |
| std::expected< PasswordResult, PasswordFailure > | setValue (PasswordValue value) |
Friends | |
| class | ManagedScene |
| struct | ui::detail::RefAccess |
| std::expected< PasswordBinding, PasswordFailure > | bindPassword (WidgetTree &tree, EventRouter &router, Node< Password > node, std::shared_ptr< Property< PasswordValue > > model, std::function< void(PasswordResult)> onResult, std::shared_ptr< Clipboard > clipboard={}, std::function< bool(SecretView)> validate={}) |
| Bind and securely inspect the initial model before publishing presentation. | |
Scoped action/model ownership on the tree UI thread, outside frames. Tree, router and scheduler outlive the binding. Admitted operations retain their state across callback removal. Deferred drafts retain their baseline revision and never overwrite external changes. No operation exposes an ordinary text draft or history.
|
noexcept |
| other | Binding emptied by ownership transfer on UI. |
| std::expected< PasswordResult, PasswordFailure > portals::PasswordBinding::cancel | ( | ) |
| std::expected< PasswordResult, PasswordFailure > portals::PasswordBinding::confirm | ( | ) |
|
noexcept |
| other | Replacement installed before retiring reentrant old captures. |
| std::expected< PasswordResult, PasswordFailure > portals::PasswordBinding::setValue | ( | PasswordValue | value | ) |
| value | Protected candidate retained by identity, checked against this editor's policy. |
| std::expected< void, PasswordFailure > portals::PasswordBinding::sync | ( | Node< Widget > | focused | ) |
| focused | Current router focus; empty means no focus. |
|
friend |
Bind and securely inspect the initial model before publishing presentation.
| tree | Borrowed UI owner, outliving binding and model. |
| router | Borrowed router for tree, outliving binding. |
| node | Live protected editor; one action binding per node is permitted. |
| model | Shared protected model owner; external replacements are checked before input. |
| onResult | Required owning UI callback; may remove this node or binding. |
| clipboard | Optional shared service, called only with explicit ENABLED paste policy. |
| validate | Optional owning semantic validator, borrowing plaintext synchronously; false retains the draft. |