5#include <portals/combo_box.hpp>
6#include <portals/detail/dialog_command_result.hpp>
7#include <portals/detail/quit_command.hpp>
8#include <portals/document_view.hpp>
9#include <portals/find_bar.hpp>
10#include <portals/form_field.hpp>
11#include <portals/help_view.hpp>
12#include <portals/managed.hpp>
13#include <portals/text_value.hpp>
14#include <portals/ui_delivery.hpp>
24namespace portals::ui {
29template <
class T>
class Ref;
30template <
class T>
class Model;
41void reportCaptionModelError(
const std::shared_ptr<RefTarget> &target, ManagedError &failure,
42 std::source_location origin,
const char *control)
noexcept;
52 std::string
name = std::string(0,
'\0');
59using LookupPublisher =
66std::expected<void, ManagedError> requestLookup(
const LookupSource &source, LookupPublisher publish);
72 const std::thread::id
owner = std::this_thread::get_id();
77 std::shared_ptr<const ManagedError>
failure;
82std::expected<void, ManagedError> setLogModel(
const std::shared_ptr<RefTarget> &target,
Node<LogView> node,
83 const LogSource &source, std::source_location origin);
85std::expected<void, ManagedError> setDocumentModel(
const std::shared_ptr<RefTarget> &,
Node<DocumentView>,
87std::expected<void, ManagedError> seekDocument(
const std::shared_ptr<RefTarget> &,
Node<DocumentView>, std::uint64_t,
88 bool, std::source_location);
89std::expected<void, ManagedError> navigateDocument(
const std::shared_ptr<RefTarget> &,
91 portals::detail::DocumentNavigation, std::int64_t,
92 std::source_location);
93std::expected<void, ManagedError> documentSyntax(
const std::shared_ptr<RefTarget> &,
Node<DocumentView>,
95std::expected<DocumentViewStatus, ManagedError> documentStatus(
const std::shared_ptr<RefTarget> &,
Node<DocumentView>);
97 std::source_location);
98std::expected<void, ManagedError> documentLanguage(
const std::shared_ptr<RefTarget> &,
Node<DocumentView>,
100std::expected<void, ManagedError> documentHexOptions(
const std::shared_ptr<RefTarget> &,
Node<DocumentView>,
102std::expected<void, ManagedError> documentLineNumbers(
const std::shared_ptr<RefTarget> &,
104 std::source_location);
106std::expected<bool, ManagedError> checkedValue(std::shared_ptr<RefTarget> target,
108std::expected<PropertyUpdate<bool>,
ManagedError> setChecked(std::shared_ptr<RefTarget> target,
110 std::source_location origin);
111std::expected<PropertyUpdate<bool>,
ManagedError> failedChecked(std::shared_ptr<RefTarget> target,
ManagedError failure,
112 std::source_location origin);
113using DeliveryCallback = std::function<std::expected<void, TreeError>(std::shared_ptr<const void>)>;
114std::expected<Publisher<portals::detail::UiDeliveryEnvelope>,
ManagedError>
115connectDelivery(
const std::shared_ptr<RefTarget> &target, DeliveryCallback callback, std::source_location origin);
116EditorCommandResult activateButton(
const std::shared_ptr<RefTarget> &target, std::source_location origin);
122std::expected<void, ManagedError> gaugeValue(std::shared_ptr<RefTarget> target, std::shared_ptr<
const Node<Gauge>> node,
123 double value,
bool relative, std::source_location origin);
124std::expected<double, ManagedError> numericValue(
const std::shared_ptr<RefTarget> &,
126std::expected<PropertyUpdate<NumericValue>,
ManagedError> numericValue(
const std::shared_ptr<RefTarget> &,
128 double, std::source_location);
129std::expected<double, ManagedError> spinBoxValue(
const std::shared_ptr<RefTarget> &,
131std::expected<SpinBoxResult, ManagedError> spinBoxValue(
const std::shared_ptr<RefTarget> &,
133 std::source_location);
135std::expected<FieldValidation, ManagedError> fieldValidation(
const std::shared_ptr<RefTarget> &target);
139std::expected<RadioGroupValue, ManagedError> radioValue(
const std::shared_ptr<RefTarget> &target,
145std::expected<PropertyUpdate<RadioGroupValue>,
ManagedError> radioSelect(
const std::shared_ptr<RefTarget> &target,
147 std::optional<RowId>
id,
148 std::source_location origin);
149Ref<LineEdit> fieldEditor(
const std::shared_ptr<RefTarget> &target);
150std::expected<bool, ManagedError> validateField(
const std::shared_ptr<RefTarget> &target);
151std::expected<void, ManagedError> displayField(
const std::shared_ptr<RefTarget> &target,
FieldValidation value);
152Ref<LineEdit> findEditor(
const std::shared_ptr<RefTarget> &target);
153Ref<LineEdit> choiceEditor(
const std::shared_ptr<RefTarget> &target);
154std::expected<ChoiceSelection, ManagedError> choiceSelection(
const std::shared_ptr<RefTarget> &target);
155std::expected<bool, ManagedError> choiceOpened(
const std::shared_ptr<RefTarget> &target);
156std::expected<void, ManagedError> choiceOpen(
const std::shared_ptr<RefTarget> &,
bool, std::source_location);
157std::expected<void, ManagedError> choiceSelect(
const std::shared_ptr<RefTarget> &, std::uint64_t, std::source_location);
158std::expected<void, ManagedError> choiceSelect(
const std::shared_ptr<RefTarget> &,
ChoiceSelection,
159 std::source_location);
160std::expected<void, ManagedError> choiceClear(
const std::shared_ptr<RefTarget> &, std::source_location);
161std::expected<FindMatch, ManagedError> findNavigate(
const std::shared_ptr<RefTarget> &target,
FindDirection direction);
162std::expected<FindMatch, ManagedError> findMatch(
const std::shared_ptr<RefTarget> &target);
163std::expected<bool, ManagedError> findCurrent(
const std::shared_ptr<RefTarget> &target,
const FindMatch &match);
164std::expected<void, ManagedError> findDocument(
const std::shared_ptr<RefTarget> &target, std::string_view document);
165EditorCommandResult findClear(
const std::shared_ptr<RefTarget> &target, std::source_location origin);
167 std::source_location origin);
179std::expected<void, TreeError> displayDataState(std::shared_ptr<RefTarget> target,
DataPresentation value,
180 std::source_location origin);
190EditorCommandResult editorCommand(std::shared_ptr<RefTarget> target,
bool redo,
bool stop, std::source_location origin,
196std::expected<HistoryAvailability, TreeError> editorAvailability(std::shared_ptr<RefTarget> target);
201std::expected<ManagedScene *, ManagedError> eventScene(
const std::shared_ptr<RefTarget> &target);
206std::expected<PasswordValue, ManagedError> passwordValue(std::shared_ptr<RefTarget> target,
207 std::source_location origin);
211std::expected<void, ManagedError> setPasswordValue(std::shared_ptr<RefTarget> target,
PasswordValue value,
212 std::source_location origin);
216void reportPasswordError(
const std::shared_ptr<RefTarget> &target,
ManagedError &failure, std::source_location origin);
221std::expected<NodeGeometry, ManagedError> geometry(
const std::shared_ptr<RefTarget> &target);
229std::expected<void, ManagedError> scrollOffset(
const std::shared_ptr<RefTarget> &target,
ScrollAxis axis,
235std::expected<void, ManagedError> ensureVisible(
const std::shared_ptr<RefTarget> &target, std::source_location origin);
241void reportEventError(
const std::shared_ptr<RefTarget> &target,
const ManagedError &error, std::source_location origin);
248void reportFocusError(
const std::shared_ptr<RefTarget> &target,
const ManagedError &error, std::source_location origin);
256DialogCommandResult dialogCommand(
const std::shared_ptr<RefTarget> &target,
bool opening, std::source_location origin);
257DialogCommandResult popupCommand(
const std::shared_ptr<RefTarget> &target,
const std::shared_ptr<RefTarget> &anchor,
258 bool opening, std::source_location origin);
259std::expected<bool, ManagedError> popupOpened(
const std::shared_ptr<RefTarget> &target);
264using TextResolver = std::function<std::expected<std::string, TextResourceError>(std::string_view)>;
273std::expected<void, ManagedError> spinnerActive(std::shared_ptr<RefTarget> target,
275 std::source_location origin);
282std::expected<void, ManagedError> spinnerLabel(std::shared_ptr<RefTarget> target,
283 std::shared_ptr<
const Node<Spinner>> node, std::string_view value,
284 std::source_location origin);
292std::expected<void, ManagedError> spinnerLabel(std::shared_ptr<RefTarget> target,
294 const TextResolver &resolver, std::source_location origin);
308 std::expected<GraphemeText, ManagedError>
snapshot()
const;
311 template <
class T>
friend class Ref;
314 friend class TextProperty;
321 TextSource(std::shared_ptr<detail::RefTarget> target, Kind kind) : target_(std::move(target)), kind_(kind) {
324 std::shared_ptr<detail::RefTarget> target_;
341 std::expected<double, ManagedError>
get()
const;
368 template <
class>
friend class Ref;
371 std::source_location origin)
372 : target_(std::move(target)), node_(std::move(node)), origin_(origin) {
375 std::shared_ptr<detail::RefTarget> target_;
376 std::shared_ptr<const Node<Slider>> node_;
377 std::source_location origin_;
378 std::optional<std::expected<PropertyUpdate<NumericValue>,
ManagedError>> last_;
391 std::expected<double, ManagedError>
get()
const;
393 std::expected<SpinBoxResult, ManagedError>
result()
const;
404 template <
class>
friend class Ref;
407 std::source_location origin)
408 : target_(std::move(target)), node_(std::move(node)), origin_(origin) {
411 std::shared_ptr<detail::RefTarget> target_;
412 std::shared_ptr<const Node<SpinBox>> node_;
413 std::source_location origin_;
414 std::optional<std::expected<SpinBoxResult, ManagedError>> last_;
433 auto target = target_;
435 const auto origin = origin_;
437 const auto value = source.
get();
440 value ? detail::setChecked(target, node, *value, origin) : detail::failedChecked(target, value.error(), origin);
442 return CheckedProperty(std::move(target), std::move(node), origin, std::move(receipt));
446 std::expected<bool, ManagedError>
get()
const {
447 return detail::checkedValue(target_, node_);
454 std::source_location origin = std::source_location::current()) {
455 return detail::setChecked(target_, node_, value, origin);
463 auto target = target_;
465 const auto origin = origin_;
467 auto receipt = detail::setChecked(target, node, value, origin);
469 return CheckedProperty(std::move(target), std::move(node), origin, std::move(receipt));
475 return receipt_ ? *receipt_
481 template <
class>
friend class Ref;
484 std::source_location origin)
485 : target_(std::move(target)), node_(std::move(node)), origin_(origin) {
490 : target_(std::move(target)), node_(std::move(node)), origin_(origin), receipt_(std::move(receipt)) {
493 std::shared_ptr<detail::RefTarget> target_;
494 std::shared_ptr<const Node<Switch>> node_;
495 std::source_location origin_;
496 std::optional<std::expected<PropertyUpdate<bool>, ManagedError>> receipt_;
503template <
class T>
class VisibleModelSource {
507 auto owner = detail::eventScene(target_);
510 return std::unexpected(owner.error());
513 return (*owner)->visibleModelSnapshot(*node_);
517 template <
class>
friend class Ref;
520 : target_(std::move(target)), node_(node) {
523 std::shared_ptr<detail::RefTarget> target_;
524 std::shared_ptr<const Node<VirtualTable<T>>> node_;
539 std::expected<GraphemeText, ManagedError>
result()
const;
562 friend class TextProperty;
563 friend struct detail::RefAccess;
564 TextResult(std::expected<GraphemeText, ManagedError> value, std::shared_ptr<TextResolver> resolver,
565 std::source_location origin);
566 TextResult join(std::string_view bytes)
const;
568 std::expected<GraphemeText, ManagedError> value_;
569 std::shared_ptr<TextResolver> resolver_;
570 std::source_location origin_;
591 return TextSource(target_, (expectedType_ ==
"LineEdit" || expectedType_ ==
"FormField" ||
592 expectedType_ ==
"FindBar" || expectedType_ ==
"ComboBox")
593 ? TextSource::Kind::DRAFT
594 : TextSource::Kind::CAPTION);
611 std::expected<std::string, ManagedError>
get()
const;
618 std::expected<void, ManagedError>
result()
const;
624 TextProperty set(std::string_view value, std::source_location origin = std::source_location::current());
636 TextProperty append(std::string_view value, std::source_location origin = std::source_location::current());
695 template <
class T>
friend class Ref;
696 friend class DynamicRef;
697 friend struct detail::RefAccess;
698 friend class TextResult;
700 TextProperty(std::shared_ptr<detail::RefTarget> target, TextResolver resolver, std::string_view expectedType,
702 std::source_location origin, std::optional<ProgrammaticChange> change = {});
705 TextProperty mutate(std::string_view value,
bool append, std::source_location origin);
708 void report(
const char *operation, std::string_view key, std::source_location origin);
710 std::shared_ptr<detail::RefTarget> target_;
711 std::shared_ptr<TextResolver> resolver_;
712 std::string_view expectedType_;
713 std::source_location origin_;
714 std::expected<void, ManagedError> result_;
715 std::optional<ProgrammaticChange> change_;
732 return slot_ ? slot_->node :
Node<T>{};
738 template <
class U>
friend class Ref;
744 detail::RefTarget target;
748 std::shared_ptr<Slot> slot_;
761template <
class T>
class Ref :
public NodeRef<T> {
762 friend struct detail::MessageAccess;
767 this->slot_->fluent =
true;
774 requires std::same_as<T,
Switch>
776 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
782 std::expected<RadioGroupValue, ManagedError>
value() const
785 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
786 return detail::radioValue(target(), std::move(
node));
792 std::expected<PropertyUpdate<RadioGroupValue>,
ManagedError>
793 select(std::optional<RowId>
id, std::source_location origin = std::source_location::current()) const
796 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
797 return detail::radioSelect(target(), std::move(
node),
id, origin);
812 template <
class Value,
class Callback>
813 requires std::copy_constructible<Callback> &&
814 (std::same_as<std::invoke_result_t<Callback &, std::shared_ptr<const Value>>,
void> ||
815 std::same_as<std::invoke_result_t<Callback &, std::shared_ptr<const Value>>,
816 std::expected<void, TreeError>>)
818 delivery(Callback callback, std::source_location origin = std::source_location::current())
const {
819 auto observation = target();
821 auto connected = detail::connectDelivery(
824 std::move(callback)](std::shared_ptr<const void> payload)
mutable -> std::expected<void, TreeError> {
825 if constexpr (std::same_as<std::invoke_result_t<Callback &, std::shared_ptr<const Value>>,
void>) {
826 std::invoke(callback, std::static_pointer_cast<const Value>(std::move(payload)));
829 return std::invoke(callback, std::static_pointer_cast<const Value>(std::move(payload)));
834 detail::reportEventError(observation, connected.error(), origin);
835 return std::unexpected(connected.error());
839 }
catch (
const std::bad_alloc &) {
841 detail::reportEventError(observation, failure, origin);
842 return std::unexpected(failure);
845 detail::reportEventError(observation, failure, origin);
846 return std::unexpected(failure);
857 requires std::same_as<T,
Button>
859 return detail::activateButton(target(), origin);
868 std::source_location origin = std::source_location::current()) const
869 requires std::same_as<T,
Gauge>
871 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
873 return detail::gaugeValue(target(), std::move(
node),
value,
false, origin);
880 requires std::same_as<T,
Slider>
882 auto node = this->slot_ ? std::shared_ptr<const Node<Slider>>(this->slot_, &this->slot_->node) :
nullptr;
889 requires std::same_as<T,
SpinBox>
891 auto node = this->slot_ ? std::shared_ptr<const Node<SpinBox>>(this->slot_, &this->slot_->node) :
nullptr;
897 requires std::same_as<T,
SpinBox>
899 auto node = this->slot_ ? std::shared_ptr<const Node<SpinBox>>(this->slot_, &this->slot_->node) :
nullptr;
900 return detail::spinBoxEditor(target(), std::move(
node));
908 std::expected<void, ManagedError>
adjust(
double delta,
909 std::source_location origin = std::source_location::current()) const
910 requires std::same_as<T,
Gauge>
912 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
914 return detail::gaugeValue(target(), std::move(
node), delta,
true, origin);
920 std::expected<PasswordValue, ManagedError>
value(std::source_location origin = std::source_location::current()) const
923 return detail::passwordValue(target(), origin);
930 std::source_location origin = std::source_location::current()) const
933 return detail::setPasswordValue(target(), std::move(
value), origin);
942 requires(std::same_as<T, Password> && portals::detail::SecretCallback<F> &&
943 std::same_as<std::invoke_result_t<std::decay_t<F> &,
SecretView>,
void>)
945 std::source_location origin = std::source_location::current())
const {
946 auto observation = target();
947 auto selected = detail::passwordValue(observation, origin);
950 return std::unexpected(selected.error());
953 auto accessed = portals::detail::PasswordValueAccess::borrowOwned(std::move(*selected), std::forward<F>(callback));
957 portals::detail::passwordError(
ManagedPhase::TEXT, observation->node.id(), std::move(accessed.error()));
959 detail::reportPasswordError(observation, failure, origin);
961 return std::unexpected(std::move(failure));
970 std::expected<void, ManagedError>
start(std::source_location origin = std::source_location::current()) const
971 requires std::same_as<T,
Spinner>
973 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
974 return detail::spinnerActive(target(), std::move(
node),
true, origin);
980 std::expected<void, ManagedError>
stop(std::source_location origin = std::source_location::current()) const
981 requires std::same_as<T,
Spinner>
983 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
984 return detail::spinnerActive(target(), std::move(
node),
false, origin);
991 std::expected<void, ManagedError>
label(std::string_view
value,
992 std::source_location origin = std::source_location::current()) const
993 requires std::same_as<T,
Spinner>
995 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
996 return detail::spinnerLabel(target(), std::move(
node),
value, origin);
1005 std::source_location origin = std::source_location::current())
const
1006 requires std::same_as<T, Spinner>
1008 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) : nullptr;
1009 return detail::spinnerLabel(target(), std::move(
node), value, resolver, origin);
1013 std::expected<void, ManagedError>
open(std::source_location origin = std::source_location::current()) const
1016 return detail::helpCommand(target(),
true, origin);
1020 std::expected<void, ManagedError>
close(std::source_location origin = std::source_location::current()) const
1023 return detail::helpCommand(target(),
false, origin);
1032 std::source_location origin = std::source_location::current()) const
1035 return detail::scrollOffset(target(), axis, offset, origin);
1041 std::expected<LogAppendReceipt, ManagedError>
1042 appendBatch(std::string_view bytes, std::source_location origin = std::source_location::current()) const
1043 requires std::same_as<T,
LogView>
1045 const auto observation = target();
1046 const auto owner = detail::eventScene(observation);
1049 return std::unexpected(owner.error());
1052 auto result = (*owner)->appendLogBatch(this->
node(), bytes);
1055 result.error().registrationOrigin = origin;
1064 bool append(std::string_view bytes, std::source_location origin = std::source_location::current()) const
1065 requires std::same_as<T,
LogView>
1070 detail::reportEventError(target(), result.error(), origin);
1073 return result.has_value();
1080 std::source_location origin = std::source_location::current()) const
1081 requires std::same_as<T,
LogView>
1083 return detail::setLogModel(target(), this->
node(), source, origin);
1089 bool model(
const LogSource &source, std::source_location origin = std::source_location::current()) const
1090 requires std::same_as<T,
LogView>
1092 const auto result =
setModel(source, origin);
1095 detail::reportEventError(target(), result.error(), origin);
1098 return result.has_value();
1106 template <
class Row>
1107 requires std::same_as<T, VirtualRows<Row>>
1109 std::source_location origin = std::source_location::current())
const;
1113 template <
class Row>
1114 requires std::same_as<T, VirtualRows<Row>>
1116 std::source_location origin = std::source_location::current())
const;
1122 template <
class Row>
1123 requires std::same_as<T, VirtualRows<Row>>
1125 std::source_location origin = std::source_location::current())
const;
1129 template <
class Row>
1130 requires std::same_as<T, VirtualRows<Row>>
1132 std::source_location origin = std::source_location::current())
const;
1145 template <
class Row>
1146 requires(std::same_as<T, VirtualList<Row>> || std::same_as<T, VirtualTable<Row>>)
1147 std::expected<void, ManagedError>
1150 std::source_location origin = std::source_location::current(),
ModelRebindOptions options = {})
const {
1151 const auto owner = detail::eventScene(target());
1154 auto failure = owner.error();
1156 failure.registrationOrigin = origin;
1158 return std::unexpected(failure);
1161 auto result = (*owner)->setModel(this->
node(), std::move(source), std::move(prepared), options);
1164 result.error().registrationOrigin = origin;
1177 template <
class Value>
1178 requires(std::same_as<T, Label> || std::same_as<T, Button> || std::same_as<T, Border>) &&
1179 std::equality_comparable<Value> && std::copy_constructible<Value>
1181 std::source_location origin = std::source_location::current())
const;
1187 template <
class Value>
1188 requires(std::same_as<T, Label> || std::same_as<T, Button> || std::same_as<T, Border>) &&
1189 std::equality_comparable<Value> && std::copy_constructible<Value>
1190 bool model(
Model<Value> source, std::source_location origin = std::source_location::current())
const {
1191 const auto observation = target();
1192 auto result =
setModel(std::move(source), origin);
1195 detail::reportCaptionModelError(observation, result.error(), origin,
1196 std::same_as<T, Label> ?
"Label"
1197 : std::same_as<T, Button> ?
"Button"
1201 return static_cast<bool>(result);
1208 std::source_location origin = std::source_location::current()) const
1209 requires(std::same_as<T,
Label> || std::same_as<T,
Button> || std::same_as<T,
Border>);
1215 requires(std::same_as<T,
Label> || std::same_as<T,
Button> || std::same_as<T,
Border>);
1221 template <class
Row>
1224 std::source_location origin = std::source_location::current())
const;
1229 template <
class Row>
1230 requires(std::same_as<T, VirtualList<Row>> || std::same_as<T, VirtualTable<Row>>)
1232 std::source_location origin = std::source_location::current())
const {
1233 const auto observation = target();
1234 auto result =
setModel(std::move(source), options, origin);
1236 detail::reportEventError(observation, result.error(), origin);
1238 return static_cast<bool>(result);
1246 template <
class Row>
1247 requires(std::same_as<T, VirtualList<Row>> || std::same_as<T, VirtualTable<Row>>)
1248 std::expected<void, ManagedError>
1251 std::source_location origin = std::source_location::current())
const {
1252 return setModel(std::move(source), std::move(prepared), origin, options);
1262 template <
class Row>
1263 requires(std::same_as<T, VirtualList<Row>> || std::same_as<T, VirtualTable<Row>>)
1266 std::source_location origin = std::source_location::current())
const {
1267 const auto result =
setModel(std::move(source), std::move(prepared), origin);
1270 detail::reportEventError(target(), result.error(), origin);
1273 return result.has_value();
1281 template <
class Row>
1282 requires(std::same_as<T, VirtualList<Row>> || std::same_as<T, VirtualTable<Row>>)
1285 std::source_location origin = std::source_location::current())
const {
1286 const auto result =
setModel(std::move(source), std::move(prepared), origin, options);
1288 detail::reportEventError(target(), result.error(), origin);
1290 return result.has_value();
1297 std::expected<std::optional<PositionResolution>,
ManagedError>
1298 restoreStatus(std::source_location origin = std::source_location::current()) const
1301 const auto owner = detail::eventScene(target());
1303 auto failure = owner.error();
1304 failure.registrationOrigin = origin;
1305 return std::unexpected(failure);
1307 auto result = (*owner)->restoreStatus(this->
node());
1309 result.error().registrationOrigin = origin;
1315 std::expected<void, ManagedError>
followTail(std::source_location origin = std::source_location::current()) const
1316 requires std::same_as<T,
LogView>
1318 const auto owner = detail::eventScene(target());
1321 return std::unexpected(owner.error());
1324 auto result = (*owner)->followLogTail(this->
node());
1327 result.error().registrationOrigin = origin;
1334 bool tail(std::source_location origin = std::source_location::current()) const
1335 requires std::same_as<T,
LogView>
1340 detail::reportEventError(target(), result.error(), origin);
1343 return result.has_value();
1347 std::expected<void, ManagedError>
clearLog(std::source_location origin = std::source_location::current()) const
1348 requires std::same_as<T,
LogView>
1350 const auto owner = detail::eventScene(target());
1353 return std::unexpected(owner.error());
1356 auto result = (*owner)->clearLog(this->
node());
1359 result.error().registrationOrigin = origin;
1366 bool clear(std::source_location origin = std::source_location::current()) const
1367 requires std::same_as<T,
LogView>
1369 const auto result =
clearLog(origin);
1372 detail::reportEventError(target(), result.error(), origin);
1375 return result.has_value();
1379 std::expected<LogStatus, ManagedError>
status() const
1380 requires std::same_as<T,
LogView>
1382 const auto owner = detail::eventScene(target());
1384 return owner ? (*owner)->logStatus(this->
node()) : std::unexpected(owner.error());
1392 std::source_location origin = std::source_location::current()) const
1395 return detail::setDocumentModel(target(), this->
node(), source, origin);
1405 const auto observation = target();
1406 const auto result = detail::setDocumentModel(observation, this->
node(), source, origin);
1408 detail::reportEventError(observation, result.error(), origin);
1410 return result.has_value();
1417 std::expected<void, ManagedError>
seekByte(std::uint64_t offset,
1418 std::source_location origin = std::source_location::current()) const
1421 return detail::seekDocument(target(), this->
node(), offset,
false, origin);
1428 bool byte(std::uint64_t offset, std::source_location origin = std::source_location::current()) const
1431 const auto observation = target();
1432 const auto result = detail::seekDocument(observation, this->
node(), offset,
false, origin);
1434 detail::reportEventError(observation, result.error(), origin);
1436 return result.has_value();
1440 std::expected<void, ManagedError>
refresh(std::source_location origin = std::source_location::current()) const
1443 return detail::seekDocument(target(), this->
node(), 0,
true, origin);
1447 bool reload(std::source_location origin = std::source_location::current()) const
1450 const auto observation = target();
1451 const auto result = detail::seekDocument(observation, this->
node(), 0,
true, origin);
1453 detail::reportEventError(observation, result.error(), origin);
1455 return result.has_value();
1462 std::source_location origin = std::source_location::current()) const
1465 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1467 return detail::navigateDocument(target(), std::move(
node), portals::detail::DocumentNavigation::ROWS, rows, origin);
1473 bool scroll(std::int64_t rows, std::source_location origin = std::source_location::current()) const
1476 const auto observation = target();
1477 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1479 detail::navigateDocument(observation, std::move(
node), portals::detail::DocumentNavigation::ROWS, rows, origin);
1482 detail::reportEventError(observation, result.error(), origin);
1485 return result.has_value();
1492 std::source_location origin = std::source_location::current()) const
1495 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1497 return detail::navigateDocument(target(), std::move(
node), portals::detail::DocumentNavigation::PAGES, pages,
1504 bool page(std::int64_t pages, std::source_location origin = std::source_location::current()) const
1507 const auto observation = target();
1508 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1510 detail::navigateDocument(observation, std::move(
node), portals::detail::DocumentNavigation::PAGES, pages, origin);
1513 detail::reportEventError(observation, result.error(), origin);
1516 return result.has_value();
1522 std::expected<void, ManagedError>
goHome(std::source_location origin = std::source_location::current()) const
1525 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1527 return detail::navigateDocument(target(), std::move(
node), portals::detail::DocumentNavigation::HOME, 0, origin);
1533 bool home(std::source_location origin = std::source_location::current()) const
1536 const auto observation = target();
1537 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1539 detail::navigateDocument(observation, std::move(
node), portals::detail::DocumentNavigation::HOME, 0, origin);
1542 detail::reportEventError(observation, result.error(), origin);
1545 return result.has_value();
1551 std::expected<void, ManagedError>
goEnd(std::source_location origin = std::source_location::current()) const
1554 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1556 return detail::navigateDocument(target(), std::move(
node), portals::detail::DocumentNavigation::END, 0, origin);
1562 bool end(std::source_location origin = std::source_location::current()) const
1565 const auto observation = target();
1566 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1568 detail::navigateDocument(observation, std::move(
node), portals::detail::DocumentNavigation::END, 0, origin);
1571 detail::reportEventError(observation, result.error(), origin);
1574 return result.has_value();
1583 std::source_location origin = std::source_location::current()) const
1586 return detail::documentMode(target(), this->
node(),
value, origin);
1595 const auto observation = target();
1596 const auto result = detail::documentMode(observation, this->
node(),
value, origin);
1599 detail::reportEventError(observation, result.error(), origin);
1601 return result.has_value();
1608 std::source_location origin = std::source_location::current()) const
1611 return detail::documentHexOptions(target(), this->
node(), options, origin);
1620 const auto observation = target();
1621 const auto result = detail::documentHexOptions(observation, this->
node(), options, origin);
1624 detail::reportEventError(observation, result.error(), origin);
1626 return result.has_value();
1634 std::source_location origin = std::source_location::current()) const
1637 return detail::documentLanguage(target(), this->
node(),
value, origin);
1644 std::source_location origin = std::source_location::current()) const
1656 const auto observation = target();
1657 const auto result = detail::documentLanguage(observation, this->
node(),
value, origin);
1660 detail::reportEventError(observation, result.error(), origin);
1663 return result.has_value();
1669 bool language(std::string_view name, std::source_location origin = std::source_location::current()) const
1679 std::source_location origin = std::source_location::current()) const
1682 return detail::documentSyntax(target(), this->
node(), policy, origin);
1691 const auto observation = target();
1692 const auto result = detail::documentSyntax(observation, this->
node(), policy, origin);
1694 detail::reportEventError(observation, result.error(), origin);
1696 return result.has_value();
1705 std::source_location origin = std::source_location::current()) const
1708 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1710 return detail::documentLineNumbers(target(), std::move(
node), enabled, origin);
1716 bool lineNumbers(
bool enabled, std::source_location origin = std::source_location::current()) const
1719 const auto observation = target();
1720 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1721 const auto result = detail::documentLineNumbers(observation, std::move(
node), enabled, origin);
1724 detail::reportEventError(observation, result.error(), origin);
1727 return result.has_value();
1736 const auto observation = target();
1737 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) :
nullptr;
1738 const auto result = detail::documentLineNumbers(observation, std::move(
node), std::nullopt, origin);
1741 detail::reportEventError(observation, result.error(), origin);
1744 return result.has_value();
1748 std::expected<DocumentViewStatus, ManagedError>
status() const
1751 return detail::documentStatus(target(), this->
node());
1755 std::optional<DocumentViewStatus>
currentStatus(std::source_location origin = std::source_location::current()) const
1758 const auto observation = target();
1759 const auto result = detail::documentStatus(observation, this->
node());
1761 detail::reportEventError(observation, result.error(), origin);
1772 std::source_location origin = std::source_location::current()) const
1775 const auto observation = target();
1776 auto owner = detail::eventScene(observation);
1778 return std::unexpected(owner.error());
1780 auto result = (*owner)->setScrollMetrics(this->
node(), metrics);
1782 detail::reportEventError(observation, result.error(), origin);
1790 std::expected<void, ManagedError>
ensureVisible(std::source_location origin = std::source_location::current())
const {
1791 return detail::ensureVisible(target(), origin);
1798 std::expected<NodeGeometry, ManagedError>
geometry()
const {
1799 return detail::geometry(target());
1803 std::expected<CellSize, ManagedError>
size()
const {
1805 return value.local.size();
1816 template <
class Callback>
1818 std::expected<void, ManagedError>
onLayout(Callback callback,
1819 std::source_location origin = std::source_location::current())
const {
1820 auto observation = target();
1821 auto owner = detail::eventScene(observation);
1823 return std::unexpected(owner.error());
1825 auto result = [&]() -> std::expected<void, ManagedError> {
1827 return (*owner)->onLayout(this->node(), std::move(callback), origin);
1828 }
catch (
const std::bad_alloc &) {
1835 detail::reportEventError(observation, result.error(), origin);
1849 template <
class Callback = detail::QuitCommand>
1851 std::expected<void, ManagedError>
onClick(Callback action,
1852 std::source_location origin = std::source_location::current())
const {
1853 detail::commandOrigin(action, origin);
1854 auto observation = target();
1855 auto scene = detail::eventScene(observation);
1858 return std::unexpected(scene.error());
1862 auto result = [&]() -> std::expected<void, ManagedError> {
1864 return (*scene)->onClick(this->node(), std::move(action));
1865 }
catch (
const std::bad_alloc &) {
1873 detail::reportEventError(observation, result.error(), origin);
1884 std::source_location origin = std::source_location::current()) const
1887 return detail::displayDataState(target(),
value, origin);
1895 std::expected<void, ManagedError>
focus(std::source_location origin = std::source_location::current())
const {
1903 requires std::same_as<T,
Dialog>
1905 return detail::dialogCommand(target(),
true, origin);
1914 if constexpr (std::same_as<T, PopupMenu>) {
1915 return detail::popupCommand(target(), {},
false, origin);
1917 return detail::dialogCommand(target(),
false, origin);
1925 template <
class Anchor>
1927 std::source_location origin = std::source_location::current()) const
1930 return detail::popupCommand(target(), anchor.target(),
true, origin);
1934 std::expected<bool, ManagedError>
opened() const
1937 if constexpr (std::same_as<T, PopupMenu>) {
1938 return detail::popupOpened(target());
1940 auto observation = target();
1941 auto owner = detail::eventScene(observation);
1942 return owner ? (*owner)->dialogOpened(observation->node) : std::unexpected(owner.error());
1949 std::expected<void, ManagedError>
1958 std::expected<void, ManagedError>
1968 TextProperty text(TextResolver resolver = {}, std::source_location origin = std::source_location::current())
const
1969 requires((std::derived_from<T, Control> && !std::derived_from<T, Slider>) || std::same_as<T, LineEdit> ||
1970 std::same_as<T, SpinBox>)
1972 auto target = this->slot_ ? std::shared_ptr<detail::RefTarget>(this->slot_, &this->slot_->target) : nullptr;
1973 constexpr std::string_view TYPE = std::same_as<T, LineEdit> ?
"LineEdit"
1974 : std::same_as<T, Label> ?
"Label"
1975 : std::same_as<T, Button> ?
"Button"
1976 : std::same_as<T, Switch> ?
"Switch"
1977 : std::same_as<T, CheckBox> ?
"CheckBox"
1978 : std::same_as<T, ThreeState> ?
"ThreeState"
1981 return TextProperty(std::move(target), std::move(resolver), TYPE, origin);
1988 if constexpr (std::derived_from<T, ComboBox>) {
1989 return detail::choiceEditor(target());
1991 return detail::findEditor(target());
1998 TextProperty text(TextResolver resolver = {}, std::source_location origin = std::source_location::current())
const
1999 requires std::same_as<T, ComboBox>
2001 return TextProperty(target(), std::move(resolver),
"ComboBox", origin);
2005 std::expected<ChoiceSelection, ManagedError>
selection() const
2006 requires std::derived_from<T,
ComboBox>
2008 return detail::choiceSelection(target());
2012 std::expected<bool, ManagedError>
opened() const
2013 requires std::derived_from<T,
ComboBox>
2015 return detail::choiceOpened(target());
2019 std::expected<void, ManagedError>
open(std::source_location origin = std::source_location::current()) const
2020 requires std::derived_from<T,
ComboBox>
2022 return detail::choiceOpen(target(),
true, origin);
2026 std::expected<void, ManagedError>
dismiss(std::source_location origin = std::source_location::current()) const
2027 requires std::derived_from<T,
ComboBox>
2029 return detail::choiceOpen(target(),
false, origin);
2037 std::expected<void, ManagedError>
select(std::uint64_t index,
2038 std::source_location origin = std::source_location::current()) const
2039 requires std::derived_from<T,
ComboBox>
2041 return detail::choiceSelect(target(), index, origin);
2049 std::source_location origin = std::source_location::current()) const
2050 requires std::derived_from<T,
ComboBox>
2052 return detail::choiceSelect(target(), std::move(
value), origin);
2056 std::expected<void, ManagedError>
clearSelection(std::source_location origin = std::source_location::current()) const
2057 requires std::derived_from<T,
ComboBox>
2059 return detail::choiceClear(target(), origin);
2066 TextProperty text(TextResolver resolver = {}, std::source_location origin = std::source_location::current())
const
2067 requires std::same_as<T, FindBar>
2069 return TextProperty(target(), std::move(resolver),
"FindBar", origin);
2079 requires std::same_as<T, FindBar>
2081 return detail::findNavigate(target(), direction);
2085 bool next(std::source_location origin = std::source_location::current()) const
2086 requires std::same_as<T,
FindBar>
2088 auto observation = target();
2091 detail::reportEventError(observation, result.error(), origin);
2093 return result &&
static_cast<bool>(*result);
2097 bool previous(std::source_location origin = std::source_location::current()) const
2098 requires std::same_as<T,
FindBar>
2100 auto observation = target();
2103 detail::reportEventError(observation, result.error(), origin);
2105 return result &&
static_cast<bool>(*result);
2109 std::expected<FindMatch, ManagedError>
match() const
2110 requires std::same_as<T,
FindBar>
2112 return detail::findMatch(target());
2120 requires std::same_as<T, FindBar>
2122 return detail::findCurrent(target(),
value);
2133 requires std::same_as<T, FindBar>
2135 return detail::findDocument(target(), bytes);
2142 bool document(std::string_view bytes, std::source_location origin = std::source_location::current()) const
2143 requires std::same_as<T,
FindBar>
2145 auto observation = target();
2146 auto result = detail::findDocument(observation, bytes);
2148 detail::reportEventError(observation, result.error(), origin);
2150 return result.has_value();
2159 requires std::same_as<T,
FindBar>
2161 return detail::findClear(target(), origin);
2165 bool clear(std::source_location origin = std::source_location::current()) const
2166 requires std::same_as<T,
FindBar>
2168 return static_cast<bool>(detail::findClear(target(), origin));
2178 return detail::fieldEditor(target());
2185 TextProperty text(TextResolver resolver = {}, std::source_location origin = std::source_location::current())
const
2186 requires std::same_as<T, FormField>
2188 return TextProperty(target(), std::move(resolver),
"FormField", origin);
2198 return detail::fieldValidation(target());
2211 return detail::validateField(target());
2222 bool valid(std::source_location origin = std::source_location::current()) const
2225 auto observation = target();
2226 auto result = detail::validateField(observation);
2229 detail::reportEventError(observation, result.error(), origin);
2232 return result && *result;
2240 requires std::same_as<T, FormField>
2242 return detail::displayField(target(), std::move(
value));
2251 std::source_location origin = std::source_location::current())
const
2252 requires std::same_as<T, LineEdit>
2254 return TextProperty(target(), std::move(resolver),
"LineEdit", origin, change);
2263 return detail::editorCommand(target(),
false,
false, origin);
2272 return detail::editorCommand(target(),
true,
false, origin);
2284 return detail::editorCommand(target(),
false,
false, origin,
true);
2293 return detail::editorCommand(target(),
false,
true, origin);
2298 requires std::derived_from<T,
Control>
2300 return TextSource(target(), TextSource::Kind::CAPTION);
2310 auto node = this->slot_ ? std::shared_ptr<const Node<T>>(this->slot_, &this->slot_->node) : nullptr;
2319 requires requires {
typename T::VirtualRow; };
2325 return TextSource(target(), TextSource::Kind::DRAFT);
2332 return TextSource(target(), TextSource::Kind::COMMITTED);
2339 return detail::editorAvailability(target());
2362 template <
class U>
friend class Ref;
2363 friend struct detail::AsyncAccess;
2367 friend struct detail::KeyHelpAccess;
2373 std::expected<void, ManagedError>
2375 std::source_location origin)
const {
2376 auto observation = target();
2377 auto owner = detail::eventScene(observation);
2380 return std::unexpected(owner.error());
2383 auto result = ((*owner)->*operation)(this->
node());
2386 detail::reportFocusError(observation, result.error(), origin);
2392 std::shared_ptr<detail::RefTarget> target()
const {
2393 return this->slot_ ? std::shared_ptr<detail::RefTarget>(this->slot_, &this->slot_->target) : nullptr;
2416 auto owner = eventScene(
target);
2419 auto failure = owner.error();
2422 return std::unexpected(failure);
2425 if (*owner != &scene) {
2431 return live ? std::expected<NodeId, ManagedError>(
target->node.id()) : std::unexpected(live.error());
2439 const std::shared_ptr<RefTarget> &source) {
2440 auto owner = eventScene(source);
2443 return std::unexpected(owner.error());
2446 if (*owner != &scene) {
2452 return allowed ? std::expected<Node<Widget>,
ManagedError>(source->node) : std::unexpected(allowed.error());
2463 return std::unexpected(allowed.error());
2468 for (
const auto &entry : scene.entries_) {
2469 if (entry->removed || !entry->target || entry->target->id != name || name.empty()) {
2473 auto live = scene.app_.tree().read(entry->node, [](
const Widget &) {
2488 found = entry->node;
2503 auto checked = scene.app_.tree().read(node, [&](
const Widget &widget) {
2504 if (
const auto *field =
dynamic_cast<const FormField *
>(&widget)) {
2505 editor = field->editor();
2506 }
else if (
const auto *
find =
dynamic_cast<const FindBar *
>(&widget)) {
2507 editor =
find->editor();
2508 }
else if (
const auto *spin =
dynamic_cast<const SpinBox *
>(&widget)) {
2509 editor = spin->editor();
2510 }
else if (
const auto *choice =
dynamic_cast<const ComboBox *
>(&widget)) {
2511 editor = choice->editor();
2521 checked = scene.app_.tree().read(editor, [&](
const Widget &widget) {
2522 if (
dynamic_cast<const LineEdit *
>(&widget)) {
2527 return checked ? std::expected<Node<LineEdit>,
ManagedError>(result)
2539 auto &slot = *reference.slot_;
2544 auto checked = scene.app_.tree().read(node, [&](
const Widget &widget) {
2545 if constexpr (std::same_as<T, Widget>) {
2548 compatible =
dynamic_cast<const T *
>(&widget) !=
nullptr;
2551 if (
dynamic_cast<const Control *
>(&widget)) {
2555 if (
dynamic_cast<const LineEdit *
>(&widget)) {
2558 if (
dynamic_cast<const Password *
>(&widget)) {
2563 if (!checked || !compatible) {
2564 return std::unexpected(
2568 if constexpr (std::same_as<T, FormField> || std::same_as<T, FindBar> || std::same_as<T, SpinBox> ||
2569 std::derived_from<T, ComboBox>) {
2573 return std::unexpected(editor.error());
2580 slot.target.scene = &scene;
2581 slot.target.lifetime = scene.lifetime_;
2582 slot.target.node = node;
2583 slot.target.caption = caption;
2584 slot.target.draft = draft;
2585 slot.target.secret = secret;
2595 reference.slot_->target.failure = std::make_shared<const ManagedError>(failure);
2610 template <
class T>
static std::shared_ptr<RefTarget>
target(
const Ref<T> &reference) {
2611 return reference.target();
2627 node ?
publish(reference, scene, *node) : std::expected<void, ManagedError>(std::unexpected(node.error()));
2630 reject(reference, published.error());
2637 reject(reference, result.error());
2656 requires std::derived_from<T, Widget>
2658 auto source = source_;
2669 TextProperty text(TextResolver resolver = {}, std::source_location origin = std::source_location::current())
const {
2670 return TextProperty(reference_.target(), std::move(resolver),
"Widget", origin);
2678 template <
class Callback = detail::QuitCommand>
2680 std::expected<void, ManagedError>
onClick(Callback callback,
2681 std::source_location origin = std::source_location::current())
const {
2684 return typed.
onClick(std::move(callback), origin);
2689 return reference_.node();
2697 : source_(source), reference_(detail::NamedAccess::request<
Widget>(source_)) {
2700 detail::LookupSource source_;
2701 Ref<Widget> reference_;
2705 return reference.reference_.target();
Frame using the existing vertical LinearLayout with one-cell insets for each present side....
Definition primitives.hpp:105
Owning accepted row identity and bounded label, independent of editor draft and source lifetime.
Definition combo_box.hpp:19
Retained editable model-backed choice; the tree owns its ordinary editor and trigger.
Definition combo_box.hpp:39
UI-owned one-line control with owning Unicode text and local paint coordinates. Mutate through the fr...
Definition controls.hpp:39
Retained Column composition of status and content; it owns no provider, cache or second runtime.
Definition data_presentation.hpp:102
Full-host structural root containing at most one visible opaque panel. This is deliberately not a Siz...
Definition dialog.hpp:102
Read-only retained document viewport; source I/O, decoding and layout run on application workers....
Definition document_view.hpp:97
Owning checked editor command, preserving exactly its collector reporting receipt....
Definition editor_command.hpp:23
Retained query/navigation/count composition over owning document or model search results....
Definition find_bar.hpp:118
Owning immutable selected range; retains original data, never a scene or widget. Empty handles repres...
Definition find_bar.hpp:64
Noninteractive horizontal determinate gauge with widget-owned fill text. Paint has no owning allocati...
Definition primitives.hpp:193
Ordinary nonmodal focus-scope container; its sole content is an existing ScrollArea.
Definition help_view.hpp:31
Noninteractive Unicode label; text remains data, including control characters.
Definition controls.hpp:142
UI-owned Unicode draft; mutate only through its scoped binding between frames. Cursor/anchor are UTF-...
Definition line_edit.hpp:205
Native bounded plain-text log with whole-grapheme wrap and a stable reading anchor....
Definition log_view.hpp:64
Weak UI handle to a model owned by one ManagedScene. Handles may be copied and destroyed on any threa...
Definition managed_model.hpp:120
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable....
Definition managed.hpp:530
std::expected< void, ManagedError > focus(Node< Widget > node)
Enter a scope or focus an ordinary registered control through the same blur path.
std::expected< void, ManagedError > leaveFocusScope(Node< Widget > node)
Leave the top focus-return scope; callback errors retain the published return.
std::expected< void, ManagedError > enterFocusScope(Node< Widget > node)
Enter a declared scope while saving exact previous focus in the existing router. This focus-only oper...
Copyable typed observer; never owns or exposes an unchecked widget pointer.
Definition widget.hpp:92
Node()=default
Empty observer; checked access fails.
NodeId id() const noexcept
Copy the stable diagnostic identity.
Definition widget.hpp:109
Copyable identity of immutable logical bytes in protected native storage.
Definition password_value.hpp:44
Protected single-line editor with numeric metadata and constant-mask frame data. The draft and snapsh...
Definition password.hpp:74
Ordinary one-focus-stop, model-owned resident radio group with clipped row painting.
Definition radio_group.hpp:86
Lay visible children from left to right.
Definition layout.hpp:250
Synchronous read-only byte borrow, valid only during its callback.
Definition secure_string.hpp:195
Horizontal numeric view using the existing control style, layout and input runtime....
Definition slider.hpp:61
Numeric editor with one ordinary LineEdit and two nonfocusable step buttons. The containing tree owns...
Definition spin_box.hpp:18
Retained indeterminate indicator using the receiving scene's existing scheduler. Construct through ui...
Definition spinner.hpp:115
One-line boolean switch using the ordinary CheckBox binding and theme.
Definition controls.hpp:383
Owning literal bytes or a resource key, measured only at resolution.
Definition text_value.hpp:42
Copyable worker-safe endpoint for short, always deferred UI commands. The callback and its captures s...
Definition ui_delivery.hpp:77
UiEndpoint()=default
Construct an empty closed endpoint.
One UI-owned view with bounded owning row text and one independent model consumer....
Definition virtual_list.hpp:133
Bounded real widget subtrees, independent of the text-only VirtualList.
Definition virtual_rows.hpp:136
One UI-owned table with bounded owning cell text and one independent model consumer....
Definition virtual_table.hpp:154
Switch bool property observing the original Ref slot; never owns a widget or scene....
Definition ui_ref.hpp:422
CheckedProperty operator=(bool value)
Definition ui_ref.hpp:462
std::expected< PropertyUpdate< bool >, ManagedError > result() const
Definition ui_ref.hpp:474
CheckedProperty(const CheckedProperty &)=default
Copy an observation without reading or changing either model.
CheckedProperty operator=(const CheckedProperty &source)
Copy the source bool into this original destination; never rebind either proxy.
Definition ui_ref.hpp:432
std::expected< bool, ManagedError > get() const
Definition ui_ref.hpp:446
std::expected< PropertyUpdate< bool >, ManagedError > set(bool value, std::source_location origin=std::source_location::current())
Definition ui_ref.hpp:453
CheckedProperty(CheckedProperty &&)=default
Transfer an observation; the source remains a valid empty/moved observation.
Single-use owning construction recipe; no mounted widget ownership.
Definition ui_description.hpp:48
Owning checked command that also permits the admitted short callback form. This is a narrow facade re...
Definition dialog_command_result.hpp:20
Owning cold source descriptor; copies retain the same provider, revision namespace and budget....
Definition ui_document_view.hpp:17
Dynamic named observation with checked caption/editor and Button capabilities. Copies own the request...
Definition ui_ref.hpp:2649
Node< Widget > node() const noexcept
Definition ui_ref.hpp:2688
TextProperty text(TextResolver resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2669
std::expected< void, ManagedError > onClick(Callback callback, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2680
Consuming metadata for one canonical annotated registration; refs resolve after complete mount.
Definition ui_key_info.hpp:10
Owning deferred external log binding; construction performs no file I/O. Copies share the provider an...
Definition ui_log_view.hpp:48
Owning cold model declaration; copies share one single-scene registration. Construction does not read...
Definition ui_model.hpp:129
Node< T > node() const noexcept
Definition ui_ref.hpp:731
NodeRef()
Allocate an empty observing slot, with no widget ownership.
Definition ui_ref.hpp:727
Weak numeric property facade with an owning saved operation observation. Mutation returns a new obser...
Definition ui_ref.hpp:333
NumericProperty(const NumericProperty &other)=default
NumericProperty operator=(const NumericProperty &other)
std::expected< double, ManagedError > get() const
std::expected< PropertyUpdate< NumericValue >, ManagedError > result() const
NumericProperty set(double value, std::source_location origin=std::source_location::current())
NumericProperty operator=(double value)
NumericProperty(NumericProperty &&other)=default
Typed Widget observation; explicit composite specializations reuse their existing weak facades.
Definition ui_ref.hpp:761
std::expected< bool, ManagedError > opened() const
Definition ui_ref.hpp:2012
bool model(Model< Value > source, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1190
std::expected< void, ManagedError > leaveFocusScope(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1959
std::expected< void, ManagedError > close(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1020
std::expected< DocumentViewStatus, ManagedError > status() const
Definition ui_ref.hpp:1748
std::expected< void, ManagedError > goEnd(std::source_location origin=std::source_location::current()) const
Admit a one-shot boundary navigation command.
Definition ui_ref.hpp:1551
std::expected< void, ManagedError > seekByte(std::uint64_t offset, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1417
std::expected< void, ManagedError > withPlaintext(F &&callback, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:944
bool model(const DocumentSource &source, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1402
std::expected< UiEndpoint< Value >, ManagedError > delivery(Callback callback, std::source_location origin=std::source_location::current()) const
Register a checked, node-scoped worker-to-UI delivery endpoint.
Definition ui_ref.hpp:818
bool end(std::source_location origin=std::source_location::current()) const
Admit a one-shot boundary navigation command.
Definition ui_ref.hpp:1562
std::expected< bool, ManagedError > validate() const
Definition ui_ref.hpp:2208
DialogCommandResult open(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1902
std::expected< void, ManagedError > display(FieldValidation value) const
Definition ui_ref.hpp:2239
bool lineNumbers(bool enabled, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1716
std::expected< void, ManagedError > setMode(DocumentViewMode value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1582
std::expected< void, ManagedError > enterFocusScope(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1950
std::expected< void, ManagedError > onLayout(Callback callback, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1818
std::optional< DocumentViewStatus > currentStatus(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1755
std::expected< ChoiceSelection, ManagedError > selection() const
Definition ui_ref.hpp:2005
std::expected< FindMatch, ManagedError > match() const
Definition ui_ref.hpp:2109
TextProperty text(TextResolver resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2185
bool language(std::string_view name, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1669
std::expected< void, ManagedError > value(PasswordValue value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:929
bool reload(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1447
bool page(std::int64_t pages, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1504
std::expected< void, ManagedError > setLineNumbers(bool enabled, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1704
std::expected< void, ManagedError > focus(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1895
std::expected< void, ManagedError > setLanguage(DocumentLanguage value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1633
bool canUndo() const
Definition ui_ref.hpp:2343
std::expected< void, ManagedError > scrollPages(std::int64_t pages, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1491
Model< VirtualRowsPosition > position() const
Definition ui_virtual_rows.hpp:841
std::expected< void, ManagedError > label(const TextValue &value, const TextResolver &resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1004
std::expected< LogStatus, ManagedError > status() const
Definition ui_ref.hpp:1379
std::expected< std::optional< PositionResolution >, ManagedError > restoreStatus(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1298
TextSource captionText() const
Definition ui_ref.hpp:2297
std::expected< void, ManagedError > onClick(Callback action, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1851
bool clear(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1366
EditorCommandResult stopGrouping(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2290
std::expected< void, ManagedError > clearLog(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1347
bool model(Model< Row > source, ModelRebindOptions options={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1231
std::expected< void, ManagedError > setModel(Model< Value > source, std::source_location origin=std::source_location::current()) const
Replace a scalar caption source while preserving its original projection.
Definition ui_value_model.hpp:744
TextProperty text(TextResolver resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1968
std::expected< void, ManagedError > setModel(ManagedModel< Row > source, ModelRebindOptions options, std::type_identity_t< std::optional< ManagedViewHandler< Row > > > prepared=std::nullopt, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1249
DialogCommandResult open(const Ref< Anchor > &anchor, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1926
std::expected< void, ManagedError > setModel(const LogSource &source, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1079
std::expected< void, ManagedError > open(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2019
bool byte(std::uint64_t offset, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1428
TextProperty text(ProgrammaticChange change, TextResolver resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2250
std::expected< FindMatch, ManagedError > navigate(FindDirection direction) const
Definition ui_ref.hpp:2078
std::expected< void, ManagedError > setLanguage(std::string_view name, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1643
std::expected< void, ManagedError > setModel(const WindowRowsModel< Row > &source, ModelRebindOptions options={}, std::source_location origin=std::source_location::current()) const
Replace native window delivery without inventing extent or remounting the host.
Definition ui_virtual_rows.hpp:906
bool next(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2085
Ref< LineEdit > editor() const
Definition ui_ref.hpp:1985
std::expected< NodeGeometry, ManagedError > geometry() const
Definition ui_ref.hpp:1798
std::expected< void, TreeError > display(DataPresentation value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1883
bool canRedo() const
Definition ui_ref.hpp:2352
std::expected< CellSize, ManagedError > size() const
Definition ui_ref.hpp:1803
bool append(std::string_view bytes, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1064
EditorCommandResult redo(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2269
DialogCommandResult dismiss(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1911
std::expected< LogAppendReceipt, ManagedError > appendBatch(std::string_view bytes, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1042
bool model(Model< Row > source, ModelRebindOptions options={}, std::source_location origin=std::source_location::current()) const
Definition ui_virtual_rows.hpp:895
bool home(std::source_location origin=std::source_location::current()) const
Admit a one-shot boundary navigation command.
Definition ui_ref.hpp:1533
std::expected< HistoryAvailability, TreeError > historyAvailability() const
Definition ui_ref.hpp:2336
EditorCommandResult undo(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2260
std::expected< void, ManagedError > setModel(ManagedModel< Row > source, std::type_identity_t< std::optional< ManagedViewHandler< Row > > > prepared=std::nullopt, std::source_location origin=std::source_location::current(), ModelRebindOptions options={}) const
Replace a virtual list/table model with the same row type, retaining the node and presentation.
Definition ui_ref.hpp:1148
std::expected< void, ManagedError > refresh(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1440
std::expected< void, ManagedError > setOffset(ScrollAxis axis, ScrollOffset offset, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1031
bool model(const LogSource &source, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1089
std::expected< void, ManagedError > select(ChoiceSelection value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2048
std::expected< void, ManagedError > stop(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:980
std::expected< bool, ManagedError > opened() const
Definition ui_ref.hpp:1934
std::expected< void, ManagedError > setModel(Model< Row > source, ModelRebindOptions options={}, std::source_location origin=std::source_location::current()) const
Replace a delegated host's finite model while retaining its node.
Definition ui_model.hpp:1041
auto visibleModel() const
Definition ui_ref.hpp:2306
std::expected< void, ManagedError > dismiss(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2026
std::expected< void, ManagedError > followTail(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1315
EditorCommandResult activate(std::source_location origin=std::source_location::current()) const
Invoke the existing semantic button route synchronously on UI; focus is unchanged.
Definition ui_ref.hpp:856
std::expected< void, ManagedError > ensureVisible(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1790
TextProperty text(TextResolver resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2066
Ref()
Allocate an empty observing slot on the UI thread; may throw std::bad_alloc.
Definition ui_ref.hpp:766
std::expected< void, ManagedError > value(double value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:867
std::expected< void, ManagedError > setModel(const ValueText &source, std::source_location origin=std::source_location::current()) const
Definition ui_value_text.hpp:512
std::expected< RadioGroupValue, ManagedError > value() const
Definition ui_ref.hpp:782
std::expected< void, ManagedError > setHexOptions(DocumentHexOptions options, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1607
bool language(DocumentLanguage value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1653
std::expected< void, ManagedError > clearSelection(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2056
TextSource committedText() const
Definition ui_ref.hpp:2329
std::expected< FieldValidation, ManagedError > validation() const
Definition ui_ref.hpp:2195
std::expected< void, ManagedError > setMetrics(ScrollAxisMetrics metrics, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1771
std::expected< void, ManagedError > open(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1013
Ref< LineEdit > editor() const
Definition ui_ref.hpp:2175
CheckedProperty checked(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:773
TextProperty text(TextResolver resolver={}, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1998
bool scroll(std::int64_t rows, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1473
EditorCommandResult clear(std::source_location origin=std::source_location::current()) const
Clear the visible draft as one user operation, applying the configured EditMode.
Definition ui_ref.hpp:2281
bool model(ManagedModel< Row > source, ModelRebindOptions options, std::type_identity_t< std::optional< ManagedViewHandler< Row > > > prepared=std::nullopt, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1283
std::expected< void, ManagedError > scrollRows(std::int64_t rows, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1461
std::expected< void, ManagedError > label(std::string_view value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:991
std::expected< PropertyUpdate< RadioGroupValue >, ManagedError > select(std::optional< RowId > id, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:793
bool syntax(DocumentSyntaxPolicy policy, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1688
TextSource draftText() const
Definition ui_ref.hpp:2322
bool toggleLineNumbers(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1733
EditorCommandResult clearQuery(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2158
std::expected< void, ManagedError > start(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:970
std::expected< PasswordValue, ManagedError > value(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:920
bool mode(DocumentViewMode value, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1592
bool model(const WindowRowsModel< Row > &source, ModelRebindOptions options={}, std::source_location origin=std::source_location::current()) const
Definition ui_virtual_rows.hpp:932
bool model(ManagedModel< Row > source, std::type_identity_t< std::optional< ManagedViewHandler< Row > > > prepared=std::nullopt, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1264
std::expected< void, ManagedError > goHome(std::source_location origin=std::source_location::current()) const
Admit a one-shot boundary navigation command.
Definition ui_ref.hpp:1522
bool valid(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2222
std::expected< bool, ManagedError > current(const FindMatch &value) const
Definition ui_ref.hpp:2119
bool document(std::string_view bytes, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2142
std::expected< void, ManagedError > select(std::uint64_t index, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2037
std::expected< void, ManagedError > setModel(const DocumentSource &source, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1391
bool tail(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1334
std::expected< void, ManagedError > adjust(double delta, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:908
bool previous(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2097
bool hexOptions(DocumentHexOptions options, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1617
Ref< LineEdit > lineEdit() const
Definition ui_ref.hpp:896
bool clear(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:2165
std::expected< void, ManagedError > replaceDocument(std::string_view bytes) const
Definition ui_ref.hpp:2132
NumericProperty value(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:879
SpinBoxNumericProperty value(std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:888
std::expected< void, ManagedError > setSyntax(DocumentSyntaxPolicy policy, std::source_location origin=std::source_location::current()) const
Definition ui_ref.hpp:1678
Single-use lazy owner of one Application and ManagedScene; no second runtime. Construct and operate o...
Definition ui_scene.hpp:253
Numeric draft assignment observation. The saved result distinguishes draft acceptance from publicatio...
Definition ui_ref.hpp:384
SpinBoxNumericProperty operator=(double value)
SpinBoxNumericProperty(SpinBoxNumericProperty &&other)=default
std::expected< SpinBoxResult, ManagedError > result() const
SpinBoxNumericProperty set(double value, std::source_location origin=std::source_location::current())
std::expected< double, ManagedError > get() const
SpinBoxNumericProperty(const SpinBoxNumericProperty &other)=default
SpinBoxNumericProperty operator=(const SpinBoxNumericProperty &other)
Copyable immutable owning style payload with one shared stage identity. Independent unnamed stages co...
Definition ui_style.hpp:39
Copyable observing text property; copies own their resolver and last-operation result....
Definition ui_ref.hpp:585
TextProperty operator=(const TextResult &value)
TextResult operator+(const TextProperty &value) const
TextProperty operator=(const TextValue &value)
TextProperty(TextProperty &&other)=default
TextResult operator+(const TextResult &value) const
TextSource source() const
Definition ui_ref.hpp:590
TextProperty set(const TextValue &value, std::source_location origin=std::source_location::current())
TextProperty(const TextProperty &other)=default
TextProperty append(const TextValue &value, std::source_location origin=std::source_location::current())
TextProperty operator=(const TextProperty &value)
std::expected< std::string, ManagedError > get() const
Copy validated UTF-8 text out of the live widget without retaining its storage.
TextResult operator+(std::string_view value) const
TextProperty operator+=(const TextResult &value)
TextProperty operator+=(std::string_view value)
TextResult operator+(const TextValue &value) const
std::expected< void, ManagedError > result() const
Inspect the last mutation of this particular proxy; newly created proxies have success.
TextProperty set(std::string_view value, std::source_location origin=std::source_location::current())
TextProperty operator=(std::string_view value)
TextProperty append(std::string_view value, std::source_location origin=std::source_location::current())
TextProperty operator+=(const TextValue &value)
Owning read-only concatenation, including the original typed failure when reading fails....
Definition ui_ref.hpp:534
TextResult operator+(const TextValue &value) const
TextResult operator+(std::string_view value) const
std::expected< GraphemeText, ManagedError > result() const
TextResult operator+(const TextResult &value) const
TextResult operator+(const TextProperty &value) const
Copyable read-only source observing one caption, visible draft or accepted editor model....
Definition ui_ref.hpp:302
std::expected< GraphemeText, ManagedError > snapshot() const
Owning cold formatted text with explicit scalar dependencies, separate from its input roots....
Definition ui_value_text.hpp:37
Copyable deferred observation of one original table, without scene/widget ownership.
Definition ui_ref.hpp:503
std::expected< VisibleModelSnapshot< T >, VisibleModelError > snapshot() const
Definition ui_ref.hpp:506
A compact action optionally receives owning event parameters.
Definition managed.hpp:239
Public Portals API.
Definition action.hpp:8
DocumentSyntaxPolicy
Recovery policy; the language still selects the lexical rules.
Definition document_highlight_types.hpp:31
std::variant< ManagedError, VisibleModelReadError > VisibleModelError
Exact scene access failure or owning table preparation/provider failure.
Definition managed.hpp:43
DocumentViewMode
Projection of the same original source bytes.
Definition document_view.hpp:37
DocumentLanguage
Explicit lexical profiles; unknown names resolve to PLAIN.
Definition document_highlight_types.hpp:11
@ COMMITTED
Confirmation completed Property::set; inspect its exact receipt.
Definition line_edit.hpp:83
FindDirection
Direction through the stored bounded prefix; both directions wrap.
Definition find_bar.hpp:26
@ PREVIOUS
Retreat, wrapping the first stored match to the last.
Definition find_bar.hpp:28
@ NEXT
Advance, wrapping the last stored match to the first.
Definition find_bar.hpp:27
@ STYLE
Register or apply styles, including a theme change.
Definition managed_diagnostics.hpp:52
@ BIND
Register a managed callback, binding or presentation adapter.
Definition managed_diagnostics.hpp:51
@ TEXT
Read or mutate a fluent caption/editor draft through a checked observing reference.
Definition managed_diagnostics.hpp:57
ScrollAxis
Logical scrolling axis; X increases right and Y increases down.
Definition scroll_geometry.hpp:15
DocumentLanguage documentLanguageFromName(std::string_view name) noexcept
ProgrammaticChange
History policy of an explicit programmatic text change.
Definition line_edit.hpp:41
std::function< std::expected< void, TreeError >(const ModelFrame< T > &, const std::optional< ModelRequest< T > > &)> ManagedViewHandler
Owning callback after each successful virtual-view preparation, including layout retries....
Definition managed_model.hpp:25
@ CLOSED
The owning tree or source is closed.
Definition widget_types.hpp:31
@ CALLBACK_FAILED
A user extension or callback threw.
Definition widget_types.hpp:37
@ WRONG_SESSION
An identity or scope belongs to another tree/scheduler.
Definition widget_types.hpp:29
@ STALE_NODE
The observed node or model consumer is absent or retired.
Definition widget_types.hpp:30
@ INVALID_ARGUMENT
An option, enum value or operation argument is invalid.
Definition widget_types.hpp:27
@ NO_MEMORY
Allocation failed inside the operation boundary.
Definition widget_types.hpp:33
Owning scalar state of one immutable presentation producer.
Definition data_presentation.hpp:21
Fixed raw-byte rows; auto-fit may choose a smaller row at preparation time.
Definition document_view.hpp:43
Owning validation presentation; messages remain meaningful without color.
Definition form_field.hpp:25
Original error plus independent runner/restoration and cleanup failures.
Definition managed_diagnostics.hpp:62
Explicit rebinding policy; omitted history options inherit the session's settings.
Definition managed_navigation.hpp:44
Owning arranged geometry; invalid geometry must never be used for hit-testing.
Definition widget_types.hpp:48
A successful set result; notification rejection does not undo the committed value....
Definition property.hpp:38
Owning committed row-host orientation; native cursor sources never invent ordinals.
Definition virtual_rows.hpp:53
Cold native window delivery capability, with no invented finite extent/current.
Definition ui_virtual_rows.hpp:364
Internal bridge for checked access to managed scene and recipe state.
Definition ui_recipe_access.hpp:28
Checked registration bridge to the checkbox's sole managed binding.
Definition ui_event_access.hpp:105
Checked adapter to the managed-owned click chain; never owns a widget or scene.
Definition ui_event_access.hpp:36
Checked registration bridge to the editor's existing managed-owned binding.
Definition ui_event_access.hpp:71
Checked adapter to managed-owned layout observations; never owns a widget or scene.
Definition ui_event_access.hpp:11
Owning request identity; the facade and its widgets remain weakly observed.
Definition ui_ref.hpp:46
std::string name
Case-sensitive ID; fallible default construction stays checked.
Definition ui_ref.hpp:52
std::weak_ptr< SceneAnchor > anchor
Stable facade publication, revoked before cleanup.
Definition ui_ref.hpp:50
std::thread::id owner
Immutable originating UI thread.
Definition ui_ref.hpp:51
~LookupSource()=default
Suppress implicit noexcept moves; checked MSVC string transfers can allocate.
const char * expectedType
Static RTTI label for typed diagnostic context.
Definition ui_ref.hpp:54
std::shared_ptr< RefTarget > observation
Optional original dynamic slot for identity-preserving conversion.
Definition ui_ref.hpp:55
std::source_location origin
Original lookup site.
Definition ui_ref.hpp:53
Internal checked named publication bridge; no widget or scene ownership escapes.
Definition ui_ref.hpp:2399
static std::expected< Node< LineEdit >, ManagedError > fieldDraft(ManagedScene &scene, Node< Widget > node)
Definition ui_ref.hpp:2501
static std::expected< NodeId, ManagedError > scope(ManagedScene &scene, const std::shared_ptr< RefTarget > &target)
Definition ui_ref.hpp:2415
static Ref< T > request(const LookupSource &request)
Definition ui_ref.hpp:2618
static std::shared_ptr< RefTarget > target(const DynamicRef &reference)
Definition ui_ref.hpp:2704
static void report(ManagedScene &scene, ManagedError &failure, const LookupSource &source)
Definition ui_ref.hpp:2602
static std::expected< Node< Widget >, ManagedError > find(ManagedScene &scene, std::string_view name)
Definition ui_ref.hpp:2459
static std::shared_ptr< RefTarget > target(const Ref< T > &reference)
Definition ui_ref.hpp:2610
static std::expected< void, ManagedError > publish(const Ref< T > &reference, ManagedScene &scene, Node< Widget > node)
Definition ui_ref.hpp:2538
static void reject(const Ref< T > &reference, const ManagedError &failure)
Definition ui_ref.hpp:2594
static std::expected< Node< Widget >, ManagedError > observe(ManagedScene &scene, const std::shared_ptr< RefTarget > &source)
Definition ui_ref.hpp:2438
static StyleStage scopeStyle(const StyleStage &stage, std::shared_ptr< RefTarget > target)
Definition ui_style.hpp:208
Shared observation; publication and all mutable fields belong to the constructing UI thread.
Definition ui_ref.hpp:71
const std::thread::id owner
Immutable affinity checked before mutable fields.
Definition ui_ref.hpp:72
Node< Widget > node
Published identity, never automatically reset.
Definition ui_ref.hpp:75
Node< Password > secret
Protected editor identity; never grants plaintext access.
Definition ui_ref.hpp:79
std::weak_ptr< const void > lifetime
Does not retain the scene or its widgets.
Definition ui_ref.hpp:74
Node< LineEdit > draft
Typed editor identity, empty for other widgets.
Definition ui_ref.hpp:78
std::shared_ptr< const ManagedError > failure
Owning failure, allocated only for a rejected named request.
Definition ui_ref.hpp:77
Node< Control > caption
Typed caption identity, empty for other widgets.
Definition ui_ref.hpp:76
ManagedScene * scene
Borrowed only while lifetime remains live on UI.
Definition ui_ref.hpp:73
Stable weak facade publication; mutable fields are accessed only after UI admission.
Definition ui_scene.hpp:209
T Type
Domain value retained by each model row.
Definition ui_ref.hpp:173
Definition ui_ref.hpp:169