1 #ifndef MATH_METRICSINFO_H
2 #define MATH_METRICSINFO_H
14 /// Standard Math Sizes (Math mode styles)
27 struct MathMetricsBase {
44 struct MathMetricsInfo {
55 struct MathPainterInfo {
57 MathPainterInfo(Painter & pain);
59 void draw(int x, int y, char c);
68 struct TextMetricsInfo {};
71 // Generic base for temporarily changing things.
72 // The original state gets restored when the Changer is destructed
73 template <class Struct, class Temp = Struct>
76 MathChanger(Struct & orig) : orig_(orig) {}
86 struct MathFontChanger : public MathChanger<LyXFont> {
88 MathFontChanger(LyXFont & orig, char const * font);
94 struct MathFontSetChanger : public MathChanger<MathMetricsBase> {
96 MathFontSetChanger(MathMetricsBase & mb, char const * font);
98 ~MathFontSetChanger();
102 struct MathStyleChanger : public MathChanger<MathMetricsBase> {
104 MathStyleChanger(MathMetricsBase & mb, MathStyles shape);
110 struct MathScriptChanger : public MathStyleChanger {
112 MathScriptChanger(MathMetricsBase & mb);
116 struct MathFracChanger : public MathStyleChanger {
118 MathFracChanger(MathMetricsBase & mb);
122 struct MathShapeChanger : public MathChanger<LyXFont, LyXFont::FONT_SHAPE> {
124 MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
130 struct MathWidthChanger : public MathChanger<MathMetricsBase>
133 MathWidthChanger(MathMetricsBase & mb, int width);