Give inset codes to all the math insets, so we get more information when
[lyx.git] / src / mathed / InsetMathNumber.h
bloba6ca9dae297f60c19edbd0d21698811da34cdcf9
1 // -*- C++ -*-
2 /**
3 * \file InsetMathNumber.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_NUMBERINSET_H
13 #define MATH_NUMBERINSET_H
15 #include "InsetMath.h"
17 #include "support/docstring.h"
20 namespace lyx {
22 /** Some inset that "is" a number mainly for math-extern
24 class InsetMathNumber : public InsetMath {
25 public:
26 ///
27 explicit InsetMathNumber(docstring const & s);
28 ///
29 void metrics(MetricsInfo & mi, Dimension & dim) const;
30 ///
31 void draw(PainterInfo &, int x, int y) const;
32 ///
33 docstring str() const { return str_; }
34 ///
35 InsetMathNumber * asNumberInset() { return this; }
37 ///
38 void normalize(NormalStream &) const;
39 ///
40 void octave(OctaveStream &) const;
41 ///
42 void maple(MapleStream &) const;
43 ///
44 void mathematica(MathematicaStream &) const;
45 ///
46 void mathmlize(MathStream &) const;
47 ///
48 void write(WriteStream & os) const;
49 ///
50 InsetCode lyxCode() const { return MATH_NUMBER_CODE; }
52 private:
53 virtual Inset * clone() const;
54 /// the number as string
55 docstring str_;
59 } // namespace lyx
61 #endif