mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 14:32:04 +00:00
039fa89b9f
responsible for the crashes... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3191 a592a061-630c-0410-9148-cb99ea01b6c8
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#ifndef MATH_POS_H
|
|
#define MATH_POS_H
|
|
|
|
#include <iosfwd>
|
|
#include "math_xdata.h"
|
|
|
|
|
|
/// Description of a position
|
|
class MathCursorPos {
|
|
public:
|
|
///
|
|
MathCursorPos();
|
|
///
|
|
explicit MathCursorPos(MathInset *);
|
|
|
|
/// returns cell corresponding to this position
|
|
MathArray & cell() const;
|
|
/// returns cell corresponding to this position
|
|
MathArray & cell(MathArray::idx_type idx) const;
|
|
/// returns xcell corresponding to this position
|
|
MathXArray & xcell() const;
|
|
/// returns xcell corresponding to this position
|
|
MathXArray & xcell(MathArray::idx_type idx) const;
|
|
///
|
|
int xpos() const;
|
|
///
|
|
int ypos() const;
|
|
|
|
public:
|
|
/// pointer to an inset
|
|
MathInset * par_;
|
|
/// cell index of a position in this inset
|
|
MathArray::idx_type idx_;
|
|
/// position in this cell
|
|
MathArray::pos_type pos_;
|
|
};
|
|
|
|
/// test for equality
|
|
bool operator==(MathCursorPos const &, MathCursorPos const &);
|
|
/// test for inequality
|
|
bool operator!=(MathCursorPos const &, MathCursorPos const &);
|
|
/// test for order
|
|
bool operator<(MathCursorPos const &, MathCursorPos const &);
|
|
/// output
|
|
std::ostream & operator<<(std::ostream &, MathCursorPos const &);
|
|
|
|
#endif
|