]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_symbolinset.h
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_symbolinset.h
index 4f7db6d9557e1efca55ba1cdf8fc53d6f0c721af..0427e4e7d3d39ab9a73f8ca5cc9786c0bc7587e4 100644 (file)
@@ -2,57 +2,66 @@
 #ifndef MATH_SYMBOLINSET_H
 #define MATH_SYMBOLINSET_H
 
-#include "math_diminset.h"
+#include "math_inset.h"
 
 struct latexkeys;
 
+
 // "normal" symbols that don't take limits and don't grow in displayed
 // formulae
 
-class MathSymbolInset : public MathDimInset {
+class MathSymbolInset : public MathInset {
 public:
        ///
-       explicit MathSymbolInset(latexkeys const *);
+       explicit MathSymbolInset(latexkeys const * l);
        ///
-       explicit MathSymbolInset(char const *);
+       explicit MathSymbolInset(char const * name);
        ///
-       MathInset * clone() const;
+       explicit MathSymbolInset(string const & name);
        ///
-       void metrics(MathMetricsInfo const & st) const;
+       virtual std::auto_ptr<InsetBase> clone() const;
        ///
-       void draw(Painter &, int x, int y) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
-       bool isRelOp() const;
+       void draw(PainterInfo &, int x, int y) const;
        ///
+       bool isRelOp() const;
+       /// do we take scripts?
        bool isScriptable() const;
-       /// identifies things that can get \limits or \nolimits
+       /// do we take \limits or \nolimits?
        bool takesLimits() const;
+       /// identifies SymbolInset as such
+       MathSymbolInset const * asSymbolInset() const { return this; }
+       /// the LaTeX name of the symbol (without the backslash)
+       string name() const;
        ///
-       MathSymbolInset * asSymbolInset() { return this; }
+       bool match(MathAtom const &) const;
+       /// request "external features"
+       void validate(LaTeXFeatures & features) const;
 
        ///
        void normalize(NormalStream &) const;
        ///
-       void maplize(MapleStream &) const;
+       void maple(MapleStream &) const;
        ///
-       void mathmlize(MathMLStream &) const;
+       void maxima(MaximaStream &) const;
        ///
-       void octavize(OctaveStream &) const;
+       void mathematica(MathematicaStream &) const;
        ///
-       void write(WriteStream & os) const;
+       void mathmlize(MathMLStream &) const;
        ///
-       string name() const;
-private:
+       void octave(OctaveStream &) const;
        ///
-       MathTextCodes code() const;
+       void write(WriteStream & os) const;
        ///
-       MathTextCodes code2() const;
+       void infoize2(std::ostream & os) const;
 
+private:
        ///
        latexkeys const * sym_;
        ///
        mutable int h_;
        ///
-       mutable MathMetricsInfo mi_;
+       mutable bool scriptable_;
 };
 #endif