]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.h
J�rgen Spitzm�ller's tweak of the Paragraph dialog.
[lyx.git] / src / lyxcursor.h
index 0fdf06a2961d30637f34f768f4fea6e619932d55..1032055f0e5006f217dfe3fe6ee165907d9a3214 100644 (file)
@@ -28,8 +28,6 @@ public:
        ///
        void par(Paragraph * p);
        ///
-       Paragraph * par();
-       ///
        Paragraph * par() const;
        ///
        void pos(Paragraph::size_type p);
@@ -54,8 +52,6 @@ public:
        ///
        void row(Row * r);
        ///
-       Row * row();
-       ///
        Row * row() const;
 private:
        /// The paragraph the cursor is in.
@@ -90,4 +86,34 @@ bool operator!=(LyXCursor const & a, LyXCursor const & b)
        return !(a == b);
 }
 
+///
+inline
+bool operator<(LyXCursor const & a, LyXCursor const & b) 
+{
+       // Can this be done in a nother way?
+       return (a.y() < b.y() && a.pos() < b.pos());
+}
+
+///
+inline
+bool operator>(LyXCursor const & a, LyXCursor const & b) 
+{
+       return b < a;
+}
+
+///
+inline
+bool operator>=(LyXCursor const & a, LyXCursor const & b)
+{
+       return !(a < b);
+}
+
+
+///
+inline
+bool operator<=(LyXCursor const & a, LyXCursor const & b)
+{
+       return !(a > b);
+}
+
 #endif