]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlFloat.C
This file is part of LyX, the document processor.
[lyx.git] / src / frontends / controllers / ControlFloat.C
1 /**
2  * \file ControlFloat.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author unknown
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "ControlFloat.h"
18 #include "BufferView.h"
19 #include "buffer.h"
20
21
22 ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
23         : ControlInset<InsetFloat, FloatParams>(lv, d)
24 {}
25
26
27 void ControlFloat::applyParamsToInset()
28 {
29         inset()->placement(params().placement);
30         inset()->wide(params().wide, bufferview()->buffer()->params);
31         bufferview()->updateInset(inset(), true);
32
33 }
34
35
36 void ControlFloat::applyParamsNoInset()
37 {}
38
39
40 FloatParams const ControlFloat::getParams(InsetFloat const & inset)
41 {
42         return FloatParams(inset);
43 }
44
45
46 FloatParams::FloatParams()
47         : placement("htbp"),
48           wide(false)
49 {}
50
51
52 FloatParams::FloatParams(InsetFloat const & inset)
53         : placement(inset.placement()),
54           wide(inset.wide())
55 {}