]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSymbol.h
Properly fix bug 3258.
[lyx.git] / src / mathed / InsetMathSymbol.h
index 33cb4d9f3cbe1e8fe47de26fed59d56be29a1edd..60f4028fb063264d21722472b7b9da4375ec85cf 100644 (file)
 
 #include "InsetMath.h"
 
+#include "Font.h"
+
+namespace lyx {
+
 class latexkeys;
 
 
@@ -27,16 +31,18 @@ public:
        ///
        explicit InsetMathSymbol(char const * name);
        ///
-       explicit InsetMathSymbol(std::string const & name);
+       explicit InsetMathSymbol(docstring const & name);
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       bool metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo &, int x, int y) const;
        ///
-       int width() const { return width_; }
+       int kerning() const { return kerning_; }
 
        ///
        bool isRelOp() const;
+       ///
+       bool isOrdAlpha() const;
        /// do we take scripts?
        bool isScriptable() const;
        /// do we take \limits or \nolimits?
@@ -44,7 +50,7 @@ public:
        /// identifies SymbolInset as such
        InsetMathSymbol const * asSymbolInset() const { return this; }
        /// the LaTeX name of the symbol (without the backslash)
-       std::string name() const;
+       docstring name() const;
        /// request "external features"
        void validate(LaTeXFeatures & features) const;
 
@@ -57,23 +63,26 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       void mathmlize(MathMLStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///
        void write(WriteStream & os) const;
        ///
-       void infoize2(std::ostream & os) const;
+       void infoize2(odocstream & os) const;
 
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual std::auto_ptr<Inset> doClone() const;
        ///
        latexkeys const * sym_;
        ///
        mutable int h_;
-       /// cached width
-       mutable int width_;
+       /// cached superscript kerning
+       mutable int kerning_;
        ///
        mutable bool scriptable_;
 };
+
+} // namespace lyx
+
 #endif