|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
What a frontend lends the source it opens and the screens it mounts. More...
#include <frontend.hpp>
Public Member Functions | |
| AppContext (AppContext const &)=delete | |
| AppContext & | operator= (AppContext const &)=delete |
| AppContext (AppContext &&)=delete | |
| AppContext & | operator= (AppContext &&)=delete |
| virtual reactive::Runtime & | runtime ()=0 |
| The runtime the screens are mounted in. Owned by the frontend. | |
| virtual exec::IExecutor & | executor ()=0 |
| The runtime's owner, and the callback executor of every bridge handler the source and the screens make. | |
| virtual Scheduler & | scheduler ()=0 |
| Timers that fire on the owner executor. | |
| virtual exec::IoLoop * | ioLoop ()=0 |
| The I/O loop the frontend runs on, for sockets and timers that share its one thread. | |
| virtual void | quit (int exitCode=0)=0 |
| Makes Frontend::run return once the current event has been handled. | |
What a frontend lends the source it opens and the screens it mounts.
Everything it lends (the runtime, the executor, the scheduler, the loop) outlives the screens and the connections made with it: a frontend destroys those, through runApp, before its runtime.
Definition at line 50 of file frontend.hpp.
|
pure virtual |
The runtime the screens are mounted in. Owned by the frontend.
|
pure virtual |
The runtime's owner, and the callback executor of every bridge handler the source and the screens make.
|
pure virtual |
Timers that fire on the owner executor.
It honours every guarantee of reactive::Scheduler, as docs/spec/reactive/control.md ("The `Scheduler` contract") states them.
|
pure virtual |
The I/O loop the frontend runs on, for sockets and timers that share its one thread.
|
pure virtual |
Makes Frontend::run return once the current event has been handled.
Called before the loop runs (from AppSource::open, or from mounting the shell), it still ends the run once the loop starts.
| exitCode | What run returns. |