]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fontinset.h
mathed uglyfication
[lyx.git] / src / mathed / math_fontinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_fontinset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_FONTINSET_H
13 #define MATH_FONTINSET_H
14
15 #include "math_nestinset.h"
16
17
18 class latexkeys;
19
20 /// Inset for font changes
21 class MathFontInset : public MathNestInset {
22 public:
23         ///
24         explicit MathFontInset(latexkeys const * key);
25         ///
26         virtual std::auto_ptr<InsetBase> clone() const;
27         ///
28         MathFontInset * asFontInset() { return this; }
29         ///
30         MathFontInset const * asFontInset() const { return this; }
31         /// are we in math mode, text mode, or unsure?
32         mode_type currentMode() const;
33         ///
34         std::string name() const;
35         ///
36         void metrics(MetricsInfo & mi, Dimension & dim) const;
37         ///
38         void draw(PainterInfo & pi, int x, int y) const;
39         ///
40         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
41         ///
42         void drawT(TextPainter & pi, int x, int y) const;
43         ///
44         void validate(LaTeXFeatures & features) const;
45         ///
46         void infoize(std::ostream & os) const;
47
48 private:
49         /// the font to be used on screen
50         latexkeys const * key_;
51 };
52 #endif