]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlERT.C
Overhaul the branches code.
[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 #include "ControlERT.h"
15 #include "funcrequest.h"
16
17
18 using std::string;
19
20
21 ControlERT::ControlERT(Dialog & parent)
22         : Dialog::Controller(parent), status_(InsetERT::Collapsed)
23 {}
24
25
26 bool ControlERT::initialiseParams(string const & data)
27 {
28         InsetERTMailer::string2params(data, status_);
29         return true;
30 }
31
32
33 void ControlERT::clearParams()
34 {
35         status_ = InsetERT::Collapsed;
36 }
37
38
39 void ControlERT::dispatchParams()
40 {
41         string const lfun = InsetERTMailer::params2string(status_);
42         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
43 }