]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fontoldinset.h
enable insertion of spaces in all \textxxx modes.
[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
15 class latexkeys;
16
17 class MathFontOldInset : public MathNestInset {
18 public:
19         ///
20         explicit MathFontOldInset(latexkeys const * key);
21         ///
22         MathInset * clone() const;
23         /// we are in text mode.
24         mode_type currentMode() const { return TEXT_MODE; }
25         /// we write extra braces in any case...
26         bool extraBraces() const { return true; }
27         ///
28         void metrics(MathMetricsInfo & mi) const;
29         ///
30         void draw(MathPainterInfo & pi, int x, int y) const;
31         ///
32         void metricsT(TextMetricsInfo const & mi) const;
33         ///
34         void drawT(TextPainter & pi, int x, int y) const;
35         ///
36         void write(WriteStream & os) const;
37         ///
38         void normalize(NormalStream &) const;
39         ///
40         void infoize(std::ostream & os) const;
41
42 private:
43         /// the font to be used on screen
44         latexkeys const * key_;
45 };
46 #endif