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