]> git.lyx.org Git - lyx.git/blob - src/mathed/math_stringinset.h
write \mathrm{x}\mathrm{y} as \mathrm{xy} again
[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);
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         void write(MathWriteInfo & os) const;
27         ///
28         void writeNormal(std::ostream &) const;
29         /// 
30         int ascent() const;
31         ///
32         int descent() const;
33         ///
34         int width() const;
35         ///
36         string & str();
37
38 private:
39         /// the string
40         string str_;
41         /// the font to be used on screen
42         MathTextCodes code_;
43         ///
44         mutable MathMetricsInfo mi_;
45 };
46 #endif