]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/xarray.h
halfway through fixing size of math in non-standard sizesd paragraohs like
[lyx.git] / src / mathed / xarray.h
index 06cbececc42b17e96fdab7e5431783117dfe3f64..b67d3b96815d1409665d53cb53ec1be8ed29df45 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <iosfwd>
 #include "array.h"
+#include "math_metricsinfo.h"
 
 #ifdef __GNUG__
 #pragma interface
@@ -15,10 +16,15 @@ class Painter;
 class MathXArray
 {
 public:
+       ///
+       typedef MathArray::size_type       size_type;
+       ///
+       typedef MathArray::const_iterator  const_iterator;
+
        ///
        MathXArray();
        ///
-       void metrics(MathStyles st) const;
+       void metrics(MathMetricsInfo const & st) const;
        ///
        void draw(Painter & pain, int x, int y) const;
 
@@ -27,11 +33,9 @@ public:
        ///
        int yo() const { return yo_; }
        ///
-       int pos2x(int pos) const;
-       ///
-       int x2pos(int pos) const;
+       int pos2x(size_type pos) const;
        ///
-       int width(int pos) const;
+       size_type x2pos(int pos) const;
 
        ///
        int ascent() const { return ascent_; }
@@ -41,10 +45,13 @@ public:
        int height() const { return ascent_ + descent_; }
        ///
        int width() const { return width_; }
+
+       ///
+       const_iterator begin() const { return data_.begin(); }
        ///
-       MathStyles style() const { return style_; }
+       const_iterator end() const { return data_.end(); }
        
-
+public:
        ///
        MathArray data_;
        ///
@@ -58,7 +65,7 @@ public:
        ///
        mutable int yo_;
        ///
-       mutable MathStyles style_;
+       mutable MathMetricsInfo size_;
 };
 
 std::ostream & operator<<(std::ostream & os, MathXArray const & ar);