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
This commit is contained in:
Lars Gullik Bjønnes 2006-07-03 22:54:30 +00:00
parent b1a87cc778
commit ee1871ef71
5 changed files with 3 additions and 26 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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_;

View File

@ -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();

View File

@ -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();