#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 {
/*
public:
ClipData() : clip(false) {}
- lyx::graphics::BoundingBox bbox;
+ /// The bounding box
+ graphics::BoundingBox bbox;
+ /// clip image
bool clip;
};
bool usingScale() const;
std::string scale;
- LyXLength width;
- LyXLength height;
+ Length width;
+ Length height;
bool keepAspectRatio;
};
*/
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.
*/
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.
};
-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.