]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathNumber.h
g-brief loads babel internally. So don't load it ourselves.
[lyx.git] / src / mathed / InsetMathNumber.h
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.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_NUMBERINSET_H
13 #define MATH_NUMBERINSET_H
14
15 #include "InsetMath.h"
16
17 #include "support/docstring.h"
18
19
20 namespace lyx {
21
22 /** Some inset that "is" a number mainly for math-extern
23  */
24 class InsetMathNumber : public InsetMath {
25 public:
26         ///
27         explicit InsetMathNumber(docstring const & s);
28         ///
29         void metrics(MetricsInfo & mi, Dimension & dim) const override;
30         ///
31         void draw(PainterInfo &, int x, int y) const override;
32         ///
33         docstring str() const { return str_; }
34         ///
35         InsetMathNumber * asNumberInset() { return this; }
36
37         ///
38         void normalize(NormalStream &) const override;
39         ///
40         void octave(OctaveStream &) const override;
41         ///
42         void maple(MapleStream &) const override;
43         ///
44         void mathematica(MathematicaStream &) const override;
45         ///
46         void mathmlize(MathMLStream &) const override;
47         ///
48         void htmlize(HtmlStream &) const override;
49         ///
50         void write(TeXMathStream & os) const override;
51         ///
52         InsetCode lyxCode() const override { return MATH_NUMBER_CODE; }
53
54 private:
55         Inset * clone() const override;
56         /// the number as string
57         docstring str_;
58 };
59
60
61 } // namespace lyx
62
63 #endif