]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_xdata.h
several smallish changes/bugfixes/left overs from Porto
[lyx.git] / src / mathed / math_xdata.h
index ee5b1d73a9ed7e83124b37c2bc241fd27c2bece9..b35c062b9a575f02826100cec3fe7d52f511f658 100644 (file)
@@ -12,7 +12,8 @@
 #pragma interface
 #endif
 
-class Painter;
+class MathPainterInfo;
+class TextPainter;
 
 
 /** This class extends a MathArray by drawing routines and caches for
@@ -29,9 +30,15 @@ public:
        /// constructor
        MathXArray();
        /// rebuild cached metrics information
-       void metrics(MathMetricsInfo const & st) const;
+       void metrics(MathMetricsInfo & st) const;
        /// redraw cell using cache metrics information
-       void draw(Painter & pain, int x, int y) const;
+       void draw(MathPainterInfo & 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_; }
@@ -70,7 +77,7 @@ public:
        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_;
@@ -86,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