From ee1871ef714a0c2a85127375ccd0488b831a9d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 3 Jul 2006 22:54:30 +0000 Subject: [PATCH] Partially extracted from r14281 from the younes branch. * BufferView, BufferView::Pimpl: - painter(): remove method * rowpainter.C: - paintText(): get painter through LyXView and WorkArea git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14330 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 6 ------ src/BufferView.h | 9 --------- src/BufferView_pimpl.C | 7 ------- src/BufferView_pimpl.h | 3 --- src/rowpainter.C | 4 +++- 5 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/BufferView.C b/src/BufferView.C index 677abdad0a..bedd197e57 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -90,12 +90,6 @@ LyXView * BufferView::owner() const } -lyx::frontend::Painter & BufferView::painter() const -{ - return pimpl_->painter(); -} - - void BufferView::setBuffer(Buffer * b) { pimpl_->setBuffer(b); diff --git a/src/BufferView.h b/src/BufferView.h index 375683de7c..ec48a0ffcc 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -35,12 +35,6 @@ class LyXText; class LyXView; class ParIterator; -namespace lyx { -namespace frontend { -class Painter; -} -} - namespace Update { enum flags { FitCursor = 1, @@ -102,9 +96,6 @@ public: /// return the buffer being viewed Buffer * buffer() const; - /// return the painter object for drawing onto the view - lyx::frontend::Painter & painter() const; - /// return the owning main view LyXView * owner() const; diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 7fd68c85cd..673332de9b 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -64,7 +64,6 @@ #include "frontends/font_metrics.h" #include "frontends/Gui.h" #include "frontends/LyXView.h" -#include "frontends/Painter.h" #include "frontends/WorkArea.h" #include "graphics/Previews.h" @@ -319,12 +318,6 @@ lyx::frontend::Gui & BufferView::Pimpl::gui() const } -lyx::frontend::Painter & BufferView::Pimpl::painter() const -{ - return owner_->workArea()->getPainter(); -} - - int BufferView::Pimpl::width() const { return width_; diff --git a/src/BufferView_pimpl.h b/src/BufferView_pimpl.h index 6359c26ed3..7bf4d2cef6 100644 --- a/src/BufferView_pimpl.h +++ b/src/BufferView_pimpl.h @@ -39,7 +39,6 @@ class ViewMetricsInfo; namespace lyx { namespace frontend { class Gui; -class Painter; } } @@ -50,8 +49,6 @@ public: /// Pimpl(BufferView & bv, LyXView * owner); /// - lyx::frontend::Painter & painter() const; - /// void setBuffer(Buffer * buf); /// void resizeCurrentBuffer(); diff --git a/src/rowpainter.C b/src/rowpainter.C index b04ca0f7e1..498d1c982f 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -34,6 +34,8 @@ #include "frontends/font_metrics.h" #include "frontends/nullpainter.h" +#include "frontends/LyXView.h" +#include "frontends/WorkArea.h" #include "frontends/Painter.h" #include "insets/insettext.h" @@ -879,7 +881,7 @@ void paintPar void paintText(BufferView const & bv, ViewMetricsInfo const & vi) { - Painter & pain = bv.painter(); + Painter & pain = bv.owner()->workArea()->getPainter(); LyXText * const text = bv.text(); bool const select = bv.cursor().selection();