]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTransforms.h
Center longtable explicitly (#10690)
[lyx.git] / src / insets / ExternalTransforms.h
index 9658a759d1f39e89abe54a4a0c512bae6814445d..cd3e5e226a0e1354d66de3709597ad2f86ed43c6 100644 (file)
 #ifndef EXTERNALTRANSFORMS_H
 #define EXTERNALTRANSFORMS_H
 
-#include "lyxlength.h"
+#include "Length.h"
 
 #include "graphics/GraphicsParams.h"
 
+#include "support/unique_ptr.h"
+
 #include <boost/any.hpp>
-#include <boost/function.hpp>
 
-#include <string>
+#include <functional>
 #include <map>
 #include <memory>
+#include <string>
 
-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<TransformCommand const> ptr_type;
+       typedef unique_ptr<TransformCommand const> 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<TransformOption const> ptr_type;
+       typedef unique_ptr<TransformOption const> ptr_type;
        virtual ~TransformOption() {}
 
        /// The string from the External Template that we seek to replace.
@@ -312,24 +318,24 @@ enum TransformID {
 };
 
 
-typedef boost::function<TransformOption::ptr_type(ClipData)>
+typedef std::function<TransformOption::ptr_type(ClipData)>
        ClipOptionFactory;
-typedef boost::function<TransformOption::ptr_type(std::string)>
+typedef std::function<TransformOption::ptr_type(std::string)>
        ExtraOptionFactory;
-typedef boost::function<TransformOption::ptr_type(ResizeData)>
+typedef std::function<TransformOption::ptr_type(ResizeData)>
        ResizeOptionFactory;
-typedef boost::function<TransformOption::ptr_type(RotationData)>
+typedef std::function<TransformOption::ptr_type(RotationData)>
        RotationOptionFactory;
-typedef boost::function<TransformCommand::ptr_type(ResizeData)>
+typedef std::function<TransformCommand::ptr_type(ResizeData)>
        ResizeCommandFactory;
-typedef boost::function<TransformCommand::ptr_type(RotationData)>
+typedef std::function<TransformCommand::ptr_type(RotationData)>
        RotationCommandFactory;
 
 
 class TransformStore
 {
 public:
-       TransformStore() {}
+       TransformStore() : id(Rotate) {}
 
        /** Stores \c factory and a reminder of what \c data this \c factory
         *  operates on.