]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlVSpace.cpp
make lyx compile
[lyx.git] / src / frontends / controllers / ControlVSpace.cpp
1 /**
2  * \file ControlVSpace.cpp
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 namespace lyx {
24 namespace frontend {
25
26 ControlVSpace::ControlVSpace(Dialog & parent)
27         : Dialog::Controller(parent)
28 {}
29
30
31 bool ControlVSpace::initialiseParams(string const & data)
32 {
33         InsetVSpaceMailer::string2params(data, params_);
34
35         // so that the user can press Ok
36         dialog().setButtonsValid(true);
37
38         return true;
39 }
40
41
42 void ControlVSpace::clearParams()
43 {
44         params_ = VSpace();
45 }
46
47
48 void ControlVSpace::dispatchParams()
49 {
50         string const str = InsetVSpaceMailer::params2string(params_);
51         kernel().dispatch(FuncRequest(getLfun(), str));
52 }
53
54
55 VSpace & ControlVSpace::params()
56 {
57         return params_;
58 }
59
60
61 VSpace const & ControlVSpace::params() const
62 {
63         return params_;
64 }
65
66 } // namespace frontend
67 } // namespace lyx