]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.C
Point fix, earlier forgotten
[lyx.git] / src / lyxcursor.C
index 76e43f76bad945de84b5c6b8206afbddcc638f63..c7f62cc713adf115c9946c79033113e92686d228 100644 (file)
@@ -1,35 +1,34 @@
-/* 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), x_fix_(0), y_(0), row_(0)
+       : par_(), pos_(0), boundary_(false),
+         x_(0), x_fix_(0), y_(0)
 {}
 
 
-void LyXCursor::par(Paragraph * p)
+void LyXCursor::par(ParagraphList::iterator pit)
 {
-       par_ = p;
+       par_ = pit;
 }
 
 
-Paragraph * LyXCursor::par() const
+ParagraphList::iterator LyXCursor::par() const
 {
        return par_;
 }
@@ -94,13 +93,16 @@ int LyXCursor::y() const
 }
 
 
-void LyXCursor::row(Row * r)
+bool operator==(LyXCursor const & a, LyXCursor const & b)
 {
-       row_ = r;
+       return a.par() == b.par()
+           && a.pos() == b.pos()
+           && a.boundary() == b.boundary();
 }
 
 
-Row * LyXCursor::row() const
+bool operator!=(LyXCursor const & a, LyXCursor const & b)
 {
-       return row_;
+       return !(a == b);
 }
+