]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathRow.h
Move <algorithm> from DocIterator.h
[lyx.git] / src / mathed / MathRow.h
index cb4c8614cd38f5993cc31a8821ce5cf501634724..f2b0445a0b228bc1618552237c44faf662d24e9a 100644 (file)
@@ -16,6 +16,7 @@
 #include "MathClass.h"
 
 #include "ColorCode.h"
+#include "Dimension.h"
 
 #include "support/docstring.h"
 
@@ -65,7 +66,7 @@ public:
                MathClass mclass;
                /// the spacing around the element
                int before, after;
-               /// count wether the current mathdata is nested in macro(s)
+               /// count whether the current mathdata is nested in macro(s)
                int macro_nesting;
                /// Marker type
                InsetMath::marker_type marker;
@@ -86,7 +87,9 @@ public:
        };
 
        ///
-       MathRow() {};
+       MathRow() {}
+       ///
+       MathRow(Dimension const & dim) : caret_dim(dim) {}
        ///
        typedef std::vector<Element> Elements;
        ///
@@ -110,14 +113,18 @@ public:
        // compute the spacings.
        MathRow(MetricsInfo & mi, MathData const * ar);
 
-       // this returns true if the caret is here
-       bool metrics(MetricsInfo & mi, Dimension & dim);
+       //
+       void metrics(MetricsInfo & mi, Dimension & dim);
        //
        void draw(PainterInfo & pi, int const x, int const y) const;
 
        /// superscript kerning
        int kerning(BufferView const *) const;
 
+       /// useful when the caret visits this cell
+       Dimension caret_dim;
+
+
 private:
        // Index of the first inset element before position i
        int before(int i) const;