4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Matthias Ettrich
9 * Full author contact details are available in file CREDITS.
25 /// A class representing latex vertical spacing
28 /// The different kinds of spaces.
35 LENGTH ///< user-defined length
41 explicit VSpace(VSpaceKind k);
43 explicit VSpace(Length const & l);
45 explicit VSpace(GlueLength const & l);
47 /// Constructor for reading from a .lyx file
48 explicit VSpace(std::string const & data);
50 /// return the type of vertical space
51 VSpaceKind kind() const { return kind_; }
52 /// return the length of this space
53 GlueLength const & length() const { return len_; }
55 // a flag that switches between \vspace and \vspace*
56 bool keep() const { return keep_; }
57 /// if set true, use \vspace* when type is not DEFSKIP
58 void setKeep(bool keep) { keep_ = keep; }
60 bool operator==(VSpace const &) const;
64 /// how it goes into the LyX file
65 std::string const asLyXCommand() const;
66 /// the latex representation
67 std::string const asLatexCommand(BufferParams const & params) const;
68 /// how it is seen in the LyX window
69 docstring const asGUIName() const;
70 /// the size of the space on-screen
71 int inPixels(BufferView const & bv) const;
76 /// the specified length
78 /// if true, use \vspace* type