]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathString.h
6e8f41bcfd5e4da2f4b29dc47c89be1cd121b44e
[lyx.git] / src / mathed / InsetMathString.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathString.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_STRINGINSET_H
13 #define MATH_STRINGINSET_H
14
15 #include "InsetMath.h"
16
17
18 namespace lyx {
19
20
21 /** Some collection of chars with similar properties
22  *  mainly for math-extern
23  */
24
25 class InsetMathString : public InsetMath {
26 public:
27         ///
28         explicit InsetMathString(std::string const & s);
29         ///
30         void metrics(MetricsInfo & mi, Dimension & dim) const;
31         ///
32         void draw(PainterInfo & pi, int x, int y) const;
33         ///
34         std::string str() const { return str_; }
35         ///
36         InsetMathString * asStringInset() { return this; }
37         ///
38         InsetMathString const * asStringInset() const { return this; }
39
40         ///
41         void normalize(NormalStream &) const;
42         ///
43         void octave(OctaveStream &) const;
44         ///
45         void maple(MapleStream &) const;
46         ///
47         void mathematica(MathematicaStream &) const;
48         ///
49         void mathmlize(MathMLStream &) const;
50         ///
51         void write(WriteStream & os) const;
52
53 private:
54         virtual std::auto_ptr<InsetBase> doClone() const;
55         /// the string
56         std::string str_;
57 };
58
59
60 } // namespace lyx
61 #endif