4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
16 #include "insetcollapsable.h"
18 #include "lyxlength.h"
21 struct InsetWrapParams {
23 void write(std::ostream &) const;
38 class InsetWrap : public InsetCollapsable {
41 InsetWrap(BufferParams const &, string const &);
45 virtual dispatch_result localDispatch(FuncRequest const & cmd);
47 void write(Buffer const & buf, std::ostream & os) const;
49 void read(Buffer const & buf, LyXLex & lex);
51 void validate(LaTeXFeatures & features) const;
53 virtual std::auto_ptr<InsetBase> clone() const;
55 InsetOld::Code lyxCode() const { return InsetOld::WRAP_CODE; }
57 int latex(Buffer const &, std::ostream &,
58 LatexRunParams const &) const;
60 int docbook(Buffer const &, std::ostream &, bool mixcont) const;
62 string const editMessage() const;
64 bool insetAllowed(InsetOld::Code) const;
66 void addToToc(lyx::toc::TocList &, Buffer const &) const;
68 bool showInsetDialog(BufferView *) const;
70 int latexTextWidth(BufferView *) const;
72 InsetWrapParams const & params() const { return params_; }
75 InsetWrapParams params_;
80 #include "mailinset.h"
83 class InsetWrapMailer : public MailInset {
86 InsetWrapMailer(InsetWrap & inset);
88 virtual InsetBase & inset() const { return inset_; }
90 virtual string const & name() const { return name_; }
92 virtual string const inset2string(Buffer const &) const;
94 static void string2params(string const &, InsetWrapParams &);
96 static string const params2string(InsetWrapParams const &);
99 static string const name_;