]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/checkedwidgets.h
Introduce LFUN_PRINT.
[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
16 #include "BCView.h"
17 #include "forms_fwd.h"
18
19 void addCheckedLyXLength(BCView & bcview,
20                          FL_OBJECT * input, FL_OBJECT * label = 0);
21
22 void addCheckedGlueLength(BCView & bcview,
23                           FL_OBJECT * input, FL_OBJECT * label = 0);
24
25 class CheckedLyXLength : public CheckedWidget {
26 public:
27         /** The label widget's label will be turned red if input
28          *  does not make a valid LyXLength.
29          *  If label == 0, then the label of input will be used.
30          */
31         CheckedLyXLength(FL_OBJECT * input, FL_OBJECT * label = 0);
32
33 private:
34         ///
35         virtual bool check() const;
36
37         ///
38         FL_OBJECT * input_;
39         FL_OBJECT * label_;
40 };
41
42
43 class CheckedGlueLength : public CheckedWidget {
44 public:
45         /** The label widget's label will be turned red if input
46          *  does not make a valid LyXGlueLength.
47          *  If label == 0, then the label of input will be used.
48          */
49         CheckedGlueLength(FL_OBJECT * input, FL_OBJECT * label = 0);
50
51 private:
52         ///
53         virtual bool check() const;
54
55         ///
56         FL_OBJECT * input_;
57         FL_OBJECT * label_;
58 };
59
60 #endif // CHECKEDWIDGETS_H