|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
Presentation rule: the listed field is shown only while Cond holds. Never gates allRulesSatisfied — while hidden, the field's current draft value still travels in the payload (hiding never clears it), exactly like a static x-hidden field.
More...
#include <forms.hpp>
Public Member Functions | |
| constexpr bool | test (const A &action) const noexcept |
| Always true: presentation rules never gate submission. A renderer inspects when directly (not this method) to decide the field's visibility. | |
| glz::generic_u64 | emitNode () const |
| Emits this rule's x-rules JSON node. | |
Public Attributes | |
| V A::* | field |
| Pointer to the member whose visibility this rule controls. | |
| Cond | when |
| The condition that, when true, makes field visible. | |
Static Public Attributes | |
| static constexpr detail::RuleKind | kind = detail::RuleKind::VisibleWhen |
| The wire "kind" this rule emits: "visibleWhen". | |
| static constexpr bool | isPresentation = true |
| Presentation rule: never participates in the gate. | |
Presentation rule: the listed field is shown only while Cond holds. Never gates allRulesSatisfied — while hidden, the field's current draft value still travels in the payload (hiding never clears it), exactly like a static x-hidden field.
| V | Field member type. |
| A | Action type the field belongs to. |
| Cond | Condition node type. |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscard |
Emits this rule's x-rules JSON node.
| V A::* morph::forms::VisibleWhen< V, A, Cond >::field |
| Cond morph::forms::VisibleWhen< V, A, Cond >::when |
|
staticconstexpr |
The wire "kind" this rule emits: "visibleWhen".
|
staticconstexpr |