11 /// Standard Sizes (mode styles)
25 // This is the part common to MetricsInfo and PainterInfo
31 MetricsBase(BufferView * bv, LyXFont const & font, int textwidth);
37 /// current math style (display/text/script/..)
39 /// name of current font
49 // This contains a Metricsbase and Information that's only relevant during
50 // the first phase of the two-phase draw
56 MetricsInfo(BufferView * bv, LyXFont const & font, int textwidth);
64 // This contains a Metricsbase and Information that's only relevant during
65 // the second phase of the two-phase draw
69 explicit PainterInfo(BufferView * bv);
71 void draw(int x, int y, char c);
77 /// width of current item
82 struct TextMetricsInfo {};
85 // Generic base for temporarily changing things.
86 // The original state gets restored when the Changer is destructed.
88 template <class Struct, class Temp = Struct>
91 Changer(Struct & orig) : orig_(orig) {}
101 // temporarily change some aspect of a font
102 struct FontChanger : public Changer<LyXFont> {
104 FontChanger(LyXFont & orig, char const * font);
110 // temporarily change a full font
111 struct FontSetChanger : public Changer<MetricsBase> {
113 FontSetChanger(MetricsBase & mb, char const * font);
119 // temporarily change the style
120 struct StyleChanger : public Changer<MetricsBase> {
122 StyleChanger(MetricsBase & mb, Styles style);
128 // temporarily change the style to script style
129 struct ScriptChanger : public StyleChanger {
131 ScriptChanger(MetricsBase & mb);
135 // temporarily change the style suitable for use in fractions
136 struct FracChanger : public StyleChanger {
138 FracChanger(MetricsBase & mb);
142 // temporarily change the style suitable for use in tabulars and arrays
143 struct ArrayChanger : public StyleChanger {
145 ArrayChanger(MetricsBase & mb);
150 // temporarily change the shape of a font
151 struct ShapeChanger : public Changer<LyXFont, LyXFont::FONT_SHAPE> {
153 ShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape);
159 // temporarily change the available text width
160 struct WidthChanger : public Changer<MetricsBase>
163 WidthChanger(MetricsBase & mb, int width);