4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
11 * Full author contact details are available in file CREDITS.
19 #include "support/types.h"
32 class ParagraphMetrics;
37 namespace frontend { class Painter; }
40 * A class used for painting an individual row of text.
41 * FIXME: get rid of that class.
45 /// initialise and run painter
46 RowPainter(PainterInfo & pi, Text const & text,
47 pit_type pit, Row const & row, Bidi & bidi, int x, int y);
49 /// paint various parts
50 /// FIXME: transfer to TextMetrics
53 void paintChangeBar();
57 void paintOnlyInsets();
58 void paintSelection();
61 void paintSeparator(double orig_x, double width, FontInfo const & font);
62 void paintForeignMark(double orig_x, Language const * lang, int desc = 0);
63 void paintMisspelledMark(double orig_x, bool changed);
64 void paintHebrewComposeChar(pos_type & vpos, FontInfo const & font);
65 void paintArabicComposeChar(pos_type & vpos, FontInfo const & font);
66 void paintChars(pos_type & vpos, FontInfo const & font,
67 bool hebrew, bool arabic);
68 int paintAppendixStart(int y);
69 void paintFromPos(pos_type & vpos, bool changed);
70 void paintInset(Inset const * inset, pos_type const pos);
71 void paintInlineCompletion(Font const & font);
73 /// return left margin
74 int leftMargin() const;
76 /// return the label font for this row
77 FontInfo labelFont() const;
82 void paintTopLevelLabel();
85 /// contains painting related information.
90 TextMetrics & text_metrics_;
91 ParagraphList const & pars_;
98 Paragraph const & par_;
99 ParagraphMetrics const & pm_;
101 /// bidi cache, comes from outside the rowpainter because
102 /// rowpainters are normally created in a for loop and there only
103 /// one of them is active at a time.
106 /// row changed? (change tracking)
107 Change const change_;
111 int const yo_; // current baseline
114 float solid_line_thickness_;
115 int solid_line_offset_;
116 float dotted_line_thickness_;
117 int dotted_line_offset_;
122 #endif // ROWPAINTER_H