X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxcursor.h;h=1032055f0e5006f217dfe3fe6ee165907d9a3214;hb=00d24ec87650e4ac7db77ad54cb4aa2f688100f3;hp=0fdf06a2961d30637f34f768f4fea6e619932d55;hpb=d1182f17daa1a164d9527ccbe6500840d7ac6bc8;p=lyx.git diff --git a/src/lyxcursor.h b/src/lyxcursor.h index 0fdf06a296..1032055f0e 100644 --- a/src/lyxcursor.h +++ b/src/lyxcursor.h @@ -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