]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_symbolinset.h
float2string #4 (Spacing)
[lyx.git] / src / mathed / math_symbolinset.h
index f8f2fb276b487dbad784925a3cb06e3fd77ae0d7..29fcafb4eab681390b53be7a48de4500ec7bad91 100644 (file)
@@ -29,11 +29,12 @@ public:
        ///
        explicit MathSymbolInset(std::string const & name);
        ///
-       virtual std::auto_ptr<InsetBase> clone() const;
-       ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo &, int x, int y) const;
+       ///
+       int width() const { return width_; }
+
        ///
        bool isRelOp() const;
        /// do we take scripts?
@@ -65,10 +66,13 @@ public:
        void infoize2(std::ostream & os) const;
 
 private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
        ///
        latexkeys const * sym_;
        ///
        mutable int h_;
+       /// cached width
+       mutable int width_;
        ///
        mutable bool scriptable_;
 };