|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A view node (spec 5 §9). The kind's own properties come from its builder's options; the properties every node takes come from the member functions, each of which returns a copy with the property set. More...
#include <author.hpp>
Public Member Functions | |
| Node (Json json, CatalogFacts facts={}) | |
| A node over its JSON, for a kind no builder spells. | |
| Json const & | json () const noexcept |
| The node's JSON. | |
| CatalogFacts const & | facts () const noexcept |
| The catalog facts of the models and actions the node names. | |
| Node | with (std::string const &key, AnyHandle const &value) const |
| A property set to an expression; an absent expression leaves the node as it is. | |
| Node | withText (std::string const &key, std::string const &value) const |
| A property set to a plain string. | |
| Node | id (Element const &element) const |
| The element id, by which relations read its values. | |
| Node | visible (AnyHandle const &condition) const |
| Whether the node shows. | |
| Node | enabled (AnyHandle const &condition) const |
| Whether the node is enabled. | |
| Node | tooltip (AnyHandle const &text) const |
| A tooltip. | |
| Node | sizing (AnyHandle const &sizing) const |
| The width's sizing: "content", {"fixed": n} or {"stretch": w}, such as content(), fixed(n) or stretch() give. | |
| Node | sizing (AnyHandle const &width, AnyHandle const &height) const |
| The sizing of both dimensions, as a {width, height} record; an absent one is content. Literal sizings (content(), fixed(n), stretch(w)) make a literal record, which the loader checks; another is evaluated at mount. | |
| Node | alignSelf (Align align) const |
| Where the node sits in its row, column or grid, in place of the container's align. | |
| Node | minWidth (int units) const |
| The least width, in backend units. | |
| Node | maxWidth (int units) const |
| The most width, in backend units. | |
| Node | minHeight (int units) const |
| The least height, in backend units. | |
| Node | maxHeight (int units) const |
| The most height, in backend units. | |
| Node | span (AnyHandle const &columns) const |
| The grid columns the node spans. | |
| Node | autofocus (AnyHandle const &focus) const |
| Whether the node takes focus when it mounts. | |
| Node | testId (std::string const &name) const |
| A stable identifier for automated tests. | |
| Node | surface (std::string const &name) const |
| A named token set for the subtree. | |
| Node | a11y (AnyHandle const &name, std::string const &role={}) const |
| The accessible name and role. | |
| Node | drag (AnyHandle const &payload) const |
| Makes the node draggable. | |
| Node | drop (AnyHandle const &accepts, Commands const &onDrop) const |
| Makes the node a drop target. | |
| Node | key (std::string const &chord, Commands const &commands) const |
| A key binding. | |
| Node | readonly (AnyHandle const &condition) const |
| Whether an input or text is read-only. | |
| Node | required (AnyHandle const &condition) const |
| Whether an input or text is required. | |
| Node | errors (AnyHandle const &errors) const |
| Errors shown on an input or text. | |
| Node | stale (AnyHandle const &condition) const |
| Whether an input or text shows a value that is being recalculated. | |
A view node (spec 5 §9). The kind's own properties come from its builder's options; the properties every node takes come from the member functions, each of which returns a copy with the property set.
Definition at line 1778 of file author.hpp.
|
inlineexplicit |
A node over its JSON, for a kind no builder spells.
| json | The node. |
| facts | The catalog facts of the models and actions it names. |
Definition at line 1783 of file author.hpp.
|
inlinenodiscardnoexcept |
|
inlinenodiscardnoexcept |
The catalog facts of the models and actions the node names.
Definition at line 1791 of file author.hpp.
|
inlinenodiscard |
A property set to an expression; an absent expression leaves the node as it is.
| key | The property. |
| value | The expression. |
Definition at line 1797 of file author.hpp.
|
inlinenodiscard |
A property set to a plain string.
| key | The property. |
| value | The string. |
Definition at line 1809 of file author.hpp.
The element id, by which relations read its values.
| element | The element. |
Definition at line 1818 of file author.hpp.
Whether the node shows.
| condition | The condition. |
Definition at line 1823 of file author.hpp.
Whether the node is enabled.
| condition | The condition. |
Definition at line 1828 of file author.hpp.
A tooltip.
| text | The text. |
Definition at line 1833 of file author.hpp.
|
inlinenodiscard |
The sizing of both dimensions, as a {width, height} record; an absent one is content. Literal sizings (content(), fixed(n), stretch(w)) make a literal record, which the loader checks; another is evaluated at mount.
| width | The width's sizing. |
| height | The height's sizing. |
Definition at line 1847 of file author.hpp.
Where the node sits in its row, column or grid, in place of the container's align.
| align | The alignment. |
Definition at line 1872 of file author.hpp.
|
inlinenodiscard |
The least width, in backend units.
| units | The bound, 0 or more. |
Definition at line 1877 of file author.hpp.
|
inlinenodiscard |
The most width, in backend units.
| units | The bound, 0 or more. |
Definition at line 1882 of file author.hpp.
|
inlinenodiscard |
The least height, in backend units.
| units | The bound, 0 or more. |
Definition at line 1887 of file author.hpp.
|
inlinenodiscard |
The most height, in backend units.
| units | The bound, 0 or more. |
Definition at line 1892 of file author.hpp.
The grid columns the node spans.
| columns | The span. |
Definition at line 1897 of file author.hpp.
Whether the node takes focus when it mounts.
| focus | The condition. |
Definition at line 1902 of file author.hpp.
|
inlinenodiscard |
A stable identifier for automated tests.
| name | The identifier. |
Definition at line 1907 of file author.hpp.
|
inlinenodiscard |
A named token set for the subtree.
| name | The token set. |
Definition at line 1912 of file author.hpp.
|
inlinenodiscard |
The accessible name and role.
| name | The name. |
| role | The role; empty for the kind's own. |
Definition at line 1918 of file author.hpp.
Makes the node draggable.
| payload | The payload a drop receives. |
Definition at line 1934 of file author.hpp.
|
inlinenodiscard |
Makes the node a drop target.
| accepts | The payloads it accepts. |
| onDrop | The commands run with the payload as event. |
Definition at line 1944 of file author.hpp.
|
inlinenodiscard |
A key binding.
| chord | The chord, such as Ctrl+S. |
| commands | The commands. |
Definition at line 1959 of file author.hpp.
Whether an input or text is read-only.
| condition | The condition. |
Definition at line 1969 of file author.hpp.
Whether an input or text is required.
| condition | The condition. |
Definition at line 1974 of file author.hpp.
Errors shown on an input or text.
| errors | The errors. |
Definition at line 1979 of file author.hpp.
Whether an input or text shows a value that is being recalculated.
| condition | The condition. |
Definition at line 1984 of file author.hpp.