]> git.lyx.org Git - lyx.git/blob - src/mathed/math_stringinset.h
1a63f7c7721ffac77be71d32187c4ec2c79115b3
[lyx.git] / src / mathed / math_stringinset.h
1 // -*- C++ -*-
2 #ifndef MATH_STRINGINSET_H
3 #define MATH_STRINGINSET_H
4
5 #include "math_inset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** Some cllection of chars with similar properties
12     \author André Pönitz
13  */
14
15 class MathStringInset : public MathInset {
16 public:
17         ///
18         MathStringInset(string const & s, MathTextCodes t = LM_TC_TEXTRM);
19         ///
20         MathInset * clone() const;
21         ///
22         void metrics(MathMetricsInfo const & st) const;
23         ///
24         void draw(Painter &, int x, int y) const;
25         /// 
26         int ascent() const;
27         ///
28         int descent() const;
29         ///
30         int width() const;
31         ///
32         string str() const { return str_; }
33         ///
34         MathStringInset * asStringInset() { return this; }
35
36         ///
37         void normalize(NormalStream &) const;
38         ///
39         void octavize(OctaveStream &) const;
40         ///
41         void maplize(MapleStream &) const;
42         ///
43         void mathmlize(MathMLStream &) const;
44         ///
45         void write(WriteStream & os) const;
46
47 private:
48         /// the string
49         string str_;
50         /// the font to be used on screen
51         MathTextCodes code_;
52         ///
53         mutable MathMetricsInfo mi_;
54 };
55 #endif