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.
74 template <class Struct, class Temp = Struct>
77 MathChanger(Struct & orig) : orig_(orig) {}
87 struct MathFontChanger : public MathChanger<LyXFont> {
89 MathFontChanger(LyXFont & orig, char const * font);
95 struct MathFontSetChanger : public MathChanger<MathMetricsBase> {
97 MathFontSetChanger(MathMetricsBase & mb, char const * font);
99 ~MathFontSetChanger();
103 struct MathStyleChanger : public MathChanger<MathMetricsBase> {
105 MathStyleChanger(MathMetricsBase & mb, MathStyles shape);
111 struct MathScriptChanger : public MathStyleChanger {
113 MathScriptChanger(MathMetricsBase & mb);
117 struct MathFracChanger : public MathStyleChanger {
119 MathFracChanger(MathMetricsBase & mb);
123 struct MathArrayChanger : public MathStyleChanger {
125 MathArrayChanger(MathMetricsBase & mb);
130 struct MathShapeChanger : public MathChanger<LyXFont, LyXFont::FONT_SHAPE> {
132 MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
138 struct MathWidthChanger : public MathChanger<MathMetricsBase>
141 MathWidthChanger(MathMetricsBase & mb, int width);