]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlVSpace.C
5 new lfuns, move all apply code out of ControlDocument and into the core.
[lyx.git] / src / frontends / controllers / ControlVSpace.C
1 /**
2  * \file ControlVSpace.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Edwin Leuven
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "ControlVSpace.h"
15 #include "ButtonController.h"
16
17 #include "funcrequest.h"
18 #include "insets/insetvspace.h"
19
20
21 using std::istringstream;
22 using std::string;
23
24
25 ControlVSpace::ControlVSpace(Dialog & parent)
26         : Dialog::Controller(parent)
27 {}
28
29
30 bool ControlVSpace::initialiseParams(string const & data)
31 {
32         InsetVSpaceMailer::string2params(data, params_);
33
34         // so that the user can press Ok
35         dialog().bc().valid();
36
37         return true;
38 }
39
40
41 void ControlVSpace::clearParams()
42 {
43         params_ = VSpace();
44 }
45
46
47 void ControlVSpace::dispatchParams()
48 {
49         string const str = InsetVSpaceMailer::params2string(params_);
50         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, str));
51 }
52
53
54 VSpace & ControlVSpace::params()
55 {
56         return params_;
57 }
58
59
60 VSpace const & ControlVSpace::params() const
61 {
62         return params_;
63 }