/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/mode_switcher.h

  • Committer: edam
  • Date: 2012-02-25 01:29:52 UTC
  • Revision ID: tim@ed.am-20120225012952-32q8gg07aovk3qxh
updated arduino.mk

Show diffs side-by-side

added added

removed removed

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
 
};