11 /// Standard Sizes (mode styles)
25 // This is the part common to MetricsInfo and PainterInfo
35 /// current math style (display/text/script/..)
37 /// name of current font
47 // This contains a Metricsbase and Information that's only relevant during
48 // 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 explicit PainterInfo(BufferView * bv);
67 void draw(int x, int y, char c);
73 /// width of current item
78 struct TextMetricsInfo {};
81 // Generic base for temporarily changing things.
82 // The original state gets restored when the Changer is destructed.
84 template <class Struct, class Temp = Struct>
87 Changer(Struct & orig) : orig_(orig) {}
97 // temporarily change some aspect of a font
98 struct FontChanger : public Changer<LyXFont> {
100 FontChanger(LyXFont & orig, char const * font);
106 // temporarily change a full font
107 struct FontSetChanger : public Changer<MetricsBase> {
109 FontSetChanger(MetricsBase & mb, char const * font);
115 // temporarily change the style
116 struct StyleChanger : public Changer<MetricsBase> {
118 StyleChanger(MetricsBase & mb, Styles style);
124 // temporarily change the style to script style
125 struct ScriptChanger : public StyleChanger {
127 ScriptChanger(MetricsBase & mb);
131 // temporarily change the style suitable for use in fractions
132 struct FracChanger : public StyleChanger {
134 FracChanger(MetricsBase & mb);
138 // temporarily change the style suitable for use in tabulars and arrays
139 struct ArrayChanger : public StyleChanger {
141 ArrayChanger(MetricsBase & mb);
146 // temporarily change the shape of a font
147 struct ShapeChanger : public Changer<LyXFont, LyXFont::FONT_SHAPE> {
149 ShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
155 // temporarily change the available text width
156 struct WidthChanger : public Changer<MetricsBase>
159 WidthChanger(MetricsBase & mb, int width);