]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fontoldinset.h
Fix reading of math macros
[lyx.git] / src / mathed / math_fontoldinset.h
1 // -*- C++ -*-
2 #ifndef MATH_FONTOLDINSET_H
3 #define MATH_FONTOLDINSET_H
4
5 #include "math_nestinset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** Old-style font changes
12  *  \author André Pönitz
13  *
14  * Full author contact details are available in file CREDITS
15  */
16
17 class latexkeys;
18
19 class MathFontOldInset : public MathNestInset {
20 public:
21         ///
22         explicit MathFontOldInset(latexkeys const * key);
23         ///
24         MathInset * clone() const;
25         /// we are in text mode.
26         mode_type currentMode() const { return TEXT_MODE; }
27         /// we write extra braces in any case...
28         bool extraBraces() const { return true; }
29         ///
30         void metrics(MathMetricsInfo & mi) const;
31         ///
32         void draw(MathPainterInfo & pi, int x, int y) const;
33         ///
34         void metricsT(TextMetricsInfo const & mi) const;
35         ///
36         void drawT(TextPainter & pi, int x, int y) const;
37         ///
38         void write(WriteStream & os) const;
39         ///
40         void normalize(NormalStream &) const;
41         ///
42         void infoize(std::ostream & os) const;
43
44 private:
45         /// the font to be used on screen
46         latexkeys const * key_;
47 };
48 #endif