]> git.lyx.org Git - lyx.git/blob - src/lyxcursor.C
rename Inset to InsetOld
[lyx.git] / src / lyxcursor.C
1 /**
2  * \file lyxcursor.C
3  * Copyright 1995-2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author Matthias Ettrich
7  */
8
9 #include <config.h>
10
11 #include "lyxcursor.h"
12
13
14 LyXCursor::LyXCursor()
15         : par_(), pos_(0), boundary_(false),
16           x_(0), ix_(0), x_fix_(0), y_(0), iy_(0)
17 {}
18
19
20 void LyXCursor::par(ParagraphList::iterator pit)
21 {
22         par_ = pit;
23 }
24
25
26 ParagraphList::iterator LyXCursor::par() const
27 {
28         return par_;
29 }
30
31
32 void LyXCursor::pos(lyx::pos_type p)
33 {
34         pos_ = p;
35 }
36
37
38 lyx::pos_type LyXCursor::pos() const
39 {
40         return pos_;
41 }
42
43
44 void LyXCursor::boundary(bool b)
45 {
46         boundary_ = b;
47 }
48
49
50 bool LyXCursor::boundary() const
51 {
52         return boundary_;
53 }
54
55
56 void LyXCursor::x(int n)
57 {
58         x_ = n;
59 }
60
61 int LyXCursor::x() const
62 {
63         return x_;
64 }
65
66
67 void LyXCursor::ix(int n)
68 {
69         ix_ = n;
70 }
71
72 int LyXCursor::ix() const
73 {
74         return ix_;
75 }
76
77
78 void LyXCursor::x_fix(int i)
79 {
80         x_fix_ = i;
81 }
82
83
84 int LyXCursor::x_fix() const
85 {
86         return x_fix_;
87 }
88
89
90 void LyXCursor::y(int i)
91 {
92         y_ = i;
93 }
94
95
96 int LyXCursor::y() const
97 {
98         return y_;
99 }
100
101
102 void LyXCursor::iy(int i)
103 {
104         iy_ = i;
105 }
106
107
108 int LyXCursor::iy() const
109 {
110         return iy_;
111 }
112
113
114 bool operator==(LyXCursor const & a, LyXCursor const & b)
115 {
116         return a.par() == b.par()
117             && a.pos() == b.pos()
118             && a.boundary() == b.boundary();
119 }
120
121
122 bool operator!=(LyXCursor const & a, LyXCursor const & b)
123 {
124         return !(a == b);
125 }
126