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 "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, Lexer & lex);
52 void validate(LaTeXFeatures & features) const;
54 Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
56 int latex(Buffer const &, odocstream &,
57 OutputParams const &) const;
59 int plaintext(Buffer const &, odocstream &,
60 OutputParams const &) const;
62 int docbook(Buffer const &, odocstream &,
63 OutputParams const &) const;
65 virtual docstring const editMessage() const;
67 bool insetAllowed(Inset::Code) const;
69 bool showInsetDialog(BufferView *) const;
71 InsetWrapParams const & params() const { return params_; }
73 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
74 // Update the counters of this inset and of its contents
75 virtual void updateLabels(Buffer const &, ParIterator const &);
78 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
80 virtual docstring name() const { return name_; }
82 virtual std::auto_ptr<Inset> doClone() const;
85 InsetWrapParams params_;
91 class InsetWrapMailer : public MailInset {
94 InsetWrapMailer(InsetWrap & inset);
96 virtual Inset & inset() const { return inset_; }
98 virtual std::string const & name() const { return name_; }
100 virtual std::string const inset2string(Buffer const &) const;
102 static void string2params(std::string const &, InsetWrapParams &);
104 static std::string const params2string(InsetWrapParams const &);
107 static std::string const name_;