]> git.lyx.org Git - lyx.git/blobdiff - src/VSpace.h
fix a visual cursor edge-case:
[lyx.git] / src / VSpace.h
index 03f91520e20b8c46dcbed72a9fd9805202c4c773..b982b939f9bbab10e53e4ee147f15b0f663243a3 100644 (file)
@@ -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;
+       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;
 
@@ -71,9 +72,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_;
 };