4#include <portals/line_edit.hpp>
5#include <portals/numeric.hpp>
24 :
Row({}, policy), skin_(
skin) {
57 std::optional<PropertyUpdate<NumericValue>>
commit;
75 std::expected<SpinBoxResult, TreeError>
setValue(
double value);
78 friend class ManagedScene;
85 std::shared_ptr<LineEditBinding> editorBinding()
const;
87 void retain(std::shared_ptr<void> record);
88 std::shared_ptr<void> retained()
const;
89 std::shared_ptr<State> state_;
104 std::uint64_t pageSteps, std::function<
void(
SpinBoxResult)> result,
UI-owned focus and synchronous bubbling over an existing WidgetTree. Tree and Scheduler must outlive ...
Definition action.hpp:169
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable....
Definition managed.hpp:530
Copyable typed observer; never owns or exposes an unchecked widget pointer.
Definition widget.hpp:92
UI-owned typed value with node-scoped observers and explicit partial delivery. WidgetTree and its Sch...
Definition property.hpp:62
Row(LinearOptions options={}, SizePolicy policy={})
Own settings and policies.
std::expected< SpinBoxResult, TreeError > setValue(double value)
~SpinBoxBinding()
Disconnect future input/data delivery; admitted callbacks retain their owners.
SpinBoxBinding(SpinBoxBinding &&other) noexcept
SpinBoxBinding & operator=(SpinBoxBinding &&other) noexcept
std::expected< void, TreeError > sync(Node< Widget > focused)
friend std::expected< SpinBoxBinding, TreeError > bindSpinBox(WidgetTree &, EventRouter &, Node< LineEdit >, Node< Button >, Node< Button >, std::shared_ptr< Property< NumericValue > >, std::uint64_t, std::function< void(SpinBoxResult)>, LineEditEvents)
Bind pre-mounted editor/decrement/increment children of one SpinBox.
Node< LineEdit > editor() const noexcept
Definition spin_box.hpp:28
SpinBoxSkin skin() const noexcept
Definition spin_box.hpp:33
std::expected< CellSize, TreeError > measure(CellSize available) override
Definition spin_box.hpp:38
SpinBox(SizePolicy policy=DEFAULT_CONTENT_POLICY, SpinBoxSkin skin=SpinBoxSkin::STANDARD)
Definition spin_box.hpp:23
Public Portals API.
Definition action.hpp:8
SpinBoxSkin
Immutable presentation of the two numeric step buttons.
Definition spin_box.hpp:9
@ ARROWS
Bracketed down/up arrows with ASCII width fallback.
Definition spin_box.hpp:12
@ STANDARD
Five-cell bracketed minus/plus buttons; the default.
Definition spin_box.hpp:10
@ COMPACT
Legacy one-cell minus/plus buttons.
Definition spin_box.hpp:11
constexpr SizePolicy DEFAULT_CONTENT_POLICY
Intrinsic content on both axes; explicit policies remain authoritative.
Definition layout.hpp:44
std::expected< SpinBoxBinding, TreeError > bindSpinBox(WidgetTree &tree, EventRouter &router, Node< LineEdit > editor, Node< Button > decrease, Node< Button > increase, std::shared_ptr< Property< NumericValue > > model, std::uint64_t pageSteps, std::function< void(SpinBoxResult)> result, LineEditEvents events={})
Bind pre-mounted editor/decrement/increment children of one SpinBox.
@ INVALID_ARGUMENT
An option, enum value or operation argument is invalid.
Definition widget_types.hpp:27
An owning available extent in terminal columns/rows.
Definition geometry.hpp:44
Optional owning UI callbacks delivered after the legacy result, while the node remains live....
Definition line_edit.hpp:149
Exact editing or confirmation result delivered on the UI thread.
Definition line_edit.hpp:104
Owning independent policies for width and height.
Definition layout.hpp:35
Existing text editing outcome and its exact numeric receipt, if publication occurred....
Definition spin_box.hpp:55
std::optional< PropertyUpdate< NumericValue > > commit
Exact numeric set receipt; never a later snapshot.
Definition spin_box.hpp:57
LineEditResult editing
Owning text/history outcome, including validation/conflict and technical errors.
Definition spin_box.hpp:56