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 MathFontInset * asFontInset() { return this; }
28 MathFontInset const * asFontInset() const { return this; }
29 /// are we in math mode, text mode, or unsure?
30 mode_type currentMode() const;
32 std::string name() const;
34 void metrics(MetricsInfo & mi, Dimension & dim) const;
36 void draw(PainterInfo & pi, int x, int y) const;
38 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
40 void drawT(TextPainter & pi, int x, int y) const;
42 void validate(LaTeXFeatures & features) const;
44 void infoize(std::ostream & os) const;
47 virtual std::auto_ptr<InsetBase> doClone() const;
48 /// the font to be used on screen
49 latexkeys const * key_;