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"
17 #include "lyxlength.h"
18 #include "mailinset.h"
24 class InsetWrapParams {
27 void write(std::ostream &) const;
34 std::string placement;
42 class InsetWrap : public InsetCollapsable {
45 InsetWrap(BufferParams const &, std::string const &);
49 void write(Buffer const & buf, std::ostream & os) const;
51 void read(Buffer const & buf, LyXLex & lex);
53 void validate(LaTeXFeatures & features) const;
55 InsetBase::Code lyxCode() const { return InsetBase::WRAP_CODE; }
57 int latex(Buffer const &, odocstream &,
58 OutputParams const &) const;
60 int docbook(Buffer const &, odocstream &,
61 OutputParams const &) const;
63 virtual docstring const editMessage() const;
65 bool insetAllowed(InsetBase::Code) const;
67 void addToToc(toc::TocList &, Buffer const &) const;
69 bool showInsetDialog(BufferView *) const;
71 InsetWrapParams const & params() const { return params_; }
73 bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
76 virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
78 virtual std::auto_ptr<InsetBase> doClone() const;
81 InsetWrapParams params_;
85 class InsetWrapMailer : public MailInset {
88 InsetWrapMailer(InsetWrap & inset);
90 virtual InsetBase & inset() const { return inset_; }
92 virtual std::string const & name() const { return name_; }
94 virtual std::string const inset2string(Buffer const &) const;
96 static void string2params(std::string const &, InsetWrapParams &);
98 static std::string const params2string(InsetWrapParams const &);
101 static std::string const name_;