A bit more re-organization.
[lyx.git] / src / mathed / InsetMathSymbol.h
blob5382f72e85712f3fe7ed510465eefdd683070165
1 // -*- C++ -*-
2 /**
3 * \file InsetMathSymbol.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author André Pönitz
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_SYMBOLINSET_H
13 #define MATH_SYMBOLINSET_H
15 #include "InsetMath.h"
17 namespace lyx {
19 class latexkeys;
22 /** "normal" symbols that don't take limits and don't grow in displayed
23 * formulae.
25 class InsetMathSymbol : public InsetMath {
26 public:
27 ///
28 explicit InsetMathSymbol(latexkeys const * l);
29 ///
30 explicit InsetMathSymbol(char const * name);
31 ///
32 explicit InsetMathSymbol(docstring const & name);
33 ///
34 void metrics(MetricsInfo & mi, Dimension & dim) const;
35 ///
36 void draw(PainterInfo &, int x, int y) const;
37 ///
38 int kerning(BufferView const *) const { return kerning_; }
40 ///
41 bool isRelOp() const;
42 ///
43 bool isOrdAlpha() const;
44 /// do we take scripts?
45 bool isScriptable() const;
46 /// do we take \limits or \nolimits?
47 bool takesLimits() const;
48 /// identifies SymbolInset as such
49 InsetMathSymbol const * asSymbolInset() const { return this; }
50 /// the LaTeX name of the symbol (without the backslash)
51 docstring name() const;
52 /// request "external features"
53 void validate(LaTeXFeatures & features) const;
55 ///
56 void normalize(NormalStream &) const;
57 ///
58 void maple(MapleStream &) const;
59 ///
60 void maxima(MaximaStream &) const;
61 ///
62 void mathematica(MathematicaStream &) const;
63 ///
64 void mathmlize(MathStream &) const;
65 ///
66 void octave(OctaveStream &) const;
67 ///
68 void write(WriteStream & os) const;
69 ///
70 void infoize2(odocstream & os) const;
71 ///
72 InsetCode lyxCode() const { return MATH_SYMBOL_CODE; }
74 private:
75 virtual Inset * clone() const;
76 ///
77 latexkeys const * sym_;
78 ///
79 mutable int h_;
80 /// cached superscript kerning
81 mutable int kerning_;
82 ///
83 mutable bool scriptable_;
86 } // namespace lyx
88 #endif