]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlWrap.C
5 new lfuns, move all apply code out of ControlDocument and into the core.
[lyx.git] / src / frontends / controllers / ControlWrap.C
1 /**
2  * \file ControlWrap.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Dekel Tsur
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ControlWrap.h"
14 #include "funcrequest.h"
15 #include "insets/insetwrap.h"
16
17
18 using std::string;
19
20
21 ControlWrap::ControlWrap(Dialog & parent)
22         : Dialog::Controller(parent)
23 {}
24
25
26 bool ControlWrap::initialiseParams(string const & data)
27 {
28         InsetWrapParams params;
29         InsetWrapMailer::string2params(data, params);
30         params_.reset(new InsetWrapParams(params));
31         return true;
32 }
33
34
35 void ControlWrap::clearParams()
36 {
37         params_.reset();
38 }
39
40
41 void ControlWrap::dispatchParams()
42 {
43         string const lfun = InsetWrapMailer::params2string(params());
44         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
45 }