X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetIPA.h;h=695179738f400581467e15d451341fb131e35200;hb=48b1e8a0aca2f3f3faa8f1f800568e47792ba9a0;hp=f100c663f9e6856af060f7ba8656df4a0c304e91;hpb=e4ec11e8a15d59e6b8687ea592d0b474fff0693a;p=lyx.git diff --git a/src/insets/InsetIPA.h b/src/insets/InsetIPA.h index f100c663f9..695179738f 100644 --- a/src/insets/InsetIPA.h +++ b/src/insets/InsetIPA.h @@ -16,7 +16,8 @@ #include "Dimension.h" -#include +#include "support/unique_ptr.h" + namespace lyx { @@ -28,25 +29,29 @@ namespace graphics { /// 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; @@ -68,11 +73,13 @@ public: void write(std::ostream & os) const; void edit(Cursor & cur, bool front, EntryDirection entry_from); - + /// void latex(otexstream &, OutputParams const &) const; /// - docstring xhtml(XHTMLStream & xs, OutputParams const &) const; + void docbook(XMLStream &, OutputParams const &) const; + /// + docstring xhtml(XMLStream & xs, OutputParams const &) const; /// void validate(LaTeXFeatures & features) const; /// @@ -80,10 +87,10 @@ public: /// 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; @@ -91,13 +98,7 @@ protected: void preparePreview(DocIterator const & pos) const; /// - boost::scoped_ptr preview_; - /// - mutable bool use_preview_; - -private: - /// - mutable Dimension dim_; + unique_ptr preview_; };