X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FExternalTransforms.h;h=cd3e5e226a0e1354d66de3709597ad2f86ed43c6;hb=705302f6dee4e4be9ea46213aa1b0cc18be0cfb0;hp=9658a759d1f39e89abe54a4a0c512bae6814445d;hpb=f0d215f75296b448835fed560fd49b177e41ba7c;p=lyx.git diff --git a/src/insets/ExternalTransforms.h b/src/insets/ExternalTransforms.h index 9658a759d1..cd3e5e226a 100644 --- a/src/insets/ExternalTransforms.h +++ b/src/insets/ExternalTransforms.h @@ -12,20 +12,24 @@ #ifndef EXTERNALTRANSFORMS_H #define EXTERNALTRANSFORMS_H -#include "lyxlength.h" +#include "Length.h" #include "graphics/GraphicsParams.h" +#include "support/unique_ptr.h" + #include -#include -#include +#include #include #include +#include -class LyXLex; namespace lyx { + +class Lexer; + namespace external { /* @@ -35,7 +39,9 @@ class ClipData { public: ClipData() : clip(false) {} - lyx::graphics::BoundingBox bbox; + /// The bounding box + graphics::BoundingBox bbox; + /// clip image bool clip; }; @@ -62,8 +68,8 @@ public: bool usingScale() const; std::string scale; - LyXLength width; - LyXLength height; + Length width; + Length height; bool keepAspectRatio; }; @@ -118,7 +124,7 @@ public: */ class TransformCommand { public: - typedef std::auto_ptr ptr_type; + typedef unique_ptr ptr_type; virtual ~TransformCommand() {} /// The string from the External Template that we seek to replace. @@ -197,7 +203,7 @@ private: */ class TransformOption { public: - typedef std::auto_ptr ptr_type; + typedef unique_ptr ptr_type; virtual ~TransformOption() {} /// The string from the External Template that we seek to replace. @@ -312,24 +318,24 @@ enum TransformID { }; -typedef boost::function +typedef std::function ClipOptionFactory; -typedef boost::function +typedef std::function ExtraOptionFactory; -typedef boost::function +typedef std::function ResizeOptionFactory; -typedef boost::function +typedef std::function RotationOptionFactory; -typedef boost::function +typedef std::function ResizeCommandFactory; -typedef boost::function +typedef std::function RotationCommandFactory; class TransformStore { public: - TransformStore() {} + TransformStore() : id(Rotate) {} /** Stores \c factory and a reminder of what \c data this \c factory * operates on.