3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
18 #include "support/types.h"
29 * A class used for painting an individual row of text.
33 /// initialise painter
34 RowPainter(BufferView const & bv, LyXText const & text, Row const & row);
36 /// paint the row. Returns true if CHANGED_IN_DRAW (e.g. image was loaded)
37 bool paint(int y_offset, int x_offset, int y, bool cleared = false);
40 // paint various parts
41 bool paintBackground();
42 void paintSelection();
45 void paintChangeBar();
48 void paintForeignMark(float const orig_x, LyXFont const & orig_font);
49 void paintHebrewComposeChar(lyx::pos_type & vpos);
50 void paintArabicComposeChar(lyx::pos_type & vpos);
51 void paintChars(lyx::pos_type & vpos, bool hebrew, bool arabic);
52 int paintPageBreak(string const & label, int y);
53 int paintAppendixStart(int y);
54 int paintLengthMarker(string const & prefix, VSpace const & vsp, int start);
55 /// returns true when CHANGED_IN_DRAW
57 /// returns true when CHANGED_IN_DRAW
58 bool paintFromPos(lyx::pos_type & vpos);
59 /// returns true when CHANGED_IN_DRAW
60 bool paintInset(lyx::pos_type const pos);
62 /// return left margin
63 int leftMargin() const;
65 /// return the font at the given pos
66 LyXFont const getFont(lyx::pos_type pos) const;
68 /// return the label font for this row
69 LyXFont const getLabelFont() const;
71 char const transformChar(char c, lyx::pos_type pos) const;
73 /// return pixel width for the given pos
74 int singleWidth(lyx::pos_type pos) const;
75 int singleWidth(lyx::pos_type pos, char c) const;
77 /// bufferview to paint on
78 BufferView const & bv_;
83 /// LyXText for the row
84 LyXText const & text_;
90 Paragraph const & par_;
104 /// return the pixel height of a space marker before/after a par
105 int getLengthMarkerHeight(BufferView const & bv, VSpace const & vsp);
107 #endif // ROWPAINTER_H