]> git.lyx.org Git - lyx.git/blob - src/FuncStatus.h
func_status cleanup from Martin; fix small configure bug
[lyx.git] / src / FuncStatus.h
1 // -*- C++ -*-
2 #ifndef FUNC_STATUS_H
3 #define FUNC_STATUS_H
4
5 /// The status of a function.
6
7 class FuncStatus
8 {
9 private:
10
11         enum StatusCodes {
12                 ///
13                 OK = 0,
14                 ///
15                 UNKNOWN = 1,
16                 ///
17                 DISABLED = 2,  // Command cannot be executed
18                 ///
19                 ON = 4,
20                 ///
21                 OFF = 8
22         };
23
24         unsigned int v_;
25
26 public:
27         ///
28         FuncStatus();
29         //
30         FuncStatus & clear ();
31         ///
32         void operator |= (FuncStatus const & f);
33         ///
34         FuncStatus & unknown(bool b);
35         ///
36         bool unknown() const;
37         
38         ///
39         FuncStatus & disabled (bool b);
40         ///
41         bool disabled () const;
42
43         ///
44         void setOnOff (bool b);
45         ///
46         bool onoff (bool b) const;
47 };
48
49 #endif