|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A bounded numeric field edited as a slider. More...
#include <widget_hints.hpp>
Public Member Functions | |
| constexpr | Ranged () noexcept=default |
| Constructs the empty state. | |
| constexpr | Ranged (decltype(Min) selected) noexcept |
Engages with selected. | |
| constexpr | Ranged (std::optional< decltype(Min)> payload) noexcept |
| Adopts an optional payload as-is. | |
| constexpr bool | hasValue () const noexcept |
| Whether a value has been entered. | |
| constexpr decltype(Min) | operator* () const noexcept |
| Unchecked access to the engaged value (UB when empty, exactly like std::optional::operator*). | |
| constexpr bool | operator== (const Ranged &other) const =default |
| Equality on the payload; empty equals only empty. | |
Static Public Member Functions | |
| static constexpr auto | min () noexcept |
| The slider's inclusive lower bound. | |
| static constexpr auto | max () noexcept |
| The slider's inclusive upper bound. | |
| static constexpr auto | step () noexcept |
| The slider's track increment. | |
| static constexpr std::string_view | widget () noexcept |
| The preferred control id for this field. | |
Public Attributes | |
| std::optional< decltype(Min)> | value |
| The payload; std::nullopt means "not entered". | |
A bounded numeric field edited as a slider.
| Min | Inclusive lower bound of the control track. |
| Max | Inclusive upper bound of the control track (must be > Min). |
| Step | Track increment (default 1; must be > 0). Must be the same arithmetic type as Min/Max — a floating-point Ranged must name Step explicitly (the default 1 is int). |
Definition at line 72 of file widget_hints.hpp.
|
inlineconstexprnoexcept |
Engages with selected.
| selected | The selected value. |
Definition at line 84 of file widget_hints.hpp.
|
inlineconstexprnoexcept |
Adopts an optional payload as-is.
| payload | Engaged or empty payload. |
Definition at line 88 of file widget_hints.hpp.
|
inlinenodiscardconstexprnoexcept |
Whether a value has been entered.
Definition at line 92 of file widget_hints.hpp.
|
inlinenodiscardconstexprnoexcept |
Unchecked access to the engaged value (UB when empty, exactly like std::optional::operator*).
Definition at line 98 of file widget_hints.hpp.
|
inlinestaticnodiscardconstexprnoexcept |
|
inlinestaticnodiscardconstexprnoexcept |
|
inlinestaticnodiscardconstexprnoexcept |
|
inlinestaticnodiscardconstexprnoexcept |
The preferred control id for this field.
Definition at line 114 of file widget_hints.hpp.
|
nodiscardconstexprdefault |
Equality on the payload; empty equals only empty.
| other | Ranged to compare against. |
| std::optional<decltype(Min)> morph::forms::Ranged< Min, Max, Step >::value |
The payload; std::nullopt means "not entered".
Definition at line 77 of file widget_hints.hpp.