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.
15 #include "insetcollapsable.h"
16 #include "lyxlength.h"
17 #include "mailinset.h"
23 class InsetWrapParams {
26 void write(std::ostream &) const;
33 std::string placement;
41 class InsetWrap : public InsetCollapsable {
44 InsetWrap(BufferParams const &, std::string const &);
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 InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
56 int latex(Buffer const &, odocstream &,
57 OutputParams const &) const;
59 int docbook(Buffer const &, odocstream &,
60 OutputParams const &) const;
62 virtual docstring const editMessage() const;
64 bool insetAllowed(InsetBase::Code) const;
66 void addToToc(TocList &, Buffer const &) const;
68 bool showInsetDialog(BufferView *) const;
70 InsetWrapParams const & params() const { return params_; }
72 bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
75 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
77 virtual std::auto_ptr<InsetBase> doClone() const;
80 InsetWrapParams params_;
84 class InsetWrapMailer : public MailInset {
87 InsetWrapMailer(InsetWrap & inset);
89 virtual InsetBase & inset() const { return inset_; }
91 virtual std::string const & name() const { return name_; }
93 virtual std::string const inset2string(Buffer const &) const;
95 static void string2params(std::string const &, InsetWrapParams &);
97 static std::string const params2string(InsetWrapParams const &);
100 static std::string const name_;