|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
FormModel: the immutable runtime model of one action's form, read from the schema JSON schemaJson<A>() emits (or any document in that vocabulary). More...
#include <algorithm>#include <cmath>#include <compare>#include <cstddef>#include <cstdint>#include <expected>#include <iterator>#include <map>#include <optional>#include <span>#include <stdexcept>#include <string>#include <string_view>#include <utility>#include <vector>#include "../../util/rational.hpp"#include "../blank_as.hpp"#include "../layout.hpp"#include "detail/text.hpp"#include "rules.hpp"Go to the source code of this file.
Classes | |
| struct | morph::forms::UnitOption |
| One unit a Quantity can be entered in; the first of a field's units is canonical. More... | |
| struct | morph::forms::ChoiceOption |
| One selectable value of an Enum or a Choice. More... | |
| struct | morph::forms::ChoiceSpec |
| Where a Choice's options come from (x-optionsAction and its companions). More... | |
| struct | morph::forms::FieldSpec |
| Everything the engine knows about one field, from its schema property. More... | |
| struct | morph::forms::FieldOverlay |
| What a document (or an application) changes about one top-level field before the session is built: a form node's fields entry (spec 6 ยง10). An unset member keeps the schema's. More... | |
| struct | morph::forms::FieldGroupSpec |
| One x-layout group, or the implicit group of the fields no group names. More... | |
| class | morph::forms::FormModel |
| The immutable runtime model of one action's form. More... | |
Typedefs | |
| using | morph::forms::FieldOverlays = std::map<std::string, FieldOverlay, std::less<>> |
| The overlays of a form's fields, by wire name. | |
Enumerations | |
| enum class | morph::forms::FieldKind : std::uint8_t { Text , Multiline , Integer , Number , Decimal , Quantity , Boolean , Enum , Choice , DateTime , Date , EpochDateTime , EpochDate , Slider , Array , Object , ObjectArray } |
| The control a field gets, which the JSON type alone does not say. More... | |
| enum class | morph::forms::SubmitMode : std::uint8_t { Automatic , Explicit } |
| When a form submits. More... | |
Functions | |
| constexpr std::string_view | morph::forms::fieldKindName (FieldKind kind) noexcept |
| The stable name of a field kind (what Overrides::byKind documents and tests print). | |
Variables | |
| constexpr std::size_t | morph::forms::kMaxNestingDepth = 4 |
| How many object levels below the action a schema is described; a deeper member is FieldSpec::truncated. | |
FormModel: the immutable runtime model of one action's form, read from the schema JSON schemaJson<A>() emits (or any document in that vocabulary).
Specified in docs/spec/forms/engine.md, "The field model".
Definition in file field_model.hpp.
| using morph::forms::FieldOverlays = std::map<std::string, FieldOverlay, std::less<>> |
The overlays of a form's fields, by wire name.
Definition at line 264 of file field_model.hpp.
|
strong |
The control a field gets, which the JSON type alone does not say.
Definition at line 36 of file field_model.hpp.
|
strong |
When a form submits.
| Enumerator | |
|---|---|
| Automatic | Whenever it becomes ready with a changed body (no x-submitMode). |
| Explicit | Only on FormSession::submit() (x-submitMode: explicit). |
Definition at line 103 of file field_model.hpp.
|
nodiscardconstexprnoexcept |
The stable name of a field kind (what Overrides::byKind documents and tests print).
| kind | The kind. |
Definition at line 61 of file field_model.hpp.
|
inlineconstexpr |
How many object levels below the action a schema is described; a deeper member is FieldSpec::truncated.
Definition at line 110 of file field_model.hpp.