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 draw(PainterInfo & pi, int x, int y) const;
58 void validate(LaTeXFeatures & features) const;
60 InsetCode lyxCode() const { return WRAP_CODE; }
62 bool isMacroScope() const { return true; }
64 int latex(odocstream &, OutputParams const &) const;
66 int plaintext(odocstream &, OutputParams const &) const;
68 int docbook(odocstream &, OutputParams const &) const;
70 docstring editMessage() const;
72 bool insetAllowed(InsetCode) const;
74 bool showInsetDialog(BufferView *) const;
76 InsetWrapParams const & params() const { return params_; }
78 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
79 // Update the counters of this inset and of its contents
80 void updateLabels(ParIterator const &);
83 void doDispatch(Cursor & cur, FuncRequest & cmd);
85 docstring name() const { return name_; }
87 Inset * clone() const;
90 InsetWrapParams params_;
96 class InsetWrapMailer : public MailInset {
99 InsetWrapMailer(InsetWrap & inset);
101 virtual Inset & inset() const { return inset_; }
103 virtual std::string const & name() const { return name_; }
105 virtual std::string const inset2string(Buffer const &) const;
107 static void string2params(std::string const &, InsetWrapParams &);
109 static std::string const params2string(InsetWrapParams const &);
112 static std::string const name_;