]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetminipage.C
updates to minipage inset
[lyx.git] / src / insets / insetminipage.C
index 5cd5e8e3665fba7eab8afd974ab75b15e10a233a..aafab15c0e4579e9ef3405ddcea7eba1bdce1116 100644 (file)
@@ -17,7 +17,6 @@
 #include "gettext.h"
 #include "lyxfont.h"
 #include "BufferView.h"
-#include "Painter.h"
 #include "lyxtext.h"
 #include "insets/insettext.h"
 #include "support/LOstream.h"
@@ -56,7 +55,8 @@ using std::endl;
 // (Lgb)
 
 InsetMinipage::InsetMinipage()
-       : InsetCollapsable()
+       : InsetCollapsable(), pos_(center),
+         inner_pos_(inner_center)
 {
        setLabel(_("minipage"));
        LyXFont font(LyXFont::ALL_SANE);
@@ -76,7 +76,7 @@ void InsetMinipage::Write(Buffer const * buf, ostream & os) const
 }
 
 
-Inset * InsetMinipage::Clone() const
+Inset * InsetMinipage::Clone(Buffer const &) const
 {
        InsetMinipage * result = new InsetMinipage;
        result->inset->init(inset);
@@ -86,7 +86,7 @@ Inset * InsetMinipage::Clone() const
 }
 
 
-char const * InsetMinipage::EditMessage() const
+string const InsetMinipage::EditMessage() const
 {
        return _("Opened Minipage Inset");
 }
@@ -114,12 +114,49 @@ bool InsetMinipage::InsertInsetAllowed(Inset * in) const
 }
 
 
-#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