|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A frontend: owns an event loop and a renderer, and runs one source's screens. More...
#include <frontend.hpp>
Public Member Functions | |
| Frontend (Frontend const &)=delete | |
| Frontend & | operator= (Frontend const &)=delete |
| Frontend (Frontend &&)=delete | |
| Frontend & | operator= (Frontend &&)=delete |
| virtual std::string_view | name () const =0 |
| The name selectFrontend matches. | |
| virtual int | run (AppSource &source)=0 |
Builds the runtime and its executor, opens source, mounts the app shell and drives the loop until AppContext::quit. | |
A frontend: owns an event loop and a renderer, and runs one source's screens.
Definition at line 175 of file frontend.hpp.
|
nodiscardpure virtual |
The name selectFrontend matches.
Implemented in morph::qt_quick::Frontend, and morph::tui::Frontend.
|
pure virtual |
Builds the runtime and its executor, opens source, mounts the app shell and drives the loop until AppContext::quit.
Tears down in reverse: the screens, then the source's connections, then the runtime, then the loop and the toolkit. A frontend leaves the first two to runApp, which fixes that order, and keeps the rest by declaring its members or locals in construction order.
| source | Where the screens and the models are; it outlives the call. |
Implemented in morph::qt_quick::Frontend, and morph::tui::Frontend.