]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_xdata.h
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_xdata.h
index a14573299001c71b3524df9958d5a86c365768c6..41e4eedaab0665b418560266bdccf7bb0b8854c5 100644 (file)
@@ -13,6 +13,7 @@
 #endif
 
 class Painter;
+class TextPainter;
 
 
 /** This class extends a MathArray by drawing routines and caches for
@@ -32,6 +33,12 @@ public:
        void metrics(MathMetricsInfo const & st) const;
        /// redraw cell using cache metrics information
        void draw(Painter & pain, int x, int y) const;
+       /// rebuild cached metrics information
+       void metricsT(TextMetricsInfo const & st) const;
+       /// redraw cell using cache metrics information
+       void drawT(TextPainter & pain, int x, int y) const;
+       /// mark cell for re-drawing
+       void touch() const;
 
        /// access to cached x coordinate of last drawing
        int xo() const { return xo_; }
@@ -61,12 +68,16 @@ public:
        void boundingBox(int & xlow, int & xhigh, int & ylow, int & yhigh);
        /// find best position to do things
        //void findPos(PosFinder &) const;
+       /// 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;
 
        /// begin iterator of the underlying MathArray
        const_iterator begin() const { return data_.begin(); }
        /// end iterator of the underlying MathArray
        const_iterator end() const { return data_.end(); }
-       
+
 public:
        /// the underlying MathArray
        MathArray data_;
@@ -82,6 +93,10 @@ public:
        mutable int yo_;
        /// cache size information of last drawing
        mutable MathMetricsInfo size_;
+       /// cached cleaness of cell
+       mutable bool clean_;
+       /// cached draw status of cell
+       mutable bool drawn_;
 };
 
 /// output cell on a stream