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.
16 #include "insetcollapsable.h"
18 #include "lyxlength.h"
21 struct InsetWrapParams {
23 void write(std::ostream &) const;
30 std::string placement;
38 class InsetWrap : public InsetCollapsable {
41 InsetWrap(BufferParams const &, std::string const &);
45 void write(Buffer const & buf, std::ostream & os) const;
47 void read(Buffer const & buf, LyXLex & lex);
49 void validate(LaTeXFeatures & features) const;
51 virtual std::auto_ptr<InsetBase> clone() const;
53 InsetOld::Code lyxCode() const { return InsetOld::WRAP_CODE; }
55 int latex(Buffer const &, std::ostream &,
56 LatexRunParams const &) const;
58 int docbook(Buffer const &, std::ostream &, bool mixcont) 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 int latexTextWidth(BufferView *) const;
70 InsetWrapParams const & params() const { return params_; }
75 priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
78 InsetWrapParams params_;
83 #include "mailinset.h"
86 class InsetWrapMailer : public MailInset {
89 InsetWrapMailer(InsetWrap & inset);
91 virtual InsetBase & inset() const { return inset_; }
93 virtual std::string const & name() const { return name_; }
95 virtual std::string const inset2string(Buffer const &) const;
97 static void string2params(std::string const &, InsetWrapParams &);
99 static std::string const params2string(InsetWrapParams const &);
102 static std::string const name_;