X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FVSpace.h;h=0d154d63e4bc2a0d0d0bbc2e512c4b20b04d539f;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=03f91520e20b8c46dcbed72a9fd9805202c4c773;hpb=f630be890494c849981e4fb52ea4740506e92bed;p=lyx.git diff --git a/src/VSpace.h b/src/VSpace.h index 03f91520e2..0d154d63e4 100644 --- a/src/VSpace.h +++ b/src/VSpace.h @@ -12,7 +12,7 @@ #ifndef VSPACE_H #define VSPACE_H -#include "LyXGlueLength.h" +#include "Length.h" namespace lyx { @@ -26,7 +26,7 @@ class BufferView; class VSpace { public: /// The different kinds of spaces. - enum vspace_kind { + enum VSpaceKind { DEFSKIP, SMALLSKIP, MEDSKIP, @@ -35,26 +35,27 @@ public: LENGTH ///< user-defined length }; + /// VSpace(); - - explicit VSpace(vspace_kind k); - - explicit VSpace(LyXLength const & l); - - explicit VSpace(LyXGlueLength const & l); + /// + explicit VSpace(VSpaceKind k); + /// + explicit VSpace(Length const & l); + /// + explicit VSpace(GlueLength const & l); /// Constructor for reading from a .lyx file explicit VSpace(std::string const & data); /// return the type of vertical space - vspace_kind kind() const; + VSpaceKind kind() const { return kind_; } /// return the length of this space - LyXGlueLength const & length() const; + GlueLength const & length() const { return len_; } - // a flag that switches between \vspace and \vspace* - bool keep() const; + /// a flag that switches between \vspace and \vspace* + bool keep() const { return keep_; } /// if set true, use \vspace* when type is not DEFSKIP - void setKeep(bool val); + void setKeep(bool keep) { keep_ = keep; } /// bool operator==(VSpace const &) const; @@ -64,6 +65,8 @@ public: std::string const asLyXCommand() const; /// the latex representation std::string const asLatexCommand(BufferParams const & params) const; + /// + std::string asHTMLLength() const; /// how it is seen in the LyX window docstring const asGUIName() const; /// the size of the space on-screen @@ -71,9 +74,9 @@ public: private: /// This VSpace kind - vspace_kind kind_; + VSpaceKind kind_; /// the specified length - LyXGlueLength len_; + GlueLength len_; /// if true, use \vspace* type bool keep_; };