1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \author Jürgen Vigna, jug@sad.it
11 * \author Angus Leeming, a.leeming@ic.ac.uk
17 #pragma implementation
20 #include "ControlMinipage.h"
21 #include "BufferView.h"
24 ControlMinipage::ControlMinipage(LyXView & lv, Dialogs & d)
25 : ControlInset<InsetMinipage, MinipageParams>(lv, d)
29 void ControlMinipage::applyParamsToInset()
31 inset()->pageWidth(params().pageWidth);
32 inset()->pos(params().pos);
34 bufferview()->updateInset(inset(), true);
38 void ControlMinipage::applyParamsNoInset()
43 MinipageParams const ControlMinipage::getParams(InsetMinipage const & inset)
45 return MinipageParams(inset);
49 MinipageParams::MinipageParams()
50 : pos(InsetMinipage::top)
53 MinipageParams::MinipageParams(InsetMinipage const & inset)
54 : pageWidth(inset.pageWidth()), pos(inset.pos())
58 bool operator==(MinipageParams const & p1, MinipageParams const & p2)
60 return (p1.pageWidth == p2.pageWidth && p1.pos == p2.pos);
64 bool operator!=(MinipageParams const & p1, MinipageParams const & p2)