]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.h
Fix deleting of paragraphs after undo (fix #236).
[lyx.git] / src / lyxcursor.h
index a3025e4073fe594bd6beffa275fb32bbd1d0318f..cc7cb9ef90b91f22d5755a4db3353a2b323314ca 100644 (file)
 #pragma interface
 #endif
 
-#include "paragraph.h"
+#include "support/types.h"
 
-struct Row;
+class Paragraph;
+class Row;
 
 /** All these variables should be explained. Matthias?
  */
 class LyXCursor {
 public:
+       ///
        LyXCursor();
        ///
        void par(Paragraph * p);
        ///
-       //Paragraph * par();
-       ///
        Paragraph * par() const;
        ///
-       void pos(Paragraph::size_type p);
+       void pos(lyx::pos_type p);
        ///
-       Paragraph::size_type pos() const;
+       lyx::pos_type pos() const;
        ///
        void boundary(bool b);
        ///
@@ -54,14 +54,12 @@ public:
        ///
        void row(Row * r);
        ///
-       //Row * row();
-       ///
        Row * row() const;
 private:
        /// The paragraph the cursor is in.
        Paragraph * par_;
        /// The position inside the paragraph
-       Paragraph::size_type pos_;
+       lyx::pos_type pos_;
        ///
        bool boundary_;
        ///
@@ -109,11 +107,7 @@ bool operator>(LyXCursor const & a, LyXCursor const & b)
 inline
 bool operator>=(LyXCursor const & a, LyXCursor const & b)
 {
-#if 0
-       return (a > b || a == b);
-#else
        return !(a < b);
-#endif
 }
 
 
@@ -121,11 +115,7 @@ bool operator>=(LyXCursor const & a, LyXCursor const & b)
 inline
 bool operator<=(LyXCursor const & a, LyXCursor const & b)
 {
-#if 0
-       return (a < b || a == b);
-#else
        return !(a > b);
-#endif
 }
 
 #endif