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 #include "ControlMinipage.h"
16 #include "BufferView.h"
19 ControlMinipage::ControlMinipage(LyXView & lv, Dialogs & d)
20 : ControlInset<InsetMinipage, MinipageParams>(lv, d)
24 void ControlMinipage::applyParamsToInset()
26 inset()->pageWidth(params().pageWidth);
27 inset()->pos(params().pos);
29 bufferview()->updateInset(inset(), true);
33 void ControlMinipage::applyParamsNoInset()
38 MinipageParams const ControlMinipage::getParams(InsetMinipage const & inset)
40 return MinipageParams(inset);
44 MinipageParams::MinipageParams()
45 : pos(InsetMinipage::top)
49 MinipageParams::MinipageParams(InsetMinipage const & inset)
50 : pageWidth(inset.pageWidth()), pos(inset.pos())
54 bool operator==(MinipageParams const & p1, MinipageParams const & p2)
56 return (p1.pageWidth == p2.pageWidth && p1.pos == p2.pos);
60 bool operator!=(MinipageParams const & p1, MinipageParams const & p2)