-/* This file is part of
- * ======================================================
- *
- * LyX, The Document Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
+/**
+ * \file lyxcursor.C
+ * Copyright 1995-2001 the LyX Team
+ * Read the file COPYING
*
- * ====================================================== */
+ * \author Matthias Ettrich
+ */
+
+#include <config.h>
#include "lyxcursor.h"
-void LyXCursor::par(LyXParagraph * p)
-{
- par_ = p;
-}
+LyXCursor::LyXCursor()
+ : par_(), pos_(0), boundary_(false),
+ x_(0), ix_(0), x_fix_(0), y_(0), iy_(0)
+{}
-LyXParagraph * LyXCursor::par()
+void LyXCursor::par(ParagraphList::iterator pit)
{
- return par_;
+ par_ = pit;
}
-LyXParagraph * LyXCursor::par() const
+ParagraphList::iterator LyXCursor::par() const
{
return par_;
}
-void LyXCursor::pos(LyXParagraph::size_type p)
+void LyXCursor::pos(lyx::pos_type p)
{
pos_ = p;
}
-LyXParagraph::size_type LyXCursor::pos() const
+lyx::pos_type LyXCursor::pos() const
{
return pos_;
}
-void LyXCursor::boundary(bool b)
+void LyXCursor::boundary(bool b)
{
boundary_ = b;
}
}
+void LyXCursor::ix(int n)
+{
+ ix_ = n;
+}
+
+int LyXCursor::ix() const
+{
+ return ix_;
+}
+
+
void LyXCursor::x_fix(int i)
{
x_fix_ = i;
}
-void LyXCursor::y(unsigned long i)
+void LyXCursor::y(int i)
{
y_ = i;
}
-unsigned long LyXCursor::y() const
+int LyXCursor::y() const
{
return y_;
}
-void LyXCursor::row(Row * r)
+void LyXCursor::iy(int i)
+{
+ iy_ = i;
+}
+
+
+int LyXCursor::iy() const
{
- row_ = r;
+ return iy_;
}
-Row * LyXCursor::row()
+bool operator==(LyXCursor const & a, LyXCursor const & b)
{
- return row_;
+ 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);
}
+