The part every node carries: visibility, enablement, layout, drag-and-drop, accessibility, test identity, tooltip, surface, keyboard chords and autofocus.
More...
#include <view.hpp>
|
| Prop< bool > | visible = true |
| | Whether the widget is shown.
|
| Prop< bool > | enabled = true |
| | Whether the widget accepts input.
|
| LayoutHints | layout {} |
| | The size request; set once.
|
| Prop< std::optional< Key > > | dragKey |
| | Engaged: the widget can be dragged, and a drop delivers this key.
|
| std::function< bool(Key const &)> | accepts |
| | Whether a drop of a key is accepted; empty accepts every key. Used only when onDrop is set.
|
| std::function< void(Key)> | onDrop |
| | Set: the widget is a drop target, called with the dropped key.
|
| Accessibility | a11y {} |
| | The accessible name and role.
|
| std::string | testId |
| | The stable identifier an automated test finds the widget by; empty means none. Set once.
|
| std::string | focusId |
| | The name a focus request after mount finds the widget by (Mounted::focus), such as a document element's id; empty means none. Set once.
|
| Prop< std::string > | tooltip |
| | Text shown while the pointer rests on the widget; empty shows none.
|
| std::string | surface |
| | The named token set of the theme that styles this node and everything inside it; empty is the theme's default. Set once.
|
| std::vector< KeyBinding > | keys |
| | Chords handled while focus is inside the node; the innermost node declaring a chord takes it. For a chord listed twice, the first entry is the one called.
|
| bool | autofocus = false |
| | Whether the widget takes keyboard focus when the content it is part of mounts; the first such widget in document order wins.
|
The part every node carries: visibility, enablement, layout, drag-and-drop, accessibility, test identity, tooltip, surface, keyboard chords and autofocus.
Definition at line 348 of file view.hpp.
◆ visible
| Prop<bool> morph::ui::Common::visible = true |
Whether the widget is shown.
Definition at line 350 of file view.hpp.
◆ enabled
| Prop<bool> morph::ui::Common::enabled = true |
Whether the widget accepts input.
Definition at line 352 of file view.hpp.
◆ layout
The size request; set once.
Definition at line 354 of file view.hpp.
◆ dragKey
| Prop<std::optional<Key> > morph::ui::Common::dragKey |
Engaged: the widget can be dragged, and a drop delivers this key.
Definition at line 356 of file view.hpp.
◆ accepts
| std::function<bool(Key const&)> morph::ui::Common::accepts |
Whether a drop of a key is accepted; empty accepts every key. Used only when onDrop is set.
Definition at line 358 of file view.hpp.
◆ onDrop
| std::function<void(Key)> morph::ui::Common::onDrop |
Set: the widget is a drop target, called with the dropped key.
Definition at line 360 of file view.hpp.
◆ a11y
The accessible name and role.
Definition at line 362 of file view.hpp.
◆ testId
| std::string morph::ui::Common::testId |
The stable identifier an automated test finds the widget by; empty means none. Set once.
Definition at line 364 of file view.hpp.
◆ focusId
| std::string morph::ui::Common::focusId |
The name a focus request after mount finds the widget by (Mounted::focus), such as a document element's id; empty means none. Set once.
Definition at line 367 of file view.hpp.
◆ tooltip
| Prop<std::string> morph::ui::Common::tooltip |
Text shown while the pointer rests on the widget; empty shows none.
Definition at line 369 of file view.hpp.
◆ surface
| std::string morph::ui::Common::surface |
The named token set of the theme that styles this node and everything inside it; empty is the theme's default. Set once.
Definition at line 372 of file view.hpp.
◆ keys
Chords handled while focus is inside the node; the innermost node declaring a chord takes it. For a chord listed twice, the first entry is the one called.
Definition at line 375 of file view.hpp.
◆ autofocus
| bool morph::ui::Common::autofocus = false |
Whether the widget takes keyboard focus when the content it is part of mounts; the first such widget in document order wins.
Definition at line 378 of file view.hpp.
The documentation for this struct was generated from the following file: