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(Buffer const &, std::string const &);
52 InsetWrapParams const & params() const { return params_; }
55 void write(std::ostream & os) const;
57 void read(Lexer & lex);
59 void validate(LaTeXFeatures & features) const;
61 InsetCode lyxCode() const { return WRAP_CODE; }
63 int latex(odocstream &, OutputParams const &) const;
65 int plaintext(odocstream &, OutputParams const &) const;
67 int docbook(odocstream &, OutputParams const &) const;
69 docstring editMessage() const;
71 bool insetAllowed(InsetCode) const;
73 bool showInsetDialog(BufferView *) const;
75 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
76 // Update the counters of this inset and of its contents
77 void updateLabels(ParIterator const &);
79 void doDispatch(Cursor & cur, FuncRequest & cmd);
81 docstring name() const { return name_; }
83 Inset * clone() const { return new InsetWrap(*this); }
86 InsetWrapParams params_;
92 class InsetWrapMailer : public MailInset {
95 InsetWrapMailer(InsetWrap & inset);
97 virtual Inset & inset() const { return inset_; }
99 virtual std::string const & name() const { return name_; }
101 virtual std::string const inset2string(Buffer const &) const;
103 static void string2params(std::string const &, InsetWrapParams &);
105 static std::string const params2string(InsetWrapParams const &);
108 static std::string const name_;