]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathData.h
Make sure inset buffer is correctly set in math grid
[lyx.git] / src / mathed / MathData.h
index 31bb787c98f4d82c56e14193c2358aaa4c180f3e..6224e91ea1c6ea29e7536f6da5bf6eacaa60fe02 100644 (file)
@@ -124,8 +124,14 @@ public:
        /// Add this array to a math row. Return true if contents got added
        bool addToMathRow(MathRow &, MetricsInfo & mi) const;
 
+       // return true if caret is in this cell in this buffer view
+       bool hasCaret(BufferView * bv) const;
+
        /// rebuild cached metrics information
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       /** When \c tight is true, the height of the cell will be at least
+        *  that of 'x'. Otherwise, it will be the max height of the font.
+        */
+       void metrics(MetricsInfo & mi, Dimension & dim, bool tight = true) const;
        ///
        Dimension const & dimension(BufferView const &) const;
 
@@ -179,7 +185,7 @@ public:
        ///
        void updateBuffer(ParIterator const &, UpdateType);
        ///
-       void setBuffer(Buffer & b) { buffer_ = &b; }
+       void setBuffer(Buffer & b);
 
 protected:
        /// cached values for super/subscript placement