#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;
///
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);
///
///
bool isTextInset() const { return true; }
///
- bool doClearArea() const;
- ///
void insetUnlock(BufferView *);
///
bool needFullRow() const { return isOpen(); }
UpdatableInset::scroll(bv, offset);
}
///
- Paragraph * getParFromID(int id) const;
- ///
Inset * getInsetFromID(int id) const;
///
Paragraph * firstParagraph() const;
void addPreview(grfx::PreviewLoader &) const;
protected:
+ ///
+ virtual void cache(BufferView *) const;
+ ///
+ virtual BufferView * view() const;
+
///
int ascent_collapsed() const;
///
bool in_update;
///
mutable bool first_after_edit;
+ ///
+ mutable boost::weak_ptr<BufferView> view_;
};
#endif