lyx_mirror/src/mathed/math_pos.h
Angus Leeming 1f9e9cf517 Standardise the header blurb in mathed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7574 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-19 13:00:56 +00:00

56 lines
1.2 KiB
C++

// -*- C++ -*-
/**
* \file math_pos.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#ifndef MATH_POS_H
#define MATH_POS_H
#include <iosfwd>
#include "math_data.h"
/// Description of a position
class CursorPos {
public:
///
CursorPos();
///
explicit CursorPos(MathInset *);
/// returns cell corresponding to this position
MathArray & cell() const;
/// returns cell corresponding to this position
MathArray & cell(MathArray::idx_type idx) const;
/// gets screen position of the thing
void getPos(int & x, int & y) const;
/// set position
void setPos(MathArray::pos_type pos);
public:
/// pointer to an inset
MathInset * inset_;
/// 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==(CursorPos const &, CursorPos const &);
/// test for inequality
bool operator!=(CursorPos const &, CursorPos const &);
/// test for order
bool operator<(CursorPos const &, CursorPos const &);
/// output
std::ostream & operator<<(std::ostream &, CursorPos const &);
#endif