1 #ifndef MATH_METRICSINFO_H
2 #define MATH_METRICSINFO_H
11 /// Standard Math Sizes (Math mode styles)
24 struct MathMetricsBase {
41 struct MathMetricsInfo {
52 struct MathPainterInfo {
54 MathPainterInfo(Painter & pain);
56 void draw(int x, int y, char c);
65 struct TextMetricsInfo {};
68 // Generic base for temporarily changing things.
69 // The original state gets restored when the Changer is destructed.
71 template <class Struct, class Temp = Struct>
74 MathChanger(Struct & orig) : orig_(orig) {}
84 struct MathFontChanger : public MathChanger<LyXFont> {
86 MathFontChanger(LyXFont & orig, char const * font);
92 struct MathFontSetChanger : public MathChanger<MathMetricsBase> {
94 MathFontSetChanger(MathMetricsBase & mb, char const * font);
96 ~MathFontSetChanger();
100 struct MathStyleChanger : public MathChanger<MathMetricsBase> {
102 MathStyleChanger(MathMetricsBase & mb, MathStyles shape);
108 struct MathScriptChanger : public MathStyleChanger {
110 MathScriptChanger(MathMetricsBase & mb);
114 struct MathFracChanger : public MathStyleChanger {
116 MathFracChanger(MathMetricsBase & mb);
120 struct MathArrayChanger : public MathStyleChanger {
122 MathArrayChanger(MathMetricsBase & mb);
127 struct MathShapeChanger : public MathChanger<LyXFont, LyXFont::FONT_SHAPE> {
129 MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
135 struct MathWidthChanger : public MathChanger<MathMetricsBase>
138 MathWidthChanger(MathMetricsBase & mb, int width);