]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fontinset.h
enable insertion of spaces in all \textxxx modes.
[lyx.git] / src / mathed / math_fontinset.h
1 // -*- C++ -*-
2 #ifndef MATH_FONTINSET_H
3 #define MATH_FONTINSET_H
4
5 #include "math_nestinset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** Inset for font changes
12     \author André Pönitz
13  */
14
15 class latexkeys;
16
17 class MathFontInset : public MathNestInset {
18 public:
19         ///
20         explicit MathFontInset(latexkeys const * key);
21         ///
22         MathInset * clone() const;
23         /// are we in math mode, text mode, or unsure?
24         mode_type currentMode() const;
25         ///
26         void metrics(MathMetricsInfo & mi) const;
27         ///
28         void draw(MathPainterInfo & pi, int x, int y) const;
29         ///
30         void metricsT(TextMetricsInfo const & mi) const;
31         ///
32         void drawT(TextPainter & pi, int x, int y) const;
33         ///
34         void write(WriteStream & os) const;
35         ///
36         void normalize(NormalStream &) const;
37         ///
38         void validate(LaTeXFeatures & features) 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