]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.C
ws changes only
[lyx.git] / src / lyxcursor.C
index 46234269c24c20419bfd8ab1ee9a4b8085c2e6c4..c49d23f8ffd03308a8706c7b14bf60dfa205ec58 100644 (file)
@@ -1,9 +1,14 @@
 /**
  * \file lyxcursor.C
- * Copyright 1995-2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
+ * \author Lars Gullik Bjønnes
  * \author Matthias Ettrich
+ * \author André Pönitz
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 
 LyXCursor::LyXCursor()
-       : par_(0), pos_(0), boundary_(false),
-         x_(0), ix_(0), x_fix_(0), y_(0), iy_(0), row_(0)
+       : par_(-1), pos_(0), boundary_(false), x_(0), x_fix_(0), y_(0)
 {}
 
 
-void LyXCursor::par(ParagraphList::iterator pit)
+void LyXCursor::par(lyx::paroffset_type par)
 {
-       par_ = pit;
+       par_ = par;
 }
 
 
-ParagraphList::iterator LyXCursor::par() const
+lyx::paroffset_type LyXCursor::par() const
 {
        return par_;
 }
@@ -64,17 +68,6 @@ int LyXCursor::x() const
 }
 
 
-void LyXCursor::ix(int n)
-{
-       ix_ = n;
-}
-
-int LyXCursor::ix() const
-{
-       return ix_;
-}
-
-
 void LyXCursor::x_fix(int i)
 {
        x_fix_ = i;
@@ -99,37 +92,16 @@ int LyXCursor::y() const
 }
 
 
-void LyXCursor::iy(int i)
-{
-       iy_ = i;
-}
-
-
-int LyXCursor::iy() const
+bool operator==(LyXCursor const & a, LyXCursor const & b)
 {
-       return iy_;
+       return a.par() == b.par()
+           && a.pos() == b.pos()
+           && a.boundary() == b.boundary();
 }
 
 
-void LyXCursor::row(RowList::iterator r)
+bool operator!=(LyXCursor const & a, LyXCursor const & b)
 {
-       row_ = r;
+       return !(a == b);
 }
 
-
-RowList::iterator LyXCursor::row() const
-{
-       return row_;
-}
-
-
-void LyXCursor::irow(RowList::iterator r)
-{
-       irow_ = r;
-}
-
-
-RowList::iterator LyXCursor::irow() const
-{
-       return irow_;
-}