]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlERT.C
include sys/time.h
[lyx.git] / src / frontends / controllers / ControlERT.C
1 /**
2  * \file ControlERT.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Jürgen Vigna
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #include <config.h>
13
14
15 #include "ControlERT.h"
16
17 // sorry this is just a temporary hack we should include vspace.h! (Jug)
18 extern const char * stringFromUnit(int);
19
20
21 ControlERT::ControlERT(LyXView & lv, Dialogs & d)
22         : ControlInset<InsetERT, ERTParams>(lv, d)
23 {}
24
25
26 void ControlERT::applyParamsToInset()
27 {
28         inset()->status(bufferview(), params().status);
29 }
30
31
32 void ControlERT::applyParamsNoInset()
33 {
34 }
35
36
37 ERTParams const ControlERT::getParams(InsetERT const & inset)
38 {
39         return ERTParams(inset);
40 }
41
42
43 ERTParams::ERTParams()
44         : status(InsetERT::Collapsed)
45 {}
46
47
48 ERTParams::ERTParams(InsetERT const & inset)
49         : status(inset.status())
50 {}
51
52
53 bool operator==(ERTParams const & p1, ERTParams const & p2)
54 {
55         return (p1.status == p2.status);
56 }
57
58
59 bool operator!=(ERTParams const & p1, ERTParams const & p2)
60 {
61         return !(p1 == p2);
62 }