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 &,
59 LatexRunParams const &) const;
61 std::string const editMessage() const;
63 bool insetAllowed(InsetOld::Code) const;
65 void addToToc(lyx::toc::TocList &, Buffer const &) const;
67 bool showInsetDialog(BufferView *) const;
69 int latexTextWidth(BufferView *) const;
71 InsetWrapParams const & params() const { return params_; }
76 priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &);
79 InsetWrapParams params_;
84 #include "mailinset.h"
87 class InsetWrapMailer : public MailInset {
90 InsetWrapMailer(InsetWrap & inset);
92 virtual InsetBase & inset() const { return inset_; }
94 virtual std::string const & name() const { return name_; }
96 virtual std::string const inset2string(Buffer const &) const;
98 static void string2params(std::string const &, InsetWrapParams &);
100 static std::string const params2string(InsetWrapParams const &);
103 static std::string const name_;