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.
15 #include "support/Length.h"
25 /// A class representing latex vertical spacing
28 /// The different kinds of spaces.
37 LENGTH ///< user-defined length
43 explicit VSpace(VSpaceKind k);
45 explicit VSpace(Length const & l);
47 explicit VSpace(GlueLength const & l);
49 /// Constructor for reading from a .lyx file
50 explicit VSpace(std::string const & data);
52 /// return the type of vertical space
53 VSpaceKind kind() const { return kind_; }
54 /// return the length of this space
55 GlueLength const & length() const { return len_; }
57 /// a flag that switches between \vspace and \vspace*
58 bool keep() const { return keep_; }
59 /// if set true, use \vspace* when type is not DEFSKIP
60 void setKeep(bool keep) { keep_ = keep; }
62 bool operator==(VSpace const &) const;
66 /// how it goes into the LyX file
67 std::string const asLyXCommand() const;
68 /// the latex representation
69 std::string const asLatexCommand(BufferParams const & params) const;
71 std::string asHTMLLength() const;
72 /// how it is seen in the LyX window
73 docstring const asGUIName() const;
74 /// the size of the space on-screen
75 int inPixels(BufferView const & bv) const;
80 /// the specified length
82 /// if true, use \vspace* type