]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetexternal.h
ws changes only
[lyx.git] / src / insets / insetexternal.h
index 024a2319cef4162366df874c601e3bb6846ab244..31d2b9ae330af3627a17f2271c17ea74277980cc 100644 (file)
@@ -13,6 +13,7 @@
 #define INSET_EXTERNAL_H
 
 #include "inset.h"
+#include "ExternalTransforms.h"
 
 #include "graphics/GraphicsTypes.h"
 
@@ -20,6 +21,7 @@
 
 #include <boost/scoped_ptr.hpp>
 #include <boost/signals/trackable.hpp>
+#include <boost/weak_ptr.hpp>
 
 
 /** No two InsetExternalParams variables can have the same temporary file.
@@ -67,13 +69,18 @@ struct InsetExternalParams {
        /// The scale of the displayed graphic (if shown).
        unsigned int lyxscale;
 
+       lyx::external::ClipData     clipdata;
+       lyx::external::ExtraData    extradata;
+       lyx::external::ResizeData   resizedata;
+       lyx::external::RotationData rotationdata;
+
 private:
        lyx::external::TempName tempname_;
        std::string templatename_;
 };
 
 
-class RenderInset;
+class RenderBase;
 
 ///
 class InsetExternal : public InsetOld, public boost::signals::trackable
@@ -122,15 +129,20 @@ public:
        void setParams(InsetExternalParams const &, Buffer const &);
 
 private:
+       void cache(BufferView *) const;
+       BufferView * view() const;
        /** This method is connected to the graphics loader, so we are
         *  informed when the image has been loaded.
         */
-       void statusChanged();
+       void statusChanged() const;
 
        /// The current params
        InsetExternalParams params_;
        /// The thing that actually draws the image on LyX's screen.
-       boost::scoped_ptr<RenderInset> renderer_;
+       boost::scoped_ptr<RenderBase> renderer_;
+
+       /// Cached
+       mutable boost::weak_ptr<BufferView> view_;
 };