2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
19 #include "support/types.h"
24 /** All these variables should be explained. Matthias?
31 void par(Paragraph * p);
33 Paragraph * par() const;
35 void pos(lyx::pos_type p);
37 lyx::pos_type pos() const;
39 void boundary(bool b);
41 bool boundary() const;
71 /// The paragraph the cursor is in.
73 /// The position inside the paragraph
79 /// the x position of the position before the inset when we put
80 /// the cursor on the end of the row before, otherwise equal to x.
86 /// the y position of the position before the inset when we put
87 /// the cursor on the end of the row before, otherwise equal to y.
91 /// the row of the position before the inset when we put
92 /// the cursor on the end of the row before, otherwise equal to row.
98 bool operator==(LyXCursor const & a, LyXCursor const & b)
100 return (a.par() == b.par())
101 && (a.pos() == b.pos())
102 && a.boundary() == b.boundary();
107 bool operator!=(LyXCursor const & a, LyXCursor const & b)
114 bool operator<(LyXCursor const & a, LyXCursor const & b)
116 // Can this be done in a nother way?
117 return (a.y() < b.y() && a.pos() < b.pos());
122 bool operator>(LyXCursor const & a, LyXCursor const & b)
129 bool operator>=(LyXCursor const & a, LyXCursor const & b)
137 bool operator<=(LyXCursor const & a, LyXCursor const & b)