]> git.lyx.org Git - lyx.git/blob - src/lyxcursor.C
the spellcheck cleanup
[lyx.git] / src / lyxcursor.C
1 /**
2  * \file lyxcursor.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author Matthias Ettrich
8  * \author André Pönitz
9  * \author Jürgen Vigna
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #include <config.h>
15
16 #include "lyxcursor.h"
17
18
19 LyXCursor::LyXCursor()
20         : par_(-1), pos_(0), boundary_(false), x_(0), y_(0)
21 {}
22
23
24 void LyXCursor::par(lyx::paroffset_type par)
25 {
26         par_ = par;
27 }
28
29
30 lyx::paroffset_type LyXCursor::par() const
31 {
32         return par_;
33 }
34
35
36 void LyXCursor::pos(lyx::pos_type p)
37 {
38         pos_ = p;
39 }
40
41
42 lyx::pos_type LyXCursor::pos() const
43 {
44         return pos_;
45 }
46
47
48 void LyXCursor::boundary(bool b)
49 {
50         boundary_ = b;
51 }
52
53
54 bool LyXCursor::boundary() const
55 {
56         return boundary_;
57 }
58
59
60 void LyXCursor::x(int n)
61 {
62         x_ = n;
63 }
64
65
66 int LyXCursor::x() const
67 {
68         return x_;
69 }
70
71
72 void LyXCursor::y(int i)
73 {
74         y_ = i;
75 }
76
77
78 int LyXCursor::y() const
79 {
80         return y_;
81 }
82
83
84 bool operator==(LyXCursor const & a, LyXCursor const & b)
85 {
86         return a.par() == b.par()
87             && a.pos() == b.pos()
88             && a.boundary() == b.boundary();
89 }
90
91
92 bool operator!=(LyXCursor const & a, LyXCursor const & b)
93 {
94         return !(a == b);
95 }
96