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(std::ostream & os) const;
54 void read(Lexer & lex);
56 void validate(LaTeXFeatures & features) const;
58 InsetCode lyxCode() const { return WRAP_CODE; }
60 bool isMacroScope() const { return true; }
62 int latex(odocstream &, OutputParams const &) const;
64 int plaintext(odocstream &, OutputParams const &) const;
66 int docbook(odocstream &, OutputParams const &) const;
68 docstring editMessage() const;
70 bool insetAllowed(InsetCode) const;
72 bool showInsetDialog(BufferView *) const;
74 InsetWrapParams const & params() const { return params_; }
76 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
77 // Update the counters of this inset and of its contents
78 void updateLabels(ParIterator const &);
81 void doDispatch(Cursor & cur, FuncRequest & cmd);
83 docstring name() const { return name_; }
85 Inset * clone() const;
88 InsetWrapParams params_;
94 class InsetWrapMailer : public MailInset {
97 InsetWrapMailer(InsetWrap & inset);
99 virtual Inset & inset() const { return inset_; }
101 virtual std::string const & name() const { return name_; }
103 virtual std::string const inset2string(Buffer const &) const;
105 static void string2params(std::string const &, InsetWrapParams &);
107 static std::string const params2string(InsetWrapParams const &);
110 static std::string const name_;