3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
15 #include "insetcollapsable.h"
17 #include "lyxlength.h"
20 struct InsetWrapParams {
22 void write(std::ostream &) const;
37 class InsetWrap : public InsetCollapsable {
40 InsetWrap(BufferParams const &, string const &);
44 virtual dispatch_result localDispatch(FuncRequest const & cmd);
46 void write(Buffer const * buf, std::ostream & os) const;
48 void read(Buffer const * buf, LyXLex & lex);
50 void validate(LaTeXFeatures & features) const;
52 InsetBase * clone() const;
54 Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
56 int latex(Buffer const *, std::ostream &,
57 LatexRunParams const &) const;
59 int docbook(Buffer const *, std::ostream &, bool mixcont) const;
61 string const editMessage() const;
63 bool insetAllowed(Inset::Code) const;
65 int getMaxWidth(BufferView *, UpdatableInset const *) const;
67 void addToToc(toc::TocList &, Buffer const *) const;
69 bool showInsetDialog(BufferView *) const;
71 int latexTextWidth(BufferView *) const;
73 InsetWrapParams const & params() const { return params_; }
76 InsetWrapParams params_;
81 #include "mailinset.h"
84 class InsetWrapMailer : public MailInset {
87 InsetWrapMailer(InsetWrap & inset);
89 virtual InsetBase & inset() const { return inset_; }
91 virtual string const & name() const { return name_; }
93 virtual string const inset2string() const;
95 static void string2params(string const &, InsetWrapParams &);
97 static string const params2string(InsetWrapParams const &);
100 static string const name_;