4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS
20 #include "support/types.h"
30 * A class used for painting an individual row of text.
34 /// initialise painter
35 RowPainter(BufferView const & bv, LyXText const & text, RowList::iterator rit);
38 void paint(int y_offset, int x_offset, int y);
41 // paint various parts
42 void paintBackground();
43 void paintSelection();
46 void paintChangeBar();
49 void paintForeignMark(float const orig_x, LyXFont const & orig_font);
50 void paintHebrewComposeChar(lyx::pos_type & vpos);
51 void paintArabicComposeChar(lyx::pos_type & vpos);
52 void paintChars(lyx::pos_type & vpos, bool hebrew, bool arabic);
53 int paintPageBreak(string const & label, int y);
54 int paintAppendixStart(int y);
55 int paintLengthMarker(string const & prefix, VSpace const & vsp, int start);
57 void paintFromPos(lyx::pos_type & vpos);
58 void paintInset(lyx::pos_type const pos);
60 /// return left margin
61 int leftMargin() const;
63 /// return the font at the given pos
64 LyXFont const getFont(lyx::pos_type pos) const;
66 /// return the label font for this row
67 LyXFont const getLabelFont() const;
69 char const transformChar(char c, lyx::pos_type pos) const;
71 /// return pixel width for the given pos
72 int singleWidth(lyx::pos_type pos) const;
73 int singleWidth(lyx::pos_type pos, char c) const;
75 /// bufferview to paint on
76 BufferView const & bv_;
81 /// LyXText for the row
82 LyXText const & text_;
85 RowList::iterator row_;
88 mutable ParagraphList::iterator pit_;
101 /// return the pixel height of a space marker before/after a par
102 int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp);
104 #endif // ROWPAINTER_H