]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbutton.h
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetbutton.h
index 48d76b7165cec439d13bd2ffa7396f7280b94e56..b0a6edbe0d0b06ef8542bd3f0b4d2228c252fd3f 100644 (file)
 #ifndef INSET_BUTTON_H
 #define INSET_BUTTON_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "inset.h"
 #include "LString.h"
+#include <boost/weak_ptr.hpp>
 
 /** Used to provide an inset that looks like a button.
  */
@@ -32,11 +30,17 @@ public:
        ///
        int width(BufferView *, LyXFont const &) const;
        ///
-       void draw(BufferView *, LyXFont const &, int, float &, bool) const;
+       void draw(BufferView *, LyXFont const &, int, float &) const;
 
 protected:
+       ///
+       virtual void cache(BufferView *) const;
+       ///
+       virtual BufferView * view() const;
        /// This should provide the text for the button
        virtual string const getScreenLabel(Buffer const *) const = 0;
+private:
+       mutable boost::weak_ptr<BufferView> view_;
 };
 
 #endif