]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetPreview.h
Make sure we center displayed equations.
[lyx.git] / src / insets / InsetPreview.h
index 439740a4f734bf3fe5ccc08ba45cddf78e9322d4..d6d693da756fad16be93aaa4adb5ee06f351b2ad 100644 (file)
@@ -16,7 +16,8 @@
 
 #include "Dimension.h"
 
-#include <boost/scoped_ptr.hpp>
+#include "support/unique_ptr.h"
+
 
 namespace lyx {
 
@@ -36,6 +37,8 @@ public:
        ~InsetPreview();
        ///
        InsetPreview(InsetPreview const & other);
+       ///
+       InsetPreview & operator=(InsetPreview const & other);
 
        /// \name Methods inherited from Inset class
        //@{
@@ -45,12 +48,12 @@ public:
        
        InsetCode lyxCode() const { return PREVIEW_CODE; }
        
-       docstring name() const { return from_ascii("Preview"); }
+       docstring layoutName() const { return from_ascii("Preview"); }
        
        bool descendable(BufferView const & /*bv*/) const { return true; }
 
-       docstring contextMenuName() const
-               { return from_ascii("context-preview"); }
+       std::string contextMenuName() const
+               { return "context-preview"; }
 
        void metrics(MetricsInfo & mi, Dimension & dim) const;
 
@@ -78,13 +81,8 @@ protected:
        void preparePreview(DocIterator const & pos) const;
 
        ///
-       boost::scoped_ptr<RenderPreview> preview_;
-       ///
-       mutable bool use_preview_;
+       unique_ptr<RenderPreview> preview_;
 
-private:
-       ///
-       mutable Dimension dim_;
 };