|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A WorkspaceModel's options: the workspace's, and how a tab's page is made and unmade. More...
#include <workspace_model.hpp>
Public Attributes | |
| std::function< std::expected< std::unique_ptr< ScreenHandle >, MountError >(WorkspaceTabId tab, std::string_view screenId, ParamMap const ¶ms)> | mountPage |
| Makes a tab's page and mounts the screen in it, a document screen or a host screen alike; the model owns the handle it answers. Required. | |
| std::function< void(WorkspaceTabId tab)> | unmountPage |
| Called after a tab's handle is destroyed, so the application destroys its page; may be empty. | |
| Public Attributes inherited from morph::ui::WorkspaceOptions | |
| std::function< WorkspaceScreen(std::string_view)> | screens |
| The catalog facts of a screen id; empty treats every screen as plain. | |
| ScreenHostRegistry const * | hosts = nullptr |
| The host screens a catalog entry's host names. Borrowed; null mounts none. | |
| std::function< void(std::vector< std::string > const &)> | onRecord |
| Receives the record: the routes of the open tabs, in order, each time the tabs change. A tab with no route (a param with no route form) is left out. Empty writes no record. | |
| reactive::Scheduler * | scheduler = nullptr |
| When given, a burst of changes writes the record once, recordDelay after the last of them. Borrowed. | |
| std::chrono::milliseconds | recordDelay {500} |
| The quiet period before the record is written, with a scheduler. | |
| std::function< void()> | onChanged |
| Called after the open tabs, their titles, unsaved state or identities, or the active tab changed; empty calls nothing. | |
A WorkspaceModel's options: the workspace's, and how a tab's page is made and unmade.
Definition at line 107 of file workspace_model.hpp.
| std::function<std::expected<std::unique_ptr<ScreenHandle>, MountError>( WorkspaceTabId tab, std::string_view screenId, ParamMap const& params)> morph::ui::WorkspaceModelOptions::mountPage |
Makes a tab's page and mounts the screen in it, a document screen or a host screen alike; the model owns the handle it answers. Required.
Definition at line 112 of file workspace_model.hpp.
| std::function<void(WorkspaceTabId tab)> morph::ui::WorkspaceModelOptions::unmountPage |
Called after a tab's handle is destroyed, so the application destroys its page; may be empty.
Definition at line 114 of file workspace_model.hpp.