]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlVSpace.C
move space above/below from Paragraph into a separate vspace inset.
[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
16 #include "funcrequest.h"
17 #include "insets/insetvspace.h"
18
19
20 using std::istringstream;
21 using std::string;
22
23
24 ControlVSpace::ControlVSpace(Dialog & parent)
25         : Dialog::Controller(parent)
26 {}
27
28
29 bool ControlVSpace::initialiseParams(string const & data)
30 {
31         InsetVSpaceMailer::string2params(data, params_);
32         return true;
33 }
34
35
36 void ControlVSpace::clearParams()
37 {
38         params_ = VSpace();
39 }
40
41
42 void ControlVSpace::dispatchParams()
43 {
44         string const str = InsetVSpaceMailer::params2string(params_);
45         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, str));
46 }
47
48
49 VSpace & ControlVSpace::params()
50 {
51         return params_;
52 }
53
54
55 VSpace const & ControlVSpace::params() const
56 {
57         return params_;
58 }