X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetWrap.h;h=ce6b73eb03539cfdd0338712f5edb6afc34b64b5;hb=dae8555234f0e5c8358b91c307d91b219c664617;hp=3256b03d84f6766010b7d13a793878fa1495105e;hpb=4398113ee919a62c74af4d600510c074954428a0;p=lyx.git diff --git a/src/insets/InsetWrap.h b/src/insets/InsetWrap.h index 3256b03d84..ce6b73eb03 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,76 +44,54 @@ public: class InsetWrap : public InsetCollapsable { public: /// - InsetWrap(BufferParams const &, std::string const &); + InsetWrap(Buffer *, std::string const &); /// ~InsetWrap(); + /// + InsetWrapParams const & params() const { return params_; } + /// + static void string2params(std::string const &, InsetWrapParams &); + /// + static std::string params2string(InsetWrapParams const &); +private: /// void write(std::ostream & os) const; /// void read(Lexer & lex); /// - void draw(PainterInfo & pi, int x, int y) const; - /// void validate(LaTeXFeatures & features) const; /// InsetCode lyxCode() const { return WRAP_CODE; } /// - bool isMacroScope() const { return true; } + docstring toolTip(BufferView const & bv, int x, int y) const; /// - int latex(odocstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const; /// - int plaintext(odocstream &, OutputParams const &) const; + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; /// int docbook(odocstream &, OutputParams const &) const; /// - docstring 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 - void updateLabels(ParIterator const &); -protected: + /// Update the counters of this inset and of its contents + void updateBuffer(ParIterator const &, UpdateType); /// void doDispatch(Cursor & cur, FuncRequest & cmd); /// - docstring name() const { return name_; } -private: - Inset * clone() const; - + docstring layoutName() const; /// - InsetWrapParams params_; - /// - 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