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"
20 struct InsetWrapParams {
22 void write(std::ostream &) const;
29 std::string placement;
37 class InsetWrap : public InsetCollapsable {
40 InsetWrap(BufferParams const &, std::string const &);
44 void write(Buffer const & buf, std::ostream & os) const;
46 void read(Buffer const & buf, LyXLex & lex);
48 void validate(LaTeXFeatures & features) const;
50 virtual std::auto_ptr<InsetBase> clone() const;
52 InsetOld::Code lyxCode() const { return InsetOld::WRAP_CODE; }
54 int latex(Buffer const &, std::ostream &,
55 OutputParams const &) const;
57 int docbook(Buffer const &, std::ostream &,
58 OutputParams const &) const;
60 std::string const editMessage() const;
62 bool insetAllowed(InsetOld::Code) const;
64 void addToToc(lyx::toc::TocList &, Buffer const &) const;
66 bool showInsetDialog(BufferView *) const;
68 InsetWrapParams const & params() const { return params_; }
71 virtual void priv_dispatch(LCursor & cur, FuncRequest const & cmd);
74 InsetWrapParams params_;
79 #include "mailinset.h"
82 class InsetWrapMailer : public MailInset {
85 InsetWrapMailer(InsetWrap & inset);
87 virtual InsetBase & inset() const { return inset_; }
89 virtual std::string const & name() const { return name_; }
91 virtual std::string const inset2string(Buffer const &) const;
93 static void string2params(std::string const &, InsetWrapParams &);
95 static std::string const params2string(InsetWrapParams const &);
98 static std::string const name_;