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.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_FONTINSET_H
13 #define MATH_FONTINSET_H
15 #include "math_nestinset.h"
20 /// Inset for font changes
21 class MathFontInset : public MathNestInset {
24 explicit MathFontInset(latexkeys const * key);
26 virtual std::auto_ptr<InsetBase> clone() const;
28 MathFontInset * asFontInset() { return this; }
30 MathFontInset const * asFontInset() const { return this; }
31 /// are we in math mode, text mode, or unsure?
32 mode_type currentMode() const;
34 std::string name() const;
36 void metrics(MetricsInfo & mi, Dimension & dim) const;
38 void draw(PainterInfo & pi, int x, int y) const;
40 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
42 void drawT(TextPainter & pi, int x, int y) const;
44 void validate(LaTeXFeatures & features) const;
46 void infoize(std::ostream & os) const;
49 /// the font to be used on screen
50 latexkeys const * key_;