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"
21 #include "ControlInset.tmpl"
25 #include "BufferView.h"
26 #include "insets/insetfloat.h"
32 ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
33 : ControlInset<InsetFloat, FloatParams>(lv, d)
35 d_.showFloat.connect(slot(this, &ControlFloat::showInset));
37 // We could have an extra method updateInset that calls
38 // view().update() rather than view().show(), but I don't see why
39 // it is really needed.
40 //d_.updateFloat.connect(slot(this, &ControlFloat::showInset));
44 void ControlFloat::applyParamsToInset()
46 inset()->placement(params().placement);
50 void ControlFloat::applyParamsNoInset()
54 FloatParams const ControlFloat::getParams(InsetFloat const & inset)
56 return FloatParams(inset);
60 FloatParams::FloatParams()
62 allow_here_definitely(true)
66 FloatParams::FloatParams(InsetFloat const & inset)
67 : placement(inset.placement()),
68 allow_here_definitely(!inset.wide())