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 &);
42 InsetWrap(InsetWrap const &, bool same_id = false);
46 virtual dispatch_result localDispatch(FuncRequest const & cmd);
48 void write(Buffer const * buf, std::ostream & os) const;
50 void read(Buffer const * buf, LyXLex & lex);
52 void validate(LaTeXFeatures & features) const;
54 Inset * clone(Buffer const &, bool same_id = false) const;
56 Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
58 int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const;
60 int docbook(Buffer const *, std::ostream &, bool mixcont) const;
62 string const editMessage() const;
64 bool insetAllowed(Inset::Code) const;
66 int getMaxWidth(BufferView *, UpdatableInset const *) const;
68 string const & type() const;
70 LyXLength const & pageWidth() const;
72 void pageWidth(LyXLength const &);
74 void placement(string const & p);
76 string const & placement() const;
78 void addToToc(toc::TocList &, Buffer const *) const;
80 bool showInsetDialog(BufferView *) const;
82 int latexTextWidth(BufferView *) const;
84 InsetWrapParams const & params() const { return params_; }
87 InsetWrapParams params_;
92 #include "mailinset.h"
95 class InsetWrapMailer : public MailInset {
98 InsetWrapMailer(InsetWrap & inset);
100 virtual Inset & inset() const { return inset_; }
102 virtual string const & name() const { return name_; }
104 virtual string const inset2string() const;
106 static void string2params(string const &, InsetWrapParams &);
108 static string const params2string(InsetWrapParams const &);
111 static string const name_;