]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlERT.C
52f1ea1dd044ba08207ab7c8810f9d8ca02390c5
[lyx.git] / src / frontends / controllers / ControlERT.C
1 /**
2  * \file ControlERT.cpp
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 namespace lyx {
21 namespace frontend {
22
23 ControlERT::ControlERT(Dialog & parent)
24         : Dialog::Controller(parent), status_(InsetERT::Collapsed)
25 {}
26
27
28 bool ControlERT::initialiseParams(string const & data)
29 {
30         InsetERTMailer::string2params(data, status_);
31         return true;
32 }
33
34
35 void ControlERT::clearParams()
36 {
37         status_ = InsetERT::Collapsed;
38 }
39
40
41 void ControlERT::dispatchParams()
42 {
43         string const lfun = InsetERTMailer::params2string(status_);
44         kernel().dispatch(FuncRequest(getLfun(), lfun));
45 }
46
47 } // namespace frontend
48 } // namespace lyx