+class Paragraph;
+class ParagraphList;
+class ParagraphMetrics;
+class Row;
+class Text;
+class TextMetrics;
+
+namespace frontend { class Painter; }
+
+/**
+ * A class used for painting an individual row of text.
+ * FIXME: get rid of that class.
+ */
+class RowPainter {
+public:
+ /// initialise and run painter
+ RowPainter(PainterInfo & pi, Text const & text,
+ pit_type pit, Row const & row, Bidi & bidi, int x, int y);
+
+ /// paint various parts
+ /// FIXME: transfer to TextMetrics
+ void paintAppendix();
+ void paintDepthBar();
+ void paintChangeBar();
+ void paintFirst();
+ void paintLast();
+ void paintText();
+ void paintOnlyInsets();
+
+private:
+ void paintForeignMark(double orig_x, Language const * lang, int desc = 0);
+ void paintMisspelledMark(double orig_x, int desc);
+ void paintHebrewComposeChar(pos_type & vpos, FontInfo const & font);
+ void paintArabicComposeChar(pos_type & vpos, FontInfo const & font);
+ void paintChars(pos_type & vpos, FontInfo const & font,
+ bool hebrew, bool arabic);
+ int paintAppendixStart(int y);
+ void paintFromPos(pos_type & vpos);
+ void paintInset(Inset const * inset, pos_type const pos);
+ void paintInlineCompletion(Font const & font);
+
+ /// return left margin
+ int leftMargin() const;
+
+ /// return the label font for this row
+ FontInfo labelFont() const;
+
+ /// contains painting related information.
+ PainterInfo & pi_;