#include "gettext.h"
#include "lyxfont.h"
#include "BufferView.h"
-#include "Painter.h"
#include "lyxtext.h"
#include "insets/insettext.h"
#include "support/LOstream.h"
+#include "debug.h"
using std::ostream;
using std::endl;
// (Lgb)
InsetMinipage::InsetMinipage()
- : InsetCollapsable()
+ : InsetCollapsable(), pos_(center),
+ inner_pos_(inner_center)
{
setLabel(_("minipage"));
LyXFont font(LyXFont::ALL_SANE);
}
-Inset * InsetMinipage::Clone() const
+Inset * InsetMinipage::Clone(Buffer const &) const
{
InsetMinipage * result = new InsetMinipage;
result->inset->init(inset);
}
-char const * InsetMinipage::EditMessage() const
+string const InsetMinipage::EditMessage() const
{
return _("Opened Minipage Inset");
}
}
-bool InsetMinipage::InsertInset(BufferView * bv, Inset * in)
-{
- if (!InsertInsetAllowed(in))
- return false;
-
- return inset->InsertInset(bv, in);
-}
-
-
bool InsetMinipage::InsertInsetAllowed(Inset * in) const
{
if ((in->LyxCode() == Inset::FLOAT_CODE) ||
return true;
}
-#if 0
-LyXFont InsetMinipage::GetDrawFont(BufferView * bv,
- LyXParagraph * p, int pos) const
+
+InsetMinipage::Position InsetMinipage::pos() const
{
- LyXFont fn = getLyXText(bv)->GetFont(bv->buffer(), p, pos);
- fn.decSize().decSize();
- return fn;
+ return pos_;
+}
+
+
+void InsetMinipage::pos(InsetMinipage::Position p)
+{
+ pos_ = p;
+}
+
+
+InsetMinipage::InnerPosition InsetMinipage::innerPos() const
+{
+ return inner_pos_;
+}
+
+
+void InsetMinipage::innerPos(InsetMinipage::InnerPosition ip)
+{
+ inner_pos_ = ip;
+}
+
+
+LyXLength const & InsetMinipage::height() const
+{
+ return height_;
+}
+
+
+void InsetMinipage::height(LyXLength const & ll)
+{
+ height_ = ll;
+}
+
+
+LyXLength const & InsetMinipage::width() const
+{
+ return width_;
+}
+
+
+void InsetMinipage::width(LyXLength const & ll)
+{
+ width_ = ll;
}
-#endif