|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A widget with children. A factory given this container appends the new widget as its last child. More...
#include <backend.hpp>
Public Member Functions | |
| virtual void | moveChild (Widget &child, std::size_t index)=0 |
Moves child to position index: it is removed, then inserted before the child now at index. | |
| Public Member Functions inherited from morph::ui::Widget | |
| Widget (Widget const &)=delete | |
| Widget & | operator= (Widget const &)=delete |
| Widget (Widget &&)=delete | |
| Widget & | operator= (Widget &&)=delete |
| virtual void | setVisible (bool visible)=0 |
| Shows or hides the widget and everything inside it. | |
| virtual void | setEnabled (bool enabled)=0 |
| Enables or disables input on the widget and everything inside it. | |
| virtual void | setLayout (LayoutHints const &hints)=0 |
| Sets the size request. | |
| virtual void | setDragKey (std::optional< Key > const &key)=0 |
Makes the widget draggable, carrying key, or not draggable. | |
| virtual void | setDropHandler (std::function< bool(Key const &)> accepts, std::function< void(Key)> onDrop)=0 |
| Makes the widget a drop target. | |
| virtual void | setAccessibleName (std::string_view name)=0 |
| Sets the name assistive technology reads for the widget. | |
| virtual void | setAccessibleRole (std::string_view role)=0 |
| Sets the role assistive technology announces for the widget. | |
| virtual void | setTestId (std::string_view testId)=0 |
| Sets the stable identifier an automated test finds the widget by. | |
| virtual void | setTooltip (std::string_view text)=0 |
| Sets the text shown while the pointer rests on the widget. | |
| virtual void | setSurface (std::string_view surface)=0 |
| Styles the widget and everything inside it with a named token set of the theme. | |
| virtual void | setKeys (std::vector< std::string > const &chords, std::function< void(std::string)> onChord)=0 |
| Declares the keyboard chords the widget handles while focus is inside it. | |
| virtual void | focus ()=0 |
| Moves keyboard focus to the widget. | |
| virtual void | setOnHover (std::function< void()> onHover) |
Calls onHover each time the pointer comes to rest over the widget. A backend without a pointer, or one that does not report hovering, keeps the default, which never calls it: hovering is a hint, such as a prefetch, never something a widget relies on. | |
A widget with children. A factory given this container appends the new widget as its last child.
Definition at line 103 of file backend.hpp.
|
pure virtual |
Moves child to position index: it is removed, then inserted before the child now at index.
The child is moved, not recreated: it keeps its native state, such as its properties, handlers, focus and selection.
| child | One of this container's children. |
| index | The new position; past the end means last. |
Implemented in morph::ui::testing::detail::FakeContainer< CollapsibleWidget >, morph::ui::testing::detail::FakeContainer< DialogWidget >, morph::ui::testing::detail::FakeContainer< DrawerWidget >, morph::ui::testing::detail::FakeContainer< DropZoneWidget >, morph::ui::testing::detail::FakeContainer< GridWidget >, morph::ui::testing::detail::FakeContainer< morph::ui::SlotWidget >, morph::ui::testing::detail::FakeContainer< PanelWidget >, morph::ui::testing::detail::FakeContainer< SplitterWidget >, morph::ui::testing::detail::FakeContainer< StackWidget >, morph::ui::testing::detail::FakeContainer< TableWidget >, and morph::ui::testing::detail::FakeContainer< TabsWidget >.