]> git.lyx.org Git - lyx.git/blob - src/mathed/math_stringinset.h
infrastructure for requiring "amssymb".
[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();
19         ///
20         MathStringInset(string const & s, MathTextCodes t = LM_TC_TEXTRM);
21         ///
22         MathInset * clone() const;
23         ///
24         void metrics(MathMetricsInfo const & st) const;
25         ///
26         void draw(Painter &, int x, int y) const;
27         /// 
28         int ascent() const;
29         ///
30         int descent() const;
31         ///
32         int width() const;
33         ///
34         string str() const { return str_; }
35         ///
36         MathStringInset * asStringInset() { return this; }
37         /// request "external features"
38         void validate(LaTeXFeatures & features) const;
39
40         ///
41         void normalize(NormalStream &) const;
42         ///
43         void octavize(OctaveStream &) const;
44         ///
45         void maplize(MapleStream &) const;
46         ///
47         void mathmlize(MathMLStream &) const;
48         ///
49         void write(WriteStream & os) const;
50
51 public:
52         /// the string
53         string str_;
54         /// the font to be used on screen
55         MathTextCodes code_;
56         ///
57         mutable MathMetricsInfo mi_;
58 };
59 #endif