|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The catalog as a list a person opens screens from, with a title search and pinned shortcuts. More...
#include <navigator.hpp>
Public Member Functions | |
| Navigator (IViewBackend &backend, ContainerWidget *parent, NavigatorOptions options) | |
The navigator, appended to parent. | |
| Navigator (Navigator const &)=delete | |
| Navigator & | operator= (Navigator const &)=delete |
| Navigator (Navigator &&)=delete | |
| Navigator & | operator= (Navigator &&)=delete |
| StackWidget & | root () noexcept |
| The navigator's root widget, which the host places. | |
| void | focusSearch () |
| Moves keyboard focus to the search, as the navigator's shortcut does. | |
| bool | pin (std::string const &screenId) |
| Pins a screen at the end of the pins. | |
| bool | unpin (std::string const &screenId) |
| Removes a pin. | |
| std::vector< std::string > const & | pins () const noexcept |
| The pins, in order. | |
| void | setCurrent (std::string_view screenId) |
| Marks the entry of the screen that is open, and clears the mark of the one marked before. A pin is not marked. | |
| std::string const & | current () const noexcept |
| The screen whose entry is marked. | |
The catalog as a list a person opens screens from, with a title search and pinned shortcuts.
Entries are grouped by module, then group, in the order each first appears; each group has a heading. Each entry is a list item (ButtonStyle::Item) as wide as the navigator, and setCurrent marks the open screen's. An unavailable entry is listed disabled, with its reason as its tooltip. The search shows the entries one of whose titles contains the text, ignoring ASCII case, and the headings of the groups that still show one. Neither copyable nor movable; owned by the owner thread of its backend.
Test ids: navigator, navigator_search, navigator_pins, nav_<screen id>, pin_<screen id>, and navigator_group_<module>/<group> for a heading.
Definition at line 57 of file navigator.hpp.
|
inline |
The navigator, appended to parent.
| backend | The backend its widgets are made with. Borrowed. |
| parent | The container it is appended to; null makes it a backend root. |
| options | The entries, the pins and the handlers. |
Definition at line 63 of file navigator.hpp.
|
inlinenodiscardnoexcept |
The navigator's root widget, which the host places.
Definition at line 92 of file navigator.hpp.
|
inline |
Moves keyboard focus to the search, as the navigator's shortcut does.
Definition at line 95 of file navigator.hpp.
|
inline |
Pins a screen at the end of the pins.
| screenId | The screen id. |
Definition at line 100 of file navigator.hpp.
|
inline |
Removes a pin.
| screenId | The screen id. |
Definition at line 112 of file navigator.hpp.
|
inlinenodiscardnoexcept |
|
inline |
Marks the entry of the screen that is open, and clears the mark of the one marked before. A pin is not marked.
| screenId | The open screen's id; one the navigator does not list, or empty, leaves no entry marked. |
Definition at line 127 of file navigator.hpp.
|
inlinenodiscardnoexcept |
The screen whose entry is marked.
Definition at line 144 of file navigator.hpp.