]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcollapsable.h
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetcollapsable.h
index 5af584aef2df9817310a14f173ce2195ea16a630..7243844297e2464b09bf906b0e751962c19b2b96 100644 (file)
 #ifndef INSETCOLLAPSABLE_H
 #define INSETCOLLAPSABLE_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "inset.h"
 #include "insettext.h"
 #include "lyxfont.h"
 #include "LColor.h"
 
+#include <boost/weak_ptr.hpp>
+
 class Painter;
 class LyXText;
 class Paragraph;
@@ -57,7 +56,7 @@ public:
        ///
        int width(BufferView *, LyXFont const &) const;
        ///
-       void draw(BufferView *, const LyXFont &, int , float &, bool) const;
+       void draw(BufferView *, const LyXFont &, int , float &) const;
        ///
        void update(BufferView *, LyXFont const &, bool =false);
        ///
@@ -75,8 +74,6 @@ public:
        ///
        bool isTextInset() const { return true; }
        ///
-       bool doClearArea() const;
-       ///
        void insetUnlock(BufferView *);
        ///
        bool needFullRow() const { return isOpen(); }
@@ -153,8 +150,6 @@ public:
                UpdatableInset::scroll(bv, offset);
        }
        ///
-       Paragraph * getParFromID(int id) const;
-       ///
        Inset * getInsetFromID(int id) const;
        ///
        Paragraph * firstParagraph() const;
@@ -196,6 +191,11 @@ public:
        void addPreview(grfx::PreviewLoader &) const;
 
 protected:
+       ///
+       virtual void cache(BufferView *) const;
+       ///
+       virtual BufferView * view() const;
+
        ///
        int ascent_collapsed() const;
        ///
@@ -248,6 +248,8 @@ private:
        bool in_update;
        ///
        mutable bool first_after_edit;
+       ///
+       mutable boost::weak_ptr<BufferView> view_;
 };
 
 #endif