]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/checkedwidgets.h
get rid of broken_header.h and some unneeded tests
[lyx.git] / src / frontends / xforms / checkedwidgets.h
1 // -*- C++ -*-
2 /**
3  * \file xforms/checkedwidgets.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CHECKEDWIDGETS_H
13 #define CHECKEDWIDGETS_H
14
15 #include "BCView.h"
16 #include "forms_fwd.h"
17
18 namespace lyx {
19 namespace frontend {
20
21 void addCheckedLyXLength(BCView & bcview,
22                          FL_OBJECT * input, FL_OBJECT * label = 0);
23
24 void addCheckedGlueLength(BCView & bcview,
25                           FL_OBJECT * input, FL_OBJECT * label = 0);
26
27 class CheckedLyXLength : public CheckedWidget {
28 public:
29         /** The label widget's label will be turned red if input
30          *  does not make a valid LyXLength.
31          *  If label == 0, then the label of input will be used.
32          */
33         CheckedLyXLength(FL_OBJECT * input, FL_OBJECT * label = 0);
34
35 private:
36         ///
37         virtual bool check() const;
38
39         ///
40         FL_OBJECT * input_;
41         FL_OBJECT * label_;
42 };
43
44
45 class CheckedGlueLength : public CheckedWidget {
46 public:
47         /** The label widget's label will be turned red if input
48          *  does not make a valid LyXGlueLength.
49          *  If label == 0, then the label of input will be used.
50          */
51         CheckedGlueLength(FL_OBJECT * input, FL_OBJECT * label = 0);
52
53 private:
54         ///
55         virtual bool check() const;
56
57         ///
58         FL_OBJECT * input_;
59         FL_OBJECT * label_;
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // CHECKEDWIDGETS_H