1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
15 #pragma implementation
19 #include "ButtonControllerBase.h"
20 #include "ControlFloat.h"
24 #include "BufferView.h"
25 #include "insets/insetfloat.h"
31 ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
32 : ControlInset<InsetFloat, FloatParams>(lv, d)
34 d_.showFloat.connect(slot(this, &ControlFloat::showInset));
36 // We could have an extra method updateInset that calls
37 // view().update() rather than view().show(), but I don't see why
38 // it is really needed.
39 //d_.updateFloat.connect(slot(this, &ControlFloat::showInset));
43 void ControlFloat::applyParamsToInset()
45 inset()->placement(params().placement);
49 void ControlFloat::applyParamsNoInset()
53 FloatParams const ControlFloat::getParams(InsetFloat const & inset)
55 return FloatParams(inset);
59 FloatParams::FloatParams()
61 allow_here_definitely(true)
65 FloatParams::FloatParams(InsetFloat const & inset)
66 : placement(inset.placement()),
67 allow_here_definitely(!inset.wide())