]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.h
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetcollapsable.h
index bfecd73dd8f3923b2a34fea711aef3fb52f93ded..30ad137784b2126844d503a780a3b172002e97ed 100644 (file)
@@ -19,6 +19,7 @@
 #include "lyxfont.h"
 #include "funcrequest.h" // for adjustCommand
 #include "LColor.h"
+#include "box.h"
 
 #include <boost/weak_ptr.hpp>
 
@@ -51,11 +52,13 @@ public:
        /// draw, either inlined (no button) or collapsed/open
        void draw(PainterInfo & pi, int x, int y, bool inlined) const;
        ///
+       bool hitButton(FuncRequest const &) const;
+       ///
        EDITABLE editable() const;
        ///
-       bool insertInset(BufferView *, Inset * inset);
+       bool insertInset(BufferView *, InsetOld * inset);
        ///
-       virtual bool insetAllowed(Inset::Code code) const {
+       virtual bool insetAllowed(InsetOld::Code code) const {
                return inset.insetAllowed(code);
        }
        ///
@@ -70,7 +73,7 @@ public:
        bool unlockInsetInInset(BufferView *, UpdatableInset *,
                                bool lr = false);
        ///
-       bool updateInsetInInset(BufferView *, Inset *);
+       bool updateInsetInInset(BufferView *, InsetOld *);
        ///
        int insetInInsetY() const;
        ///
@@ -96,7 +99,7 @@ public:
        }
        UpdatableInset * getLockingInset() const;
        ///
-       UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
+       UpdatableInset * getFirstLockingInsetOfType(InsetOld::Code);
        ///
        void setFont(BufferView *, LyXFont const &, bool toggleall = false,
                 bool selectall = false);
@@ -129,7 +132,7 @@ public:
                UpdatableInset::scroll(bv, offset);
        }
        ///
-       Inset * getInsetFromID(int id) const;
+       InsetOld * getInsetFromID(int id) const;
        ///
        ParagraphList * getParagraphs(int) const;
        ///
@@ -193,11 +196,7 @@ public:
        mutable InsetText inset;
 protected:
        ///
-       mutable int button_length;
-       ///
-       mutable int button_top_y;
-       ///
-       mutable int button_bottom_y;
+       mutable Box button_dim;
        ///
        mutable int topx;
        mutable int topbaseline;