]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetinclude.h
Clean up InsetGraphics::Cache and rename as GraphicsInset.
[lyx.git] / src / insets / insetinclude.h
index b81e9df26ca544db35b4e68a6445eda7533d7e49..008779970740297ce3a33c72936de4e0656b6226 100644 (file)
@@ -13,6 +13,7 @@
 #define INSET_INCLUDE_H
 
 #include "insetcommand.h"
+#include "dimension.h"
 
 #include <boost/scoped_ptr.hpp>
 
@@ -60,11 +61,7 @@ public:
        virtual dispatch_result localDispatch(FuncRequest const & cmd);
 
        /// Override these InsetButton methods if Previewing
-       int ascent(BufferView *, LyXFont const &) const;
-       ///
-       int descent(BufferView *, LyXFont const &) const;
-       ///
-       int width(BufferView *, LyXFont const &) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
 
@@ -74,7 +71,7 @@ public:
        void set(Params const & params);
 
        ///
-       virtual Inset * clone(Buffer const &) const;
+       virtual Inset * clone() const;
        ///
        Inset::Code lyxCode() const { return Inset::INCLUDE_CODE; }
        /// This returns the list of labels on the child buffer
@@ -131,6 +128,9 @@ private:
        friend class PreviewImpl;
        /// The pointer never changes although *preview_'s contents may.
        boost::scoped_ptr<PreviewImpl> const preview_;
+
+       /// cache
+       mutable Dimension dim_;
 };