|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A fake PanelWidget: properties title, header (the child's id), padding, collapsible, collapsed. More...
#include <recording_backend.hpp>
Public Member Functions | |
| void | setTitle (std::string_view title) override |
| Replaces the title. | |
| void | setPadding (int padding) override |
| Sets the space between frame and content. | |
| void | setCollapsible (bool collapsible) override |
| Sets whether the user can collapse the panel. | |
| void | setHeader (Widget &header) override |
| Records property header, the child's id. | |
| void | setCollapsed (bool collapsed) override |
| Collapses or expands the panel. A collapsed panel hides its content, which takes no input; its own collapse control still works. The header is not part of "its content" for this purpose: it stays shown and usable while collapsed. Never calls the onToggle handler. | |
| void | setOnToggle (std::function< void(bool)> onToggle) override |
| Sets what a user collapse or expand calls, with the requested state. | |
| Public Member Functions inherited from morph::ui::testing::detail::FakeContainer< PanelWidget > | |
| void | moveChild (Widget &child, std::size_t index) override |
| Moves a child among its siblings and logs it. | |
| Public Member Functions inherited from morph::ui::testing::detail::FakeLeaf< PanelWidget > | |
| FakeLeaf (std::shared_ptr< RecordStore > store, std::string kind, ContainerWidget const *parent, PropList initial={}) | |
Records the new widget, appended to parent, and logs its creation. | |
| ~FakeLeaf () override | |
| Forgets the widget and logs its destruction; its remaining children become roots. | |
| FakeLeaf & | operator= (FakeLeaf const &)=delete |
| void | setVisible (bool visible) override |
| Records property visible. | |
| void | setEnabled (bool enabled) override |
| Records property enabled. | |
| void | setLayout (LayoutHints const &hints) override |
| Records property layout, as formatLayout gives it. | |
| void | setDragKey (std::optional< Key > const &key) override |
| Records property dragKey and keeps the key for RecordingBackend::drag. | |
| void | setDropHandler (std::function< bool(Key const &)> accepts, std::function< void(Key)> onDrop) override |
| Records property drop=handler and keeps both handlers for RecordingBackend::drag. | |
| void | setAccessibleName (std::string_view name) override |
| Records property a11yName. | |
| void | setAccessibleRole (std::string_view role) override |
| Records property a11yRole. | |
| void | setTestId (std::string_view testId) override |
| Records property testId. | |
| void | setTooltip (std::string_view text) override |
| Records property tooltip. | |
| void | setSurface (std::string_view surface) override |
| Records property surface. | |
| void | setKeys (std::vector< std::string > const &chords, std::function< void(std::string)> onChord) override |
| Records property keys, the chords joined by commas, and keeps the chords and the handler for RecordingBackend::press. | |
| void | focus () override |
| Moves the backend's recorded focus here, and logs focus. | |
| void | setOnHover (std::function< void()> onHover) override |
| Keeps the handler for RecordingBackend::hover. | |
| Public Member Functions inherited from morph::ui::Widget | |
| Widget (Widget const &)=delete | |
| Widget & | operator= (Widget const &)=delete |
| Widget (Widget &&)=delete | |
| Widget & | operator= (Widget &&)=delete |
Additional Inherited Members | |
| Protected Member Functions inherited from morph::ui::testing::detail::FakeLeaf< PanelWidget > | |
| void | set (std::string_view name, std::string value) |
| Records a property set through a setter. | |
| Callbacks & | callbacks () |
| This widget's handlers. | |
| RecordStore & | store () const noexcept |
| The store this widget records into. | |
| std::shared_ptr< RecordStore > const & | sharedStore () const noexcept |
| The store, shared: what a part this widget makes (an overlay's footer) records into. | |
| int | id () const noexcept |
| This widget's id. | |
A fake PanelWidget: properties title, header (the child's id), padding, collapsible, collapsed.
Definition at line 1078 of file recording_backend.hpp.
|
inlineoverridevirtual |
Replaces the title.
| title | The title, UTF-8. |
Implements morph::ui::PanelWidget.
Definition at line 1081 of file recording_backend.hpp.
|
inlineoverridevirtual |
Sets the space between frame and content.
| padding | A spacing step, 0 to kMaxSpacingStep; the mount never passes another value. |
Implements morph::ui::PanelWidget.
Definition at line 1082 of file recording_backend.hpp.
|
inlineoverridevirtual |
Sets whether the user can collapse the panel.
| collapsible | Whether a collapse control is shown. |
Implements morph::ui::PanelWidget.
Definition at line 1083 of file recording_backend.hpp.
|
inlineoverridevirtual |
Records property header, the child's id.
| header | One of this widget's children. |
| std::logic_error | when header is not this widget's child. |
Implements morph::ui::PanelWidget.
Definition at line 1088 of file recording_backend.hpp.
|
inlineoverridevirtual |
Collapses or expands the panel. A collapsed panel hides its content, which takes no input; its own collapse control still works. The header is not part of "its content" for this purpose: it stays shown and usable while collapsed. Never calls the onToggle handler.
| collapsed | Whether the content is hidden. |
Implements morph::ui::PanelWidget.
Definition at line 1095 of file recording_backend.hpp.
|
inlineoverridevirtual |
Sets what a user collapse or expand calls, with the requested state.
| onToggle | The handler; empty does nothing. |
Implements morph::ui::PanelWidget.
Definition at line 1096 of file recording_backend.hpp.