11 /// Standard Sizes (mode styles)
25 // This is the part common to MetricsInfo and PainterInfo
45 // This contains a Metricsbase and Information that's only relevant during
46 // the first phase of the two-phase draw
60 // This contains a Metricsbase and Information that's only relevant during
61 // the second phase of the two-phase draw
65 PainterInfo(Painter & pain);
67 void draw(int x, int y, char c);
76 struct TextMetricsInfo {};
79 // Generic base for temporarily changing things.
80 // The original state gets restored when the Changer is destructed.
82 template <class Struct, class Temp = Struct>
85 Changer(Struct & orig) : orig_(orig) {}
95 // temporarily change some aspect of a font
96 struct FontChanger : public Changer<LyXFont> {
98 FontChanger(LyXFont & orig, char const * font);
104 // temporarily change a full font
105 struct FontSetChanger : public Changer<MetricsBase> {
107 FontSetChanger(MetricsBase & mb, char const * font);
113 // temporarily change the style
114 struct StyleChanger : public Changer<MetricsBase> {
116 StyleChanger(MetricsBase & mb, Styles style);
122 // temporarily change the style to script style
123 struct ScriptChanger : public StyleChanger {
125 ScriptChanger(MetricsBase & mb);
129 // temporarily change the style suitable for use in fractions
130 struct FracChanger : public StyleChanger {
132 FracChanger(MetricsBase & mb);
136 // temporarily change the style suitable for use in tabulars and arrays
137 struct ArrayChanger : public StyleChanger {
139 ArrayChanger(MetricsBase & mb);
144 // temporarily change the shape of a font
145 struct ShapeChanger : public Changer<LyXFont, LyXFont::FONT_SHAPE> {
147 ShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
153 // temporarily change the available text width
154 struct WidthChanger : public Changer<MetricsBase>
157 WidthChanger(MetricsBase & mb, int width);