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.
12 #ifndef INSET_VSPACE_H
13 #define INSET_VSPACE_H
21 class InsetVSpace : public Inset
25 InsetVSpace() : Inset(0) {}
27 explicit InsetVSpace(VSpace const &);
29 VSpace const & space() const { return space_; }
31 InsetCode lyxCode() const override { return VSPACE_CODE; }
33 bool hasSettings() const override { return true; }
35 bool clickable(BufferView const &, int, int) const override { return true; }
37 std::string contextMenuName() const override;
39 static void string2params(std::string const &, VSpace &);
41 static std::string params2string(VSpace const &);
44 void metrics(MetricsInfo & mi, Dimension & dim) const override;
46 void draw(PainterInfo & pi, int x, int y) const override;
48 void latex(otexstream &, OutputParams const &) const override;
50 int plaintext(odocstringstream & ods, OutputParams const & op,
51 size_t max_length = INT_MAX) const override;
53 void docbook(XMLStream &, OutputParams const &) const override;
54 /// Note that this returns the inset rather than writing it,
55 /// so it will actually be written after the present paragraph.
56 /// The normal case is that this inset will be on a line by
57 /// itself, and in that case the present paragraph will not,
58 /// in fact, appear at all.
59 docstring xhtml(XMLStream &, OutputParams const &) const override;
61 void read(Lexer & lex) override;
63 void write(std::ostream & os) const override;
65 RowFlags rowFlags() const override { return Display; }
67 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
69 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const override;
71 Inset * clone() const override { return new InsetVSpace(*this); }
73 docstring const label() const;