]> git.lyx.org Git - lyx.git/blob - src/mathed/math_symbolinset.h
mathed uglyfication
[lyx.git] / src / mathed / math_symbolinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_symbolinset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_SYMBOLINSET_H
13 #define MATH_SYMBOLINSET_H
14
15 #include "math_inset.h"
16
17 struct latexkeys;
18
19
20 /** "normal" symbols that don't take limits and don't grow in displayed
21  *  formulae.
22  */
23 class MathSymbolInset : public MathInset {
24 public:
25         ///
26         explicit MathSymbolInset(latexkeys const * l);
27         ///
28         explicit MathSymbolInset(char const * name);
29         ///
30         explicit MathSymbolInset(std::string const & name);
31         ///
32         virtual std::auto_ptr<InsetBase> clone() const;
33         ///
34         void metrics(MetricsInfo & mi, Dimension & dim) const;
35         ///
36         void draw(PainterInfo &, int x, int y) const;
37         ///
38         bool isRelOp() const;
39         /// do we take scripts?
40         bool isScriptable() const;
41         /// do we take \limits or \nolimits?
42         bool takesLimits() const;
43         /// identifies SymbolInset as such
44         MathSymbolInset const * asSymbolInset() const { return this; }
45         /// the LaTeX name of the symbol (without the backslash)
46         std::string name() const;
47         /// request "external features"
48         void validate(LaTeXFeatures & features) const;
49
50         ///
51         void normalize(NormalStream &) const;
52         ///
53         void maple(MapleStream &) const;
54         ///
55         void maxima(MaximaStream &) const;
56         ///
57         void mathematica(MathematicaStream &) const;
58         ///
59         void mathmlize(MathMLStream &) const;
60         ///
61         void octave(OctaveStream &) const;
62         ///
63         void write(WriteStream & os) const;
64         ///
65         void infoize2(std::ostream & os) const;
66
67 private:
68         ///
69         latexkeys const * sym_;
70         ///
71         mutable int h_;
72         ///
73         mutable bool scriptable_;
74 };
75 #endif