]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_data.h
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_data.h
index 87ed99c495595460905eaa7ebd18614e29cbe924..1720ba44234e01088b48bdd7b98dd7d9d4ea6470 100644 (file)
@@ -20,7 +20,6 @@
 #include "math_atom.h"
 #include "dimension.h"
 
-class MathMacro;
 class LaTeXFeatures;
 class ReplaceData;
 class MetricsInfo;
@@ -78,9 +77,9 @@ public:
        ///
        void dump2() const;
        ///
-       void substitute(MathMacro const & macro);
-       ///
        void replace(ReplaceData &);
+       ///
+       void substitute(MathArray const & m);
 
        /// looks for exact match
        bool match(MathArray const & ar) const;
@@ -113,15 +112,13 @@ public:
        void touch() const;
 
        /// access to cached x coordinate of last drawing
-       int xo() const { return xo_; }
+       int xo() const;
        /// access to cached y coordinate of last drawing
-       int yo() const { return yo_; }
+       int yo() const;
        /// access to cached x coordinate of mid point of last drawing
-       int xm() const { return xo_ + dim_.wid / 2; }
+       int xm() const { return xo() + dim_.wid / 2; }
        /// access to cached y coordinate of mid point of last drawing
-       int ym() const { return yo_ + (dim_.des - dim_.asc) / 2; }
-       ///
-       bool contains(int x, int y) const;
+       int ym() const { return yo() + (dim_.des - dim_.asc) / 2; }
        /// write access to coordinate;
        void setXY(int x, int y) const;
        /// returns x coordinate of given position in the array
@@ -148,14 +145,6 @@ public:
        Dimension const & dim() const { return dim_; }
        /// dimensions of cell
        void setDim(Dimension const & d) const { dim_ = d; }
-       /// bounding box of this cell
-       void boundingBox(int & xlow, int & xhigh, int & ylow, int & yhigh);
-       /// gives center coordinates
-       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?
@@ -163,14 +152,6 @@ private:
 
        /// cached dimensions of cell
        mutable Dimension dim_;
-       /// cached x coordinate of last drawing
-       mutable int xo_;
-       /// cached y coordinate of last drawing
-       mutable int yo_;
-       /// cached cleaness of cell
-       mutable bool clean_;
-       /// cached draw status of cell
-       mutable bool drawn_;
 };
 
 ///