2 * \file ControlMinipage.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS
15 #pragma implementation
18 #include "ControlMinipage.h"
19 #include "BufferView.h"
22 ControlMinipage::ControlMinipage(LyXView & lv, Dialogs & d)
23 : ControlInset<InsetMinipage, MinipageParams>(lv, d)
27 void ControlMinipage::applyParamsToInset()
29 inset()->pageWidth(params().pageWidth);
30 inset()->pos(params().pos);
32 bufferview()->updateInset(inset(), true);
36 void ControlMinipage::applyParamsNoInset()
41 MinipageParams const ControlMinipage::getParams(InsetMinipage const & inset)
43 return MinipageParams(inset);
47 MinipageParams::MinipageParams()
48 : pos(InsetMinipage::top)
52 MinipageParams::MinipageParams(InsetMinipage const & inset)
53 : pageWidth(inset.pageWidth()), pos(inset.pos())
57 bool operator==(MinipageParams const & p1, MinipageParams const & p2)
59 return (p1.pageWidth == p2.pageWidth && p1.pos == p2.pos);
63 bool operator!=(MinipageParams const & p1, MinipageParams const & p2)