]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathNumber.h
This commit saves the need to check for lyx::use_gui in a number of places.
[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
18 /** Some inset that "is" a number
19  *  mainly for math-extern
20  */
21 class InsetMathNumber : public InsetMath {
22 public:
23         ///
24         explicit InsetMathNumber(std::string const & s);
25         ///
26         void metrics(MetricsInfo & mi, Dimension & dim) const;
27         ///
28         void draw(PainterInfo &, int x, int y) const;
29         ///
30         std::string str() const { return str_; }
31         ///
32         InsetMathNumber * asNumberInset() { return this; }
33
34         ///
35         void normalize(NormalStream &) const;
36         ///
37         void octave(OctaveStream &) const;
38         ///
39         void maple(MapleStream &) const;
40         ///
41         void mathematica(MathematicaStream &) const;
42         ///
43         void mathmlize(MathMLStream &) const;
44         ///
45         void write(WriteStream & os) const;
46
47 private:
48         virtual std::auto_ptr<InsetBase> doClone() const;
49         /// the number as string
50         std::string str_;
51 };
52 #endif