Builds widgets for nodes and wires their props and callbacks.
More...
#include <mount.hpp>
Builds widgets for nodes and wires their props and callbacks.
One per Mounted. It must outlive every scope it mounted into: a Switch, Tabs, Dialog, ForEach or Table binding calls back into it to mount content later.
Definition at line 213 of file mount.hpp.
◆ Mounter()
- Parameters
-
| runtime | The runtime bindings are made in. Borrowed. |
| backend | Makes the widgets. Borrowed. |
Definition at line 217 of file mount.hpp.
◆ mount()
Mounts node under parent; scope owns its widgets and bindings.
A node's widget is adopted first, then its bindings, then its children, so destroying the scope destroys bindings before their widget and children before their parent.
- Parameters
-
| scope | Owns everything mounted. |
| node | The node; null mounts nothing. |
| parent | The container to append to, or null for a root. |
- Returns
- The node's widget, or null for a null node.
Definition at line 228 of file mount.hpp.
◆ mountRoot()
Mounts node as mount does, as a mount of its own: the first autofocus widget it mounts, in document order, takes keyboard focus once the whole of it has mounted.
- Parameters
-
| scope | Owns everything mounted. |
| node | The node; null mounts nothing. |
| parent | The container to append to, or null for a root. |
- Returns
- The node's widget, or null for a null node.
Definition at line 248 of file mount.hpp.
◆ focus()
| bool morph::ui::detail::Mounter::focus |
( |
std::string_view | focusId | ) |
|
|
inline |
Moves keyboard focus to the mounted widget whose focusId is focusId.
Of several such widgets (rows of a list), the one mounted first is taken. A backend that cannot move focus leaves it where it was; the request was still made.
- Parameters
-
- Returns
- Whether a mounted widget has that name.
Definition at line 258 of file mount.hpp.
The documentation for this class was generated from the following file: