Numworks Epsilon
1.4.1
Graphing Calculator Operating System
container.h
Go to the documentation of this file.
1
#ifndef ESCHER_CONTAINER_H
2
#define ESCHER_CONTAINER_H
3
4
/* Container is the entry point of a program using Escher.
5
*
6
* A container contains one or multiple App, and is responsible for running them
7
* together. Currently Container displays a single App fullscreen, but can
8
* switch to any other App.
9
*
10
* When writing an Escher program, you typically subclass Container, and your
11
* subclass owns one or more App. You then call "run()" on your container. */
12
13
#include <
escher/run_loop.h
>
14
#include <
escher/app.h
>
15
#include <
escher/window.h
>
16
#include <
ion/events.h
>
17
18
class
Container
:
public
RunLoop
{
19
public
:
20
Container
();
21
virtual
~Container
();
22
Container
(
const
Container
& other) =
delete
;
23
Container
(
Container
&& other) =
delete
;
24
Container
&
operator=
(
const
Container
& other) =
delete
;
25
Container
&
operator=
(
Container
&& other) =
delete
;
26
virtual
void
run
();
27
App
*
activeApp
();
28
virtual
bool
dispatchEvent
(
Ion::Events::Event
event)
override
;
29
virtual
void
switchTo
(
App::Snapshot
* snapshot);
30
protected
:
31
virtual
Window
*
window
() = 0;
32
private
:
33
void
step();
34
int
numberOfTimers()
override
;
35
Timer
* timerAtIndex(
int
i)
override
;
36
virtual
int
numberOfContainerTimers();
37
virtual
Timer
* containerTimerAtIndex(
int
i);
38
App
* m_activeApp;
39
};
40
41
#endif
RunLoop
Definition:
run_loop.h:7
Container::switchTo
virtual void switchTo(App::Snapshot *snapshot)
Definition:
container.cpp:16
Timer
Definition:
timer.h:15
window.h
Window
Definition:
window.h:6
app.h
Container
Definition:
container.h:18
events.h
Ion::Events::Event
Definition:
events.h:9
run_loop.h
Container::run
virtual void run()
Definition:
container.cpp:46
Container::window
virtual Window * window()=0
Container::~Container
virtual ~Container()
Definition:
container.cpp:10
App::Snapshot
Definition:
app.h:31
App
Definition:
app.h:23
Container::Container
Container()
Definition:
container.cpp:4
Container::operator=
Container & operator=(const Container &other)=delete
Container::dispatchEvent
virtual bool dispatchEvent(Ion::Events::Event event) override
Definition:
container.cpp:38
Container::activeApp
App * activeApp()
Definition:
container.cpp:34
epsilon
escher
include
escher
container.h
Generated by
1.8.14