// -*- C++ -*-
-/*
+/**
* You are free to use and modify this code under the terms of
* the GNU General Public Licence version 2 or later.
*/
/** \class MathArray
\brief Low level container for math insets
- \author Alejandro Aguilar Sierra
- \author André Pönitz
- \author Lars Gullik Bjønnes
+ * \author Alejandro Aguilar Sierra
+ * \author André Pönitz
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
\version February 2001
*/
class TextPainter;
-#ifdef __GNUG__
-#pragma interface
-#endif
class MathArray : private std::vector<MathAtom> {
///
typedef size_type idx_type;
typedef size_type pos_type;
-
+
public:
///
MathArray();
int xm() const { return xo_ + dim_.w / 2; }
/// access to cached y coordinate of mid point of last drawing
int ym() const { return yo_ + (dim_.d - dim_.a) / 2; }
+ /// write access to coordinate;
+ void setXY(int x, int y) const;
/// returns x coordinate of given position in the array
int pos2x(size_type pos) const;
/// returns position of given x coordinate
void center(int & x, int & y) const;
/// adjust (x,y) to point on boundary on a straight line from the center
void towards(int & x, int & y) const;
+ /// clean up if necessary
+ void notifyCursorLeaves();
private:
/// is this an exact match at this position?