]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlERT.C
d1d7d13331e0bba0c88e8580508fb271185be286
[lyx.git] / src / frontends / controllers / ControlERT.C
1 /* This file is part of
2  * ======================================================
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 2001 The LyX Team.
7  *
8  * ======================================================
9  *
10  * \author Jürgen Vigna, jug@sad.it
11  * \author Angus Leeming <leeming@lyx.org>
12  */
13
14 #include <config.h>
15
16 #ifdef __GNUG__
17 #pragma implementation
18 #endif
19
20 #include "ControlERT.h"
21
22 // sorry this is just a temporary hack we should include vspace.h! (Jug)
23 extern const char * stringFromUnit(int);
24
25
26 ControlERT::ControlERT(LyXView & lv, Dialogs & d)
27         : ControlInset<InsetERT, ERTParams>(lv, d)
28 {}
29
30
31 void ControlERT::applyParamsToInset()
32 {
33         inset()->status(bufferview(), params().status);
34 }
35
36
37 void ControlERT::applyParamsNoInset()
38 {
39 }
40
41
42 ERTParams const ControlERT::getParams(InsetERT const & inset)
43 {
44         return ERTParams(inset);
45 }
46
47
48 ERTParams::ERTParams()
49         : status(InsetERT::Collapsed)
50 {}
51
52
53 ERTParams::ERTParams(InsetERT const & inset)
54         : status(inset.status())
55 {}
56
57
58 bool operator==(ERTParams const & p1, ERTParams const & p2)
59 {
60         return (p1.status == p2.status);
61 }
62
63
64 bool operator!=(ERTParams const & p1, ERTParams const & p2)
65 {
66         return !(p1 == p2);
67 }