]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathData.h
Preserve \inputencoding value when switching to non-TeX fonts.
[lyx.git] / src / mathed / MathData.h
index 2f6ab22acd3967d76fad2b55b1405422343251a6..b118d6c41f2d412cae1fa22c3054196bb108dc4f 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <cstddef>
 #include <vector>
-#include <map>
 
 
 namespace lyx {
@@ -125,7 +124,11 @@ public:
        bool addToMathRow(MathRow &, MetricsInfo & mi) 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
+        *  the x height of the font. 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;
 
@@ -137,8 +140,6 @@ public:
        void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
        /// redraw cell using cache metrics information
        void drawT(TextPainter & pi, int x, int y) const;
-       /// mark cell for re-drawing
-       void touch() const;
        /// approximate the math class of the data
        MathClass mathClass() const;
 
@@ -178,6 +179,8 @@ public:
        void updateMacros(Cursor * cur, MacroContext const & mc, UpdateType, int nesting);
        ///
        void updateBuffer(ParIterator const &, UpdateType);
+       ///
+       void setBuffer(Buffer & b);
 
 protected:
        /// cached values for super/subscript placement
@@ -188,9 +191,6 @@ protected:
        mutable int kerning_;
        Buffer * buffer_;
 
-       /// cached object that describes typeset data
-       mutable std::map<BufferView*, MathRow> mrow_cache_;
-
 private:
        /// is this an exact match at this position?
        bool find1(MathData const & ar, size_type pos) const;