]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.C
ws changes only
[lyx.git] / src / lyxcursor.C
index 47489a0fddea40b4c763a51bca35ab398dea20fd..c49d23f8ffd03308a8706c7b14bf60dfa205ec58 100644 (file)
@@ -1,35 +1,33 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file lyxcursor.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author André Pönitz
+ * \author Jürgen Vigna
  *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS.
+ */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "lyxcursor.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(Paragraph * p)
+void LyXCursor::par(lyx::paroffset_type par)
 {
-       par_ = p;
+       par_ = par;
 }
 
 
-Paragraph * LyXCursor::par() const
+lyx::paroffset_type LyXCursor::par() const
 {
        return par_;
 }
@@ -70,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;
@@ -105,25 +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(Row * r)
+bool operator!=(LyXCursor const & a, LyXCursor const & b)
 {
-       row_ = r;
+       return !(a == b);
 }
 
-
-Row * LyXCursor::row() const
-{
-       return row_;
-}