]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fontinset.h
fix #1073
[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
8 /** Inset for font changes
9  *  \author André Pönitz
10  *
11  * Full author contact details are available in file CREDITS
12  */
13
14 class latexkeys;
15
16 class MathFontInset : public MathNestInset {
17 public:
18         ///
19         explicit MathFontInset(latexkeys const * key);
20         ///
21         MathInset * clone() const;
22         ///
23         MathFontInset * asFontInset() { return this; }
24         ///
25         MathFontInset const * asFontInset() const { return this; }
26         /// are we in math mode, text mode, or unsure?
27         mode_type currentMode() const;
28         ///
29         string name() const;
30         ///
31         void metrics(MetricsInfo & mi) const;
32         ///
33         void draw(PainterInfo & pi, int x, int y) const;
34         ///
35         void metricsT(TextMetricsInfo const & mi) const;
36         ///
37         void drawT(TextPainter & pi, int x, int y) const;
38         ///
39         void validate(LaTeXFeatures & features) const;
40         ///
41         void infoize(std::ostream & os) const;
42
43 private:
44         /// the font to be used on screen
45         latexkeys const * key_;
46 };
47 #endif