#define INSET_EXTERNAL_H
#include "inset.h"
+#include "ExternalTransforms.h"
#include "graphics/GraphicsTypes.h"
#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.
/// 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
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_;
};