]> git.lyx.org Git - lyx.git/blob - src/mathed/math_symbolinset.h
fix #1073
[lyx.git] / src / mathed / math_symbolinset.h
1 // -*- C++ -*-
2 #ifndef MATH_SYMBOLINSET_H
3 #define MATH_SYMBOLINSET_H
4
5
6 #include "math_diminset.h"
7
8 struct latexkeys;
9
10 // "normal" symbols that don't take limits and don't grow in displayed
11 // formulae
12
13 class MathSymbolInset : public MathDimInset {
14 public:
15         ///
16         explicit MathSymbolInset(latexkeys const *);
17         ///
18         explicit MathSymbolInset(char const *);
19         ///
20         explicit MathSymbolInset(string const &);
21         ///
22         MathInset * clone() const;
23         ///
24         void metrics(MetricsInfo & st) const;
25         ///
26         void draw(PainterInfo &, int x, int y) const;
27         ///
28         bool isRelOp() const;
29         /// do we take scripts?
30         bool isScriptable() const;
31         /// do we take \limits or \nolimits?
32         bool takesLimits() const;
33         /// identifies SymbolInset as such
34         MathSymbolInset const * asSymbolInset() const { return this; }
35         /// the LaTeX name of the symbol (without the backslash)
36         string name() const;
37         ///
38         bool match(MathAtom const &) const;
39         /// request "external features"
40         void validate(LaTeXFeatures & features) const;
41
42         ///
43         void normalize(NormalStream &) const;
44         ///
45         void maple(MapleStream &) const;
46         ///
47         void maxima(MaximaStream &) const;
48         ///
49         void mathematica(MathematicaStream &) const;
50         ///
51         void mathmlize(MathMLStream &) const;
52         ///
53         void octave(OctaveStream &) const;
54         ///
55         void write(WriteStream & os) const;
56         ///
57         void infoize2(std::ostream & os) const;
58
59 private:
60         ///
61         latexkeys const * sym_;
62         ///
63         mutable int h_;
64         ///
65         mutable bool scriptable_;
66 };
67 #endif