/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock
56 by edam
updated software to include drawing abstraction infrastructure
1
#include "major_mode.h"
2
#include <vector>
3
4
5
class MinorMode;
6
class Drawer;
7
8
9
class ModeSwitcher
10
    :
11
    public MajorMode
12
{
13
public:
14
15
	ModeSwitcher();
16
17
	/**
18
	 * Called to inform the major mode that there has been a short press.
19
	 */
20
	void short_press();
21
22
	/**
23
	 * Called to inform the major mode that there has been a long press.
24
	 */
25
	void long_press();
26
27
	/**
28
	 * Called when this major mode is becoming active
29
	 */
30
	void activate();
31
32
	/**
33
	 * Retrieve a drawer.
34
	 *
35
	 * @return drawer
36
	 */
37
	Drawer &get_drawer();
38
39
private:
40
41
	/* minor modes that this mode switcher switches */
42
	std::vector< MinorMode * > _modes;
43
44
	/* current mode */
45
	int _mode;
46
47
};