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 "lyxgluelength.h"
23 /// A class representing latex vertical spacing
26 /// The different kinds of spaces.
28 NONE, ///< no added vertical space
34 LENGTH ///< user-defined length
39 explicit VSpace(vspace_kind k);
41 explicit VSpace(LyXLength const & l);
43 explicit VSpace(LyXGlueLength const & l);
45 /// Constructor for reading from a .lyx file
46 explicit VSpace(string const & data);
48 /// return the type of vertical space
49 vspace_kind kind() const;
50 /// return the length of this space
51 LyXGlueLength length() const;
53 // a flag that switches between \vspace and \vspace*
55 /// if set true, use \vspace* when type is not DEFSKIP
56 void setKeep(bool val);
58 bool operator==(VSpace const &) const;
62 /// how it goes into the LyX file
63 string const asLyXCommand() const;
64 /// the latex representation
65 string const asLatexCommand(BufferParams const & params) const;
66 /// the size of the space on-screen
67 int inPixels(BufferView const & bv) const;
72 /// the specified length
74 /// if true, use \vspace* type