#include "Dimension.h"
-#include <boost/scoped_ptr.hpp>
+#include "support/unique_ptr.h"
+
namespace lyx {
/// An IPA inset with instant preview
class InsetIPA : public InsetText {
-
+
public:
///
- InsetIPA(Buffer *);
+ explicit InsetIPA(Buffer *);
///
~InsetIPA();
///
InsetIPA(InsetIPA const & other);
+ ///
+ InsetIPA & operator=(InsetIPA const & other);
/// \name Methods inherited from Inset class
//@{
Inset * clone() const { return new InsetIPA(*this); }
bool neverIndent() const { return true; }
-
+
+ bool forceLocalFontSwitch() const { return true; }
+
InsetCode lyxCode() const { return IPA_CODE; }
-
+
docstring layoutName() const { return from_ascii("IPA"); }
-
+
bool descendable(BufferView const & /*bv*/) const { return true; }
void metrics(MetricsInfo & mi, Dimension & dim) const;
void draw(PainterInfo & pi, int x, int y) const;
+ ///
+ void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
void write(std::ostream & os) const;
void edit(Cursor & cur, bool front, EntryDirection entry_from);
-
+
///
void latex(otexstream &, OutputParams const &) const;
///
+ void docbook(XMLStream &, OutputParams const &) const;
+ ///
+ docstring xhtml(XMLStream & xs, OutputParams const &) const;
+ ///
void validate(LaTeXFeatures & features) const;
///
bool allowSpellCheck() const { return false; }
///
bool insetAllowed(InsetCode code) const;
//@}
-
+
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_;
- ///
- mutable bool use_preview_;
-
-private:
- ///
- mutable Dimension dim_;
+ unique_ptr<RenderPreview> preview_;
};