/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "major_mode.h"
#include <vector>


class MinorMode;
class Drawer;


class ModeSwitcher
    :
    public MajorMode
{
public:

	ModeSwitcher();

	/**
	 * Called to inform the major mode that there has been a short press.
	 */
	void short_press();

	/**
	 * Called to inform the major mode that there has been a long press.
	 */
	void long_press();

	/**
	 * Called when this major mode is becoming active
	 */
	void activate();

	/**
	 * Retrieve a drawer.
	 *
	 * @return drawer
	 */
	Drawer &get_drawer();

private:

	/* minor modes that this mode switcher switches */
	std::vector< MinorMode * > _modes;

	/* current mode */
	int _mode;

};