]> git.lyx.org Git - lyx.git/blob - src/lyxcursor.C
ws changes only
[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), x_fix_(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 int LyXCursor::x() const
66 {
67         return x_;
68 }
69
70
71 void LyXCursor::x_fix(int i)
72 {
73         x_fix_ = i;
74 }
75
76
77 int LyXCursor::x_fix() const
78 {
79         return x_fix_;
80 }
81
82
83 void LyXCursor::y(int i)
84 {
85         y_ = i;
86 }
87
88
89 int LyXCursor::y() const
90 {
91         return y_;
92 }
93
94
95 bool operator==(LyXCursor const & a, LyXCursor const & b)
96 {
97         return a.par() == b.par()
98             && a.pos() == b.pos()
99             && a.boundary() == b.boundary();
100 }
101
102
103 bool operator!=(LyXCursor const & a, LyXCursor const & b)
104 {
105         return !(a == b);
106 }
107