|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A view node of the document (spec 5 §9), or a structured part of one (a table column, a tab, a switch case, a menu item, an a11y, drag, drop or action record, a form field overlay). More...
#include <document.hpp>
Public Member Functions | |
| ExprPtr | prop (std::string_view key) const |
| An expression property. | |
| Commands const * | event (std::string_view key) const |
| A command list. | |
| std::span< DocNodePtr const > | nodes (std::string_view key) const |
| A child node list. | |
| std::span< DocNodePtr const > | partList (std::string_view key) const |
| A list of parts. | |
| std::string_view | name (std::string_view key) const |
| A plain string property. | |
| bool | flag (std::string_view key) const |
| A literal flag. | |
Public Attributes | |
| std::string | kind |
| The node kind (text, table, …), or for a part its part kind (column, tab, case, …). | |
| std::string | id |
| The element id; empty when none is given. | |
| std::string | path |
| The node's JSON Pointer. | |
| std::map< std::string, ExprPtr, std::less<> > | props |
| Expression properties, by key. | |
| std::map< std::string, Commands, std::less<> > | events |
| Command lists, by key (onClick, …), including a custom node's on events as on.<event>. | |
| std::map< std::string, std::vector< DocNodePtr >, std::less<> > | children |
| Child node lists, by key (children, header, loading, error, default, cell, fallback). | |
| std::map< std::string, std::vector< DocNodePtr >, std::less<> > | parts |
| Structured parts, by key (columns, tabs, cases, items, a11y, action, fields, …). | |
| std::map< std::string, std::string, std::less<> > | names |
| Plain string properties, by key (testId, surface, name of a custom node, model and action of a form, point of customize, role of a11y, a column's id, …). | |
| std::map< std::string, Commands, std::less<> > | keys |
| Key bindings: chord to commands. | |
| std::map< std::string, bool, std::less<> > | flags |
| Literal flags, by key (showLabel of an input). | |
| std::optional< ScopeDecl > | scope |
| The declarations of the scope the node creates (dialog, drawer, switch case, forEach or table row); empty for a node that creates none. | |
A view node of the document (spec 5 §9), or a structured part of one (a table column, a tab, a switch case, a menu item, an a11y, drag, drop or action record, a form field overlay).
Properties are kept by their document keys, so the interpreter reads a kind's properties by name; which keys a kind has, and what shape each takes, is the kind table of docs/spec/ui/document.md.
Definition at line 394 of file document.hpp.
|
inlinenodiscard |
An expression property.
| key | The key. |
Definition at line 423 of file document.hpp.
|
inlinenodiscard |
A command list.
| key | The key. |
Definition at line 431 of file document.hpp.
|
inlinenodiscard |
A child node list.
| key | The key. |
Definition at line 439 of file document.hpp.
|
inlinenodiscard |
A list of parts.
| key | The key. |
Definition at line 447 of file document.hpp.
|
inlinenodiscard |
A plain string property.
| key | The key. |
Definition at line 455 of file document.hpp.
|
inlinenodiscard |
A literal flag.
| key | The key. |
Definition at line 463 of file document.hpp.
| std::string morph::ui::DocNode::kind |
The node kind (text, table, …), or for a part its part kind (column, tab, case, …).
Definition at line 396 of file document.hpp.
| std::string morph::ui::DocNode::id |
The element id; empty when none is given.
Definition at line 398 of file document.hpp.
| std::string morph::ui::DocNode::path |
The node's JSON Pointer.
Definition at line 400 of file document.hpp.
| std::map<std::string, ExprPtr, std::less<> > morph::ui::DocNode::props |
Expression properties, by key.
Definition at line 402 of file document.hpp.
| std::map<std::string, Commands, std::less<> > morph::ui::DocNode::events |
Command lists, by key (onClick, …), including a custom node's on events as on.<event>.
Definition at line 404 of file document.hpp.
| std::map<std::string, std::vector<DocNodePtr>, std::less<> > morph::ui::DocNode::children |
Child node lists, by key (children, header, loading, error, default, cell, fallback).
Definition at line 406 of file document.hpp.
| std::map<std::string, std::vector<DocNodePtr>, std::less<> > morph::ui::DocNode::parts |
Structured parts, by key (columns, tabs, cases, items, a11y, action, fields, …).
Definition at line 408 of file document.hpp.
| std::map<std::string, std::string, std::less<> > morph::ui::DocNode::names |
Plain string properties, by key (testId, surface, name of a custom node, model and action of a form, point of customize, role of a11y, a column's id, …).
Definition at line 411 of file document.hpp.
| std::map<std::string, Commands, std::less<> > morph::ui::DocNode::keys |
Key bindings: chord to commands.
Definition at line 413 of file document.hpp.
| std::map<std::string, bool, std::less<> > morph::ui::DocNode::flags |
Literal flags, by key (showLabel of an input).
Definition at line 415 of file document.hpp.
| std::optional<ScopeDecl> morph::ui::DocNode::scope |
The declarations of the scope the node creates (dialog, drawer, switch case, forEach or table row); empty for a node that creates none.
Definition at line 418 of file document.hpp.