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