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.
20 #include "support/types.h"
32 class ParagraphMetrics;
37 namespace frontend { class Painter; }
40 * FIXME: Re-implement row painting using row elements.
42 * This is not difficult in principle, but the code is intricate and
43 * needs some careful analysis. The first thing that needs to be done
44 * is to break row elements with the same criteria. Currently breakRow
45 * does not consider on-the-fly spell-checking, but it is not clear to
46 * me that it is required. Moreover, this thing would only work if we
47 * are sure that the Row object is up-to-date when drawing happens.
48 * This depends on the update machinery.
50 * This would allow to get rid of the Bidi class.
55 * A class used for painting an individual row of text.
56 * FIXME: get rid of that class.
60 /// initialise and run painter
61 RowPainter(PainterInfo & pi, Text const & text,
62 pit_type pit, Row const & row, int x, int y);
64 /// paint various parts
65 /// FIXME: transfer to TextMetrics
66 void paintAppendix() const;
67 void paintDepthBar() const;
68 void paintChangeBar() const;
69 void paintTooLargeMarks(bool const left, bool const right) const;
70 void paintFirst() const;
74 void paintOnlyInsets();
75 void paintSelection() const;
78 void paintSeparator(double width, Font const & font);
79 void paintForeignMark(double orig_x, Language const * lang, int desc = 0) const;
80 void paintStringAndSel(docstring const & str, Font const & font,
81 Change const & change,
82 pos_type start_pos, pos_type end_pos);
83 void paintMisspelledMark(double orig_x,
84 docstring const & str, Font const & font,
85 pos_type pos, bool changed) const;
86 void paintChange(double orig_x , Font const & font, Change const & change) const;
87 int paintAppendixStart(int y) const;
88 void paintFromPos(pos_type & vpos, bool changed);
89 void paintInset(Inset const * inset, pos_type const pos);
90 void paintInlineCompletion(Font const & font);
92 /// return left margin
93 int leftMargin() const;
95 /// return the label font for this row
96 FontInfo labelFont() const;
99 void paintLabel() const;
101 void paintTopLevelLabel() const;
104 /// contains painting related information.
109 TextMetrics const & text_metrics_;
110 ParagraphList const & pars_;
117 Paragraph const & par_;
118 ParagraphMetrics const & pm_;
123 /// row changed? (change tracking)
124 Change const change_;
128 int const yo_; // current baseline
131 int solid_line_thickness_;
132 int solid_line_offset_;
133 int dotted_line_thickness_;
134 int dotted_line_offset_;
139 #endif // ROWPAINTER_H