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 "paragraph.h"
23 /** All these variables should be explained. Matthias?
29 void par(Paragraph * p);
33 Paragraph * par() const;
35 void pos(Paragraph::size_type p);
37 Paragraph::size_type pos() const;
39 void boundary(bool b);
41 bool boundary() const;
61 /// The paragraph the cursor is in.
63 /// The position inside the paragraph
64 Paragraph::size_type pos_;
79 bool operator==(LyXCursor const & a, LyXCursor const & b)
81 return (a.par() == b.par())
82 && (a.pos() == b.pos())
83 && a.boundary() == b.boundary();
88 bool operator!=(LyXCursor const & a, LyXCursor const & b)
95 bool operator<(LyXCursor const & a, LyXCursor const & b)
97 // Can this be done in a nother way?
98 return (a.y() < b.y() && a.pos() < b.pos());
103 bool operator>(LyXCursor const & a, LyXCursor const & b)
110 bool operator>=(LyXCursor const & a, LyXCursor const & b)
113 return (a > b || a == b);
122 bool operator<=(LyXCursor const & a, LyXCursor const & b)
125 return (a < b || a == b);