]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_charinset.h
Ensure all #warning statements are wrapped by #ifdef WITH_WARNINGS.
[lyx.git] / src / mathed / math_charinset.h
index 067affac0bd7b82ac2b300b777c5002de2c1e909..76a1feab001a61fb5476971bf6ae88a0504ad211 100644 (file)
@@ -30,6 +30,9 @@ public:
        void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
        ///
        void drawT(TextPainter &, int x, int y) const;
+       ///
+       int width() const { return width_; }
+
        ///
        void write(WriteStream & os) const;
        ///
@@ -46,5 +49,7 @@ public:
 private:
        /// the character
        char char_;
+       /// cached width
+       mutable int width_;
 };
 #endif