]> git.lyx.org Git - lyx.git/blob - src/mathed/math_pos.h
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_pos.h
1 #ifndef MATH_POS_H
2 #define MATH_POS_H
3
4 #include <iosfwd>
5 #include "math_xdata.h"
6
7
8 /// Description of a position
9 class MathCursorPos {
10 public:
11         ///
12         MathCursorPos();
13         ///
14         explicit MathCursorPos(MathInset *);
15
16         /// returns cell corresponding to this position
17         MathArray & cell() const;
18         /// returns cell corresponding to this position
19         MathArray & cell(MathArray::idx_type idx) const;
20         /// returns xcell corresponding to this position
21         MathXArray & xcell() const;
22         /// returns xcell corresponding to this position
23         MathXArray & xcell(MathArray::idx_type idx) const;
24         ///
25         int xpos() const;
26         ///
27         int ypos() const;
28
29 public:
30         /// pointer to an inset
31         MathInset * par_;
32         /// cell index of a position in this inset
33         MathArray::idx_type idx_;
34         /// position in this cell
35         MathArray::pos_type pos_;
36 };
37
38 /// test for equality
39 bool operator==(MathCursorPos const &, MathCursorPos const &);
40 /// test for inequality
41 bool operator!=(MathCursorPos const &, MathCursorPos const &);
42 /// test for order
43 bool operator<(MathCursorPos const &, MathCursorPos const &);
44 /// output
45 std::ostream & operator<<(std::ostream &, MathCursorPos const &);
46
47 #endif