]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathChar.h
"fix" bug #3332 (plain text export depends on the menu language)
[lyx.git] / src / mathed / InsetMathChar.h
index 140c16829b7adc14d176d36710836bc39fa07aec..bc357bcadba16356afc1bf5a6e909109be785592 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "InsetMath.h"
 
+#include "Font.h"
 
 namespace lyx {
 
@@ -23,7 +24,7 @@ public:
        ///
        explicit InsetMathChar(char_type c);
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       bool metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
        ///
@@ -31,7 +32,7 @@ public:
        ///
        void drawT(TextPainter &, int x, int y) const;
        ///
-       int width() const { return width_; }
+       int kerning() const { return kerning_; }
 
        ///
        void write(WriteStream & os) const;
@@ -49,11 +50,13 @@ public:
        bool isRelOp() const;
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual std::auto_ptr<Inset> doClone() const;
        /// the character
        char_type char_;
-       /// cached width
-       mutable int width_;
+       /// cached kerning for superscript
+       mutable int kerning_;
+       ///
+       mutable Font font_cache_;
 };
 
 } // namespace lyx