|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
Typed wrappers that carry rendering-control intent for a form field. More...
#include <concepts>#include <glaze/glaze.hpp>#include <optional>#include <string>#include <string_view>#include <type_traits>#include <utility>#include "detail/schema_name.hpp"Go to the source code of this file.
Classes | |
| struct | morph::forms::Multiline |
| A string field edited as a multi-line text area. More... | |
| struct | morph::forms::Ranged< Min, Max, Step > |
| A bounded numeric field edited as a slider. More... | |
Typed wrappers that carry rendering-control intent for a form field.
morph::forms::Multiline and morph::forms::Ranged<Min, Max, Step> are thin field-type wrappers in the same family as morph::forms::Choice (choice.hpp): each carries a rendering control preference in the C++ type itself — Multiline says "edit me as a text area", Ranged says "edit me as a slider with these bounds" — and morph::forms::schemaJson surfaces that preference as the x-widget (and, for Ranged, x-min / x-max / x-step) schema annotation(s). See docs/spec/forms/widget_hints.md for the full design.
Neither wrapper changes what travels on the wire: the glz::meta specialisations below reflect each type's bare payload directly, exactly as Choice does, so Multiline serialises as a plain JSON string and Ranged as a nullable number.
Definition in file widget_hints.hpp.