greyed_out_ = false;
ViewMetricsInfo const & vi = buffer_view_->viewMetricsInfo();
- getPainter().start();
- paintText(*buffer_view_, vi);
+
+ Painter & pain = getPainter();
+
+ pain.start();
+ paintText(*buffer_view_, vi, pain);
lyxerr[Debug::DEBUG] << "Redraw screen" << endl;
int const ymin = std::max(vi.y1, 0);
int const ymax =
( vi.p2 < vi.size - 1 ? vi.y2 : height() );
expose(0, ymin, width(), ymax - ymin);
- getPainter().end();
+ pain.end();
//theCoords.doneUpdating();
buffer_view_->needsRedraw(false);
} // namespace anon
-void paintText(BufferView const & bv, ViewMetricsInfo const & vi)
+void paintText(BufferView const & bv, ViewMetricsInfo const & vi,
+ Painter & pain)
{
- Painter & pain = bv.owner()->workArea()->getPainter();
LyXText * const text = bv.text();
bool const select = bv.cursor().selection();
class PainterInfo;
class ViewMetricsInfo;
+namespace lyx {
+namespace frontend {
+class Painter;
+}
+}
+
/// paint visible paragraph of main text
-void paintText(BufferView const & bv, ViewMetricsInfo const & vi);
+void paintText(BufferView const & bv, ViewMetricsInfo const & vi,
+ lyx::frontend::Painter & pain);
/// paint the rows of a text inset
void paintTextInset(LyXText const & text, PainterInfo & pi, int x, int y);