]> git.lyx.org Git - lyx.git/blob - src/mathed/math_stringinset.h
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_stringinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_stringinset.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 "math_inset.h"
16
17
18 /** Some collection of chars with similar properties
19  *  mainly for math-extern
20  */
21
22 class MathStringInset : public MathInset {
23 public:
24         ///
25         explicit MathStringInset(std::string const & s);
26         ///
27         void metrics(MetricsInfo & mi, Dimension & dim) const;
28         ///
29         void draw(PainterInfo & pi, int x, int y) const;
30         ///
31         std::string str() const { return str_; }
32         ///
33         MathStringInset * asStringInset() { return this; }
34
35         ///
36         void normalize(NormalStream &) const;
37         ///
38         void octave(OctaveStream &) const;
39         ///
40         void maple(MapleStream &) const;
41         ///
42         void mathematica(MathematicaStream &) const;
43         ///
44         void mathmlize(MathMLStream &) const;
45         ///
46         void write(WriteStream & os) const;
47
48 private:
49         virtual std::auto_ptr<InsetBase> doClone() const;
50         /// the string
51         std::string str_;
52 };
53 #endif