|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
The app explorer, as a host screen (spec 6 §15): a splitter with the list — a search, the catalog's screens, and every model the catalog names with every action of it — and the chosen action's sections: its facts, its fields, the places that use it, and "Try it", the widget the framework builds for it, mounted live. More...
#include <explorer.hpp>
Public Member Functions | |
| Explorer (reactive::Runtime &runtime, IViewBackend &backend, ContainerWidget &page, ExplorerOptions options) | |
The explorer, appended to page. | |
| Explorer (Explorer const &)=delete | |
| Explorer & | operator= (Explorer const &)=delete |
| Explorer (Explorer &&)=delete | |
| Explorer & | operator= (Explorer &&)=delete |
| ~Explorer () override | |
| Unmounts the "Try it" screen first, then the widgets it sits in. | |
| reactive::Computed< std::string > const & | title () const override |
| The title. | |
| reactive::Computed< bool > const & | dirty () const override |
| Never dirty. | |
| reactive::Computed< Value > const & | identity () const override |
| No identity: one explorer per workspace. | |
| void | requestClose (std::function< void(bool closed)> done) override |
| Closes when asked. | |
| void | forceClose () override |
| Closes the "Try it" screen. | |
| bool | select (std::string const &actionId) |
| Shows an action's sections, as choosing it in the list does. | |
| std::string const & | selected () const noexcept |
| The action shown. | |
| Public Member Functions inherited from morph::ui::ScreenHandle | |
| ScreenHandle (ScreenHandle const &)=delete | |
| ScreenHandle & | operator= (ScreenHandle const &)=delete |
| ScreenHandle (ScreenHandle &&)=delete | |
| ScreenHandle & | operator= (ScreenHandle &&)=delete |
| virtual ScreenHead * | head () noexcept |
| The screen's head beside its title, for a shell to show above it. | |
| virtual bool | canSave () const |
| Whether the screen can save its changes: a document screen that declares onSave, or a host screen whose handle implements save. A close guard offers save and close only when this is true. | |
| virtual void | save (std::function< void(bool clean)> done) |
| Saves the screen's changes (spec 6 §15) and answers whether it is then clean. | |
The app explorer, as a host screen (spec 6 §15): a splitter with the list — a search, the catalog's screens, and every model the catalog names with every action of it — and the chosen action's sections: its facts, its fields, the places that use it, and "Try it", the widget the framework builds for it, mounted live.
Built from backend widgets, so every frontend shows it. Its title is "Explorer"; it is never dirty, and closes when asked. Neither copyable nor movable; owned by the owner thread of its backend.
Test ids: explorer, explorer_search, explorer_screen_<id>, explorer_model_<type>, explorer_action_<id>, explorer_title, explorer_facts, explorer_fields, explorer_uses, explorer_open_<n>, explorer_tryit, explorer_tryit_status, explorer_schema, and inside "Try it" the generated document's own (tryit, …).
Definition at line 432 of file explorer.hpp.
|
inline |
The explorer, appended to page.
| runtime | The reactive runtime its title is computed in. Borrowed. |
| backend | The backend its widgets are made with. Borrowed. |
| page | The container it is appended to; it outlives the explorer. |
| options | What it shows and reports. |
Definition at line 439 of file explorer.hpp.
|
inlineoverride |
Unmounts the "Try it" screen first, then the widgets it sits in.
Definition at line 481 of file explorer.hpp.
|
inlinenodiscardoverridevirtual |
The title.
Implements morph::ui::ScreenHandle.
Definition at line 485 of file explorer.hpp.
|
inlinenodiscardoverridevirtual |
Never dirty.
Implements morph::ui::ScreenHandle.
Definition at line 489 of file explorer.hpp.
|
inlinenodiscardoverridevirtual |
No identity: one explorer per workspace.
Implements morph::ui::ScreenHandle.
Definition at line 493 of file explorer.hpp.
|
inlineoverridevirtual |
Closes when asked.
| done | Called with true. |
Implements morph::ui::ScreenHandle.
Definition at line 497 of file explorer.hpp.
|
inlineoverridevirtual |
Closes the "Try it" screen.
Implements morph::ui::ScreenHandle.
Definition at line 505 of file explorer.hpp.
|
inline |
Shows an action's sections, as choosing it in the list does.
| actionId | The action id. |
Definition at line 510 of file explorer.hpp.
|
inlinenodiscardnoexcept |