]> git.lyx.org Git - lyx.git/blob - src/mathed/math_symbolinset.h
some work on math-extern
[lyx.git] / src / mathed / math_symbolinset.h
1 // -*- C++ -*-
2 #ifndef MATH_SYMBOLINSET_H
3 #define MATH_SYMBOLINSET_H
4
5 #include "math_diminset.h"
6
7 struct latexkeys;
8
9 // "normal" symbols that don't take limits and don't grow in displayed
10 // formulae
11
12 class MathSymbolInset : public MathDimInset {
13 public:
14         ///
15         explicit MathSymbolInset(latexkeys const *);
16         ///
17         explicit MathSymbolInset(char const *);
18         ///
19         MathInset * clone() const;
20         ///
21         void metrics(MathMetricsInfo const & st) const;
22         ///
23         void draw(Painter &, int x, int y) const;
24         ///
25         bool isRelOp() const;
26         ///
27         bool isScriptable() const;
28         /// identifies things that can get \limits or \nolimits
29         bool takesLimits() const;
30         ///
31         MathSymbolInset * asSymbolInset() { return this; }
32
33         ///
34         void normalize(NormalStream &) const;
35         ///
36         void maplize(MapleStream &) const;
37         ///
38         void mathmlize(MathMLStream &) const;
39         ///
40         void octavize(OctaveStream &) const;
41         ///
42         void write(WriteStream & os) const;
43         ///
44         string name() const;
45 private:
46         ///
47         MathTextCodes code() const;
48         ///
49         MathTextCodes code2() const;
50
51         ///
52         latexkeys const * sym_;
53         ///
54         mutable int h_;
55         ///
56         mutable MathMetricsInfo mi_;
57 };
58 #endif