diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-06-02 08:43:41 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-07-19 23:40:53 +1000 |
commit | c0a9ecb6aec9f9bb00e07d8170e728deaa1d9ffc (patch) | |
tree | 137ee12806b973fa3168c1defb68931534d7e8f6 | |
parent | f3c96bad9d9d9c8e4c51972ed09224bf0dea7f4c (diff) |
vcl: move ImplClipAllChildren() to ClipManager
Change-Id: I24a8d8538516992c77d4d36426979515e6ddef8a
-rw-r--r-- | include/vcl/window.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/clipmgr.hxx | 1 | ||||
-rw-r--r-- | vcl/source/window/clipmgr.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/clipping.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 8 |
5 files changed, 17 insertions, 19 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index c79b50690325..753ecd3bbbe9 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -521,8 +521,6 @@ private: SAL_DLLPRIVATE void ImplUpdateSysObjOverlapsClip(); SAL_DLLPRIVATE void ImplUpdateSysObjClip(); - SAL_DLLPRIVATE void ImplClipAllChildren( Region& rRegion ); - SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows( const Region& rInterRegion, Region& rRegion ); SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, Region& rRegion ); SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion ); diff --git a/vcl/inc/clipmgr.hxx b/vcl/inc/clipmgr.hxx index 23e8cd9736a1..0e5829241ef7 100644 --- a/vcl/inc/clipmgr.hxx +++ b/vcl/inc/clipmgr.hxx @@ -49,6 +49,7 @@ public: void InitClipRegion( Window *pWindow ); void ClipBoundaries( Window* pWindow, Region& rRegion, bool bThis, bool bOverlaps ); bool ClipChildren( Window *pWindow, Region& rRegion ); + void ClipAllChildren( Window *pWindow, Region& rRegion ); Region* GetChildClipRegion( Window* pWindow ); void Intersect( Window* pWindow, Region& rRegion ); diff --git a/vcl/source/window/clipmgr.cxx b/vcl/source/window/clipmgr.cxx index ad00d709004b..f26392669ec0 100644 --- a/vcl/source/window/clipmgr.cxx +++ b/vcl/source/window/clipmgr.cxx @@ -136,6 +136,18 @@ bool ClipManager::ClipChildren( Window *pWindow, Region& rRegion ) return bOtherClip; } +void ClipManager::ClipAllChildren( Window *pWindow, Region& rRegion ) +{ + Window* pChildWindow = pWindow->mpWindowImpl->mpFirstChild; + while ( pChildWindow ) + { + if ( pChildWindow->mpWindowImpl->mbReallyVisible ) + Exclude( pWindow, rRegion ); + pChildWindow = pChildWindow->mpWindowImpl->mpNext; + } +} + + Region* ClipManager::GetChildClipRegion( Window* pWindow ) { if ( pWindow->mpWindowImpl->mbInitWinClipRegion ) diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx index 1ac5b2773cf2..0d5beb9a184e 100644 --- a/vcl/source/window/clipping.cxx +++ b/vcl/source/window/clipping.cxx @@ -188,19 +188,6 @@ void Window::EnableClipSiblings( bool bClipSiblings ) mpWindowImpl->mbClipSiblings = bClipSiblings; } -void Window::ImplClipAllChildren( Region& rRegion ) -{ - ClipManager *clipMgr = ClipManager::GetInstance(); - - Window* pWindow = mpWindowImpl->mpFirstChild; - while ( pWindow ) - { - if ( pWindow->mpWindowImpl->mbReallyVisible ) - clipMgr->Exclude( pWindow, rRegion ); - pWindow = pWindow->mpWindowImpl->mpNext; - } -} - bool Window::ImplSysObjClip( const Region* pOldRegion ) { ClipManager *clipMgr = ClipManager::GetInstance(); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index e547f67612ba..9a10428e0afc 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -482,7 +482,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) if ( !(nFlags & INVALIDATE_NOCLIPCHILDREN) ) { if ( nOrgFlags & INVALIDATE_NOCHILDREN ) - ImplClipAllChildren( aRegion ); + clipMgr->ClipAllChildren( this, aRegion ); else { if ( clipMgr->ClipChildren( this, aRegion ) ) @@ -631,7 +631,7 @@ void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) { nFlags &= ~VALIDATE_CHILDREN; if ( nOrgFlags & VALIDATE_NOCHILDREN ) - ImplClipAllChildren( aRegion ); + clipMgr->ClipAllChildren( this, aRegion ); else { if ( clipMgr->ClipChildren( this, aRegion ) ) @@ -1284,7 +1284,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !bScrollChildren ) { if ( nOrgFlags & SCROLL_NOCHILDREN ) - ImplClipAllChildren( aRegion ); + clipMgr->ClipAllChildren( this, aRegion ); else clipMgr->ClipChildren( this, aRegion ); } @@ -1347,7 +1347,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !bScrollChildren ) { if ( nOrgFlags & SCROLL_NOCHILDREN ) - ImplClipAllChildren( aInvalidateRegion ); + clipMgr->ClipAllChildren( this, aInvalidateRegion ); else clipMgr->ClipChildren( this, aInvalidateRegion ); } |