#include "ViewBase.h"
#include "ButtonControllerBase.h"
#include "ControlMinipage.h"
+#include "ControlInset.tmpl"
#include "Dialogs.h"
#include "LyXView.h"
#include "buffer.h"
#include "BufferView.h"
+#include "helper_funcs.h"
using std::vector;
using SigC::slot;
-// sorry this is just a temporary hack we should include vspace.h! (Jug)
-extern const char * stringFromUnit(int);
ControlMinipage::ControlMinipage(LyXView & lv, Dialogs & d)
: ControlInset<InsetMinipage, MinipageParams>(lv, d)
void ControlMinipage::applyParamsToInset()
{
- inset()->width(params().width);
+ inset()->pageWidth(params().pageWidth);
inset()->pos(params().pos);
lv_.view()->updateInset(inset(), true);
{}
MinipageParams::MinipageParams(InsetMinipage const & inset)
- : width(inset.width()), pos(inset.pos())
+ : pageWidth(inset.pageWidth()), pos(inset.pos())
{}
bool operator==(MinipageParams const & p1, MinipageParams const & p2)
{
- return (p1.width == p2.width && p1.pos == p2.pos);
+ return (p1.pageWidth == p2.pageWidth && p1.pos == p2.pos);
}
-//bool operator!=(MinipageParams const & p1, MinipageParams const & p2)
-//{
-// return !(p1 == p2);
-//}
-
-namespace minipage {
-
-vector<string> const getUnits()
+bool operator!=(MinipageParams const & p1, MinipageParams const & p2)
{
- vector<string> units;
- const char * str;
- for(int i=0; (str = stringFromUnit(i)); ++i)
- units.push_back(str);
-
- return units;
+ return !(p1 == p2);
}
-
-} // namespace minipage