diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-13 13:36:14 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-13 13:57:46 +0900 |
commit | 0ac80267730300f53e2410ffe9c0883f19f656a6 (patch) | |
tree | f3d4c58a5d434d5c436e62c132f5f0cbca366ac2 | |
parent | 822ee8a3395588d2022d3d560ed4e1ed34c369a5 (diff) |
add PostPaint and change PrePaint to include RenderContext param.
Change-Id: I26e03159fa6115025c6cf376e6ce71443bc98cec
-rw-r--r-- | chart2/source/controller/main/ChartWindow.cxx | 6 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartWindow.hxx | 4 | ||||
-rw-r--r-- | include/vcl/window.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/inc/gridwin.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/Window.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/edtwin.hxx | 4 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 34 |
10 files changed, 36 insertions, 29 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index c050b5a2330a..57a306691164 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -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(); } } diff --git a/chart2/source/controller/main/ChartWindow.hxx b/chart2/source/controller/main/ChartWindow.hxx index d00c2f6a44be..99a0c5fb6038 100644 --- a/chart2/source/controller/main/ChartWindow.hxx +++ b/chart2/source/controller/main/ChartWindow.hxx @@ -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; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index d509a55d9a7f..04cdb0f12594 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -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 ); } diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index aa683cb0a42f..e4bb56aac1f0 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -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; diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 2f291d7e0947..a3e51704c31e 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -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(); } diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx index b26917e89d7c..c1cc2143d858 100644 --- a/sd/source/ui/inc/Window.hxx +++ b/sd/source/ui/inc/Window.hxx @@ -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; diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 84da41d0cd6e..2cacce07f01b 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -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(); diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 1b69c0aebee9..67f85700fff7 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -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(); diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index c4400547ae0e..28ce77407941 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -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; diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 1afd142e706d..4ba545aff228 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -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*/) { } |