]> git.lyx.org Git - lyx.git/blob - src/FuncStatus.h
small stuff, whitespace & consistent naming
[lyx.git] / src / FuncStatus.h
1 // -*- C++ -*-
2 /**
3  * \file FuncStatus.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jean-Marc Lasgouttes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef FUNC_STATUS_H
13 #define FUNC_STATUS_H
14
15 /// The status of a function.
16
17 class FuncStatus
18 {
19 private:
20
21         enum StatusCodes {
22                 ///
23                 OK = 0,
24                 ///
25                 UNKNOWN = 1,
26                 ///
27                 DISABLED = 2,  // Command cannot be executed
28                 ///
29                 ON = 4,
30                 ///
31                 OFF = 8
32         };
33
34         unsigned int v_;
35
36 public:
37         ///
38         FuncStatus();
39         //
40         void clear();
41         ///
42         void operator|=(FuncStatus const & f);
43         ///
44         void unknown(bool b);
45         ///
46         bool unknown() const;
47
48         ///
49         void disabled(bool b);
50         ///
51         bool disabled() const;
52
53         ///
54         void setOnOff(bool b);
55         ///
56         bool onoff(bool b) const;
57 };
58
59 #endif