]> git.lyx.org Git - lyx.git/blobdiff - src/lyxcursor.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / lyxcursor.C
index a6caad20241a40d65c2d32797944f3cb597b8414..fb298015452f491df3df0e8cc6a0b0e70641ac49 100644 (file)
@@ -1,35 +1,29 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file lyxcursor.C
+ * Copyright 1995-2001 the LyX Team
+ * Read the file COPYING
  *
- *           LyX, The Document Processor
- *
- *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+ * \author Matthias Ettrich
+ */
 
 #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_(), pos_(0), boundary_(false),
+         x_(0), ix_(0), x_fix_(0), y_(0), iy_(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_;
 }
@@ -117,25 +111,16 @@ int LyXCursor::iy() const
 }
 
 
-void LyXCursor::row(Row * r)
-{
-       row_ = r;
-}
-
-
-Row * LyXCursor::row() const
+bool operator==(LyXCursor const & a, LyXCursor const & b)
 {
-       return row_;
+       return a.par() == b.par()
+           && a.pos() == b.pos()
+           && a.boundary() == b.boundary();
 }
 
 
-void LyXCursor::irow(Row * r)
+bool operator!=(LyXCursor const & a, LyXCursor const & b)
 {
-       irow_ = r;
+       return !(a == b);
 }
 
-
-Row * LyXCursor::irow() const
-{
-       return irow_;
-}