#include "Dimension.h"
-#include <boost/scoped_ptr.hpp>
+#include "support/unique_ptr.h"
+
namespace lyx {
/// An inset with an instant preview
class InsetPreview : public InsetText {
-
+
public:
///
- InsetPreview(Buffer *);
+ explicit InsetPreview(Buffer *);
///
~InsetPreview();
///
Inset * clone() const { return new InsetPreview(*this); }
bool neverIndent() const { return true; }
-
+
+ bool inheritFont() const { return false; }
+
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
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.
+ /// is enabled and the preview image is available.
bool previewState(BufferView * bv) const;
/// Recreates the preview if preview is enabled.
void reloadPreview(DocIterator const & pos) const;
void preparePreview(DocIterator const & pos) const;
///
- boost::scoped_ptr<RenderPreview> preview_;
+ unique_ptr<RenderPreview> preview_;
};