1 #ifndef MATH_METRICSINFO_H
2 #define MATH_METRICSINFO_H
12 /// Standard Math Sizes (Math mode styles)
25 struct MathMetricsBase {
42 struct MathMetricsInfo {
50 /// used to pass some info down
51 MathNestInset const * inset;
59 struct MathPainterInfo {
61 MathPainterInfo(Painter & p);
63 void draw(int x, int y, char c);
72 struct TextMetricsInfo {};
75 // Generic base for temporarily changing things.
76 // The original state gets restored when the Changer is destructed
77 template <class Struct, class Temp = Struct>
80 MathChanger(Struct & orig) : orig_(orig) {}
90 struct MathScriptChanger : public MathChanger<MathMetricsBase> {
92 MathScriptChanger(MathMetricsBase & orig);
98 struct MathFracChanger : public MathChanger<MathMetricsBase> {
100 MathFracChanger(MathMetricsBase & orig);
107 struct MathFontChanger : public MathChanger<LyXFont> {
109 MathFontChanger(LyXFont & orig, char const * font);
115 struct MathFontSetChanger : public MathChanger<MathMetricsBase> {
117 MathFontSetChanger(MathMetricsBase & mb, char const * font);
119 ~MathFontSetChanger();
123 struct MathStyleChanger : public MathChanger<MathMetricsBase> {
125 MathStyleChanger(MathMetricsBase & mb, MathStyles shape);
131 struct MathShapeChanger : public MathChanger<LyXFont, LyXFont::FONT_SHAPE> {
133 MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
139 struct MathWidthChanger : public MathChanger<MathMetricsBase>
142 MathWidthChanger(MathMetricsBase & mb, int width);