1 #ifndef MATH_METRICSINFO_H
2 #define MATH_METRICSINFO_H
10 /// Standard Math Sizes (Math mode styles)
23 struct MathMetricsBase {
40 struct MathMetricsInfo {
51 struct MathPainterInfo {
53 MathPainterInfo(Painter & pain);
55 void draw(int x, int y, char c);
64 struct TextMetricsInfo {};
67 // Generic base for temporarily changing things.
68 // The original state gets restored when the Changer is destructed
69 template <class Struct, class Temp = Struct>
72 MathChanger(Struct & orig) : orig_(orig) {}
82 struct MathScriptChanger : public MathChanger<MathMetricsBase> {
84 MathScriptChanger(MathMetricsBase & orig);
90 struct MathFracChanger : public MathChanger<MathMetricsBase> {
92 MathFracChanger(MathMetricsBase & orig);
99 struct MathFontChanger : public MathChanger<LyXFont> {
101 MathFontChanger(LyXFont & orig, char const * font);
107 struct MathFontSetChanger : public MathChanger<MathMetricsBase> {
109 MathFontSetChanger(MathMetricsBase & mb, char const * font);
111 ~MathFontSetChanger();
115 struct MathStyleChanger : public MathChanger<MathMetricsBase> {
117 MathStyleChanger(MathMetricsBase & mb, MathStyles shape);
123 struct MathShapeChanger : public MathChanger<LyXFont, LyXFont::FONT_SHAPE> {
125 MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
131 struct MathWidthChanger : public MathChanger<MathMetricsBase>
134 MathWidthChanger(MathMetricsBase & mb, int width);