X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetPreview.h;h=f2bfdd535f6bb28f14bb54cbf877373a8ef07203;hb=421853d1bf021b7180a61d8c2908ede2dce48061;hp=1c80f3efd6b241196cdf072c35262b08893eb5cf;hpb=28040119576f3914a9e233bd064bf09731427046;p=lyx.git diff --git a/src/insets/InsetPreview.h b/src/insets/InsetPreview.h index 1c80f3efd6..f2bfdd535f 100644 --- a/src/insets/InsetPreview.h +++ b/src/insets/InsetPreview.h @@ -16,7 +16,8 @@ #include "Dimension.h" -#include +#include "support/unique_ptr.h" + namespace lyx { @@ -28,7 +29,7 @@ namespace graphics { /// An inset with an instant preview class InsetPreview : public InsetText { - + public: /// InsetPreview(Buffer *); @@ -44,11 +45,11 @@ public: Inset * clone() const { return new InsetPreview(*this); } bool neverIndent() const { return true; } - + InsetCode lyxCode() const { return PREVIEW_CODE; } - + docstring layoutName() const { return from_ascii("Preview"); } - + bool descendable(BufferView const & /*bv*/) const { return true; } std::string contextMenuName() const @@ -68,8 +69,10 @@ public: void write(std::ostream & os) const; void edit(Cursor & cur, bool front, EntryDirection entry_from); + + bool canPaintChange(BufferView const &) const { return true; }; //@} - + protected: /// Retrieves the preview state. Returns true if preview /// is enabled and the preview image is availabled. @@ -80,7 +83,7 @@ protected: void preparePreview(DocIterator const & pos) const; /// - boost::scoped_ptr preview_; + unique_ptr preview_; };