Kaydet (Commit) 0ac80267 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

add PostPaint and change PrePaint to include RenderContext param.

Change-Id: I26e03159fa6115025c6cf376e6ce71443bc98cec
üst 822ee8a3
......@@ -93,12 +93,12 @@ void ChartWindow::clear()
this->ReleaseMouse();
}
void ChartWindow::PrePaint()
void ChartWindow::PrePaint(vcl::RenderContext& /*rRenderContext*/)
{
// forward VCLs PrePaint window event to DrawingLayer
if( m_pWindowController )
if (m_pWindowController)
{
m_pWindowController->PrePaint();
m_pWindowController->PrePaint();
}
}
......
......@@ -42,8 +42,8 @@ public:
void clear();
//from base class Window:
virtual void PrePaint() SAL_OVERRIDE;
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
virtual void PrePaint(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE;
......
......@@ -715,8 +715,9 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void KeyUp( const KeyEvent& rKEvt );
virtual void PrePaint();
virtual void PrePaint(vcl::RenderContext& rRenderContext);
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect);
virtual void PostPaint(vcl::RenderContext& rRenderContext);
virtual void Erase() SAL_OVERRIDE;
virtual void Erase( const Rectangle& rRect ) SAL_OVERRIDE { ::OutputDevice::Erase( rRect ); }
......
......@@ -293,8 +293,8 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
void GetSelectionRects( ::std::vector< Rectangle >& rPixelRects );
protected:
virtual void PrePaint() SAL_OVERRIDE;
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
virtual void PrePaint(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
virtual void LoseFocus() SAL_OVERRIDE;
......
......@@ -283,7 +283,7 @@ void ScGridWindow::DoInvertRect( const Rectangle& rPixel )
UpdateHeaderOverlay(); // uses aInvertRect
}
void ScGridWindow::PrePaint()
void ScGridWindow::PrePaint(vcl::RenderContext& /*rRenderContext*/)
{
// forward PrePaint to DrawingLayer
ScTabViewShell* pTabViewShell = pViewData->GetViewShell();
......@@ -292,7 +292,7 @@ void ScGridWindow::PrePaint()
{
SdrView* pDrawView = pTabViewShell->GetSdrView();
if(pDrawView)
if (pDrawView)
{
pDrawView->PrePaint();
}
......
......@@ -171,7 +171,7 @@ protected:
bool mbUseDropScroll;
virtual void Resize() SAL_OVERRIDE;
virtual void PrePaint() SAL_OVERRIDE;
virtual void PrePaint(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE;
virtual void MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
......
......@@ -207,7 +207,7 @@ void Window::Resize()
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
}
void Window::PrePaint()
void Window::PrePaint(vcl::RenderContext& /*rRenderContext*/)
{
if ( mpViewShell )
mpViewShell->PrePaint();
......
......@@ -434,7 +434,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
Window::RequestHelp( rEvt );
}
void SwEditWin::PrePaint()
void SwEditWin::PrePaint(vcl::RenderContext& /*rRenderContext*/)
{
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
......
......@@ -186,8 +186,8 @@ friend void PageNumNotify( SwViewShell* pVwSh,
protected:
virtual void DataChanged( const DataChangedEvent& ) SAL_OVERRIDE;
virtual void PrePaint() SAL_OVERRIDE;
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
virtual void PrePaint(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
virtual void LoseFocus() SAL_OVERRIDE;
......
......@@ -51,7 +51,7 @@ private:
bool m_bPop;
bool m_bRestoreCursor;
public:
PaintHelper(vcl::Window *pWindow, sal_uInt16 nPaintFlags);
PaintHelper(vcl::Window* pWindow, sal_uInt16 nPaintFlags);
void SetPop()
{
m_bPop = true;
......@@ -377,31 +377,31 @@ PaintHelper::~PaintHelper()
namespace vcl {
void Window::ImplCallPaint( const vcl::Region* pRegion, sal_uInt16 nPaintFlags )
void Window::ImplCallPaint(const vcl::Region* pRegion, sal_uInt16 nPaintFlags)
{
// call PrePaint. PrePaint may add to the invalidate region as well as
// other parameters used below.
PrePaint();
PrePaint(*this);
mpWindowImpl->mbPaintFrame = false;
if ( nPaintFlags & IMPL_PAINT_PAINTALLCHILDREN )
if (nPaintFlags & IMPL_PAINT_PAINTALLCHILDREN)
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALLCHILDREN | (nPaintFlags & IMPL_PAINT_PAINTALL);
if ( nPaintFlags & IMPL_PAINT_PAINTCHILDREN )
if (nPaintFlags & IMPL_PAINT_PAINTCHILDREN)
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_PAINTCHILDREN;
if ( nPaintFlags & IMPL_PAINT_ERASE )
if (nPaintFlags & IMPL_PAINT_ERASE)
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_ERASE;
if ( nPaintFlags & IMPL_PAINT_CHECKRTL )
if (nPaintFlags & IMPL_PAINT_CHECKRTL)
mpWindowImpl->mnPaintFlags |= IMPL_PAINT_CHECKRTL;
if ( !mpWindowImpl->mpFirstChild )
if (!mpWindowImpl->mpFirstChild)
mpWindowImpl->mnPaintFlags &= ~IMPL_PAINT_PAINTALLCHILDREN;
if ( mpWindowImpl->mbPaintDisabled )
if (mpWindowImpl->mbPaintDisabled)
{
if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL )
Invalidate( INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE | INVALIDATE_NOTRANSPARENT | INVALIDATE_NOCLIPCHILDREN );
if (mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL)
Invalidate(INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE | INVALIDATE_NOTRANSPARENT | INVALIDATE_NOCLIPCHILDREN);
else if ( pRegion )
Invalidate( *pRegion, INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE | INVALIDATE_NOTRANSPARENT | INVALIDATE_NOCLIPCHILDREN );
Invalidate(*pRegion, INVALIDATE_NOCHILDREN | INVALIDATE_NOERASE | INVALIDATE_NOTRANSPARENT | INVALIDATE_NOCLIPCHILDREN);
return;
}
......@@ -409,10 +409,12 @@ void Window::ImplCallPaint( const vcl::Region* pRegion, sal_uInt16 nPaintFlags )
PaintHelper aHelper(this, nPaintFlags);
if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT )
if (mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT)
aHelper.DoPaint(pRegion);
else
mpWindowImpl->mnPaintFlags = 0;
PostPaint(*this);
}
void Window::ImplCallOverlapPaint()
......@@ -822,7 +824,11 @@ void Window::ImplUpdateAll( bool bOverlapWindows )
Flush();
}
void Window::PrePaint()
void Window::PrePaint(vcl::RenderContext& /*rRenderContext*/)
{
}
void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/)
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment