X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetWrap.h;h=b1539fc971fe5c294dd97acbf272ee3f939d4c38;hb=f5123ccfa82215030c70561af881175d92244492;hp=4202469f05420d9087133420044ad2ab88789986;hpb=36dbec45069bf3d9db923200835e44f44d904eb8;p=lyx.git diff --git a/src/insets/InsetWrap.h b/src/insets/InsetWrap.h index 4202469f05..b1539fc971 100644 --- a/src/insets/InsetWrap.h +++ b/src/insets/InsetWrap.h @@ -14,7 +14,6 @@ #include "InsetCollapsable.h" #include "Length.h" -#include "MailInset.h" namespace lyx { @@ -45,77 +44,53 @@ public: class InsetWrap : public InsetCollapsable { public: /// - InsetWrap(BufferParams const &, std::string const &); + InsetWrap(Buffer *, std::string const &); /// ~InsetWrap(); /// - void write(Buffer const & buf, std::ostream & os) const; + InsetWrapParams const & params() const { return params_; } + /// + static void string2params(std::string const &, InsetWrapParams &); /// - void read(Buffer const & buf, Lexer & lex); + static std::string params2string(InsetWrapParams const &); +private: + /// + void write(std::ostream & os) const; + /// + void read(Lexer & lex); /// void validate(LaTeXFeatures & features) const; /// InsetCode lyxCode() const { return WRAP_CODE; } /// - bool isMacroScope(Buffer const & buf) const { return true; } + docstring toolTip(BufferView const & bv, int x, int y) const; /// - int latex(Buffer const &, odocstream &, - OutputParams const &) const; + int latex(odocstream &, OutputParams const &) const; /// - int plaintext(Buffer const &, odocstream &, - OutputParams const &) const; + int plaintext(odocstream &, OutputParams const &) const; /// - int docbook(Buffer const &, odocstream &, - OutputParams const &) const; + int docbook(odocstream &, OutputParams const &) const; /// - virtual docstring const editMessage() const; + docstring xhtml(XHTMLStream &, OutputParams const &) const; /// bool insetAllowed(InsetCode) const; /// bool showInsetDialog(BufferView *) const; /// - InsetWrapParams const & params() const { return params_; } - /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; - // Update the counters of this inset and of its contents - virtual void updateLabels(Buffer const &, ParIterator const &); -protected: - /// - virtual void doDispatch(Cursor & cur, FuncRequest & cmd); + /// Update the counters of this inset and of its contents + void updateBuffer(ParIterator const &, UpdateType); /// - virtual docstring name() const { return name_; } -private: - virtual Inset * clone() const; - + void doDispatch(Cursor & cur, FuncRequest & cmd); /// - InsetWrapParams params_; + docstring name() const; /// - docstring name_; -}; + Inset * clone() const { return new InsetWrap(*this); } - -class InsetWrapMailer : public MailInset { -public: - /// - InsetWrapMailer(InsetWrap & inset); - /// - virtual Inset & inset() const { return inset_; } /// - virtual std::string const & name() const { return name_; } - /// - virtual std::string const inset2string(Buffer const &) const; - /// - static void string2params(std::string const &, InsetWrapParams &); - /// - static std::string const params2string(InsetWrapParams const &); -private: - /// - static std::string const name_; - /// - InsetWrap & inset_; + InsetWrapParams params_; }; - } // namespace lyx #endif