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 "InsetCaptionable.h"
17 #include "support/Length.h"
23 class InsetWrapParams {
26 void write(std::ostream &) const;
35 std::string placement = "o";
37 Length overhang = Length(0, Length::PCW);
39 Length width = Length(50, Length::PCW);
45 class InsetWrap : public InsetCaptionable {
48 InsetWrap(Buffer *, std::string const &);
52 InsetWrapParams const & params() const { return params_; }
54 static void string2params(std::string const &, InsetWrapParams &);
56 static std::string params2string(InsetWrapParams const &);
59 void setCaptionType(std::string const & type) override;
61 void write(std::ostream & os) const override;
63 void read(Lexer & lex) override;
65 void validate(LaTeXFeatures & features) const override;
67 InsetCode lyxCode() const override { return WRAP_CODE; }
69 docstring toolTip(BufferView const & bv, int x, int y) const override;
71 void latex(otexstream &, OutputParams const &) const override;
73 int plaintext(odocstringstream & ods, OutputParams const & op,
74 size_t max_length = INT_MAX) const override;
76 void docbook(XMLStream &, OutputParams const &) const override;
78 docstring xhtml(XMLStream &, OutputParams const &) const override;
80 bool insetAllowed(InsetCode) const override;
82 bool showInsetDialog(BufferView *) const override;
84 bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
86 void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
88 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
90 docstring layoutName() const override;
92 Inset * clone() const override { return new InsetWrap(*this); }
93 /// Is the content of this inset part of the immediate (visible) text sequence?
94 bool isPartOfTextSequence() const override { return false; }
97 InsetWrapParams params_;