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;
35 std::string placement;
45 class InsetWrap : public InsetCollapsable {
48 InsetWrap(BufferParams const &, std::string const &);
52 void write(Buffer const & buf, std::ostream & os) const;
54 void read(Buffer const & buf, Lexer & lex);
56 void validate(LaTeXFeatures & features) const;
58 InsetCode lyxCode() const { return WRAP_CODE; }
60 bool isMacroScope(Buffer const &) const { return true; }
62 int latex(Buffer const &, odocstream &,
63 OutputParams const &) const;
65 int plaintext(Buffer const &, odocstream &,
66 OutputParams const &) const;
68 int docbook(Buffer const &, odocstream &,
69 OutputParams const &) const;
71 virtual docstring const editMessage() const;
73 bool insetAllowed(InsetCode) const;
75 bool showInsetDialog(BufferView *) const;
77 InsetWrapParams const & params() const { return params_; }
79 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
80 // Update the counters of this inset and of its contents
81 virtual void updateLabels(Buffer const &, ParIterator const &);
84 virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
86 virtual docstring name() const { return name_; }
88 virtual Inset * clone() const;
91 InsetWrapParams params_;
97 class InsetWrapMailer : public MailInset {
100 InsetWrapMailer(InsetWrap & inset);
102 virtual Inset & inset() const { return inset_; }
104 virtual std::string const & name() const { return name_; }
106 virtual std::string const inset2string(Buffer const &) const;
108 static void string2params(std::string const &, InsetWrapParams &);
110 static std::string const params2string(InsetWrapParams const &);
113 static std::string const name_;