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