diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-26 23:58:43 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-27 08:13:00 +1000 |
commit | ee1bef418a8d14909df6c4d58b90c1a48e7a49c8 (patch) | |
tree | c18f020351fe68e11d6c59f85b022cdc946f68f3 /vcl | |
parent | 37dd6ced1e1763b2da2d08f5dd0df1bf7a6458a9 (diff) |
vcl: move Window::ImplSetFrameParent() from window.cxx to stacking.cxx
Change-Id: I41ce1398017c7c9ff7b24464250911c63b3e2c92
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/stacking.cxx | 18 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 98 |
2 files changed, 58 insertions, 58 deletions
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index e1a7dc71f14b..5155efcbf632 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -1156,6 +1156,24 @@ bool Window::IsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const return ImplIsChild( pWindow, bSystemWindow ); } +void Window::ImplSetFrameParent( const Window* pParent ) +{ + Window* pFrameWindow = ImplGetSVData()->maWinData.mpFirstFrame; + while( pFrameWindow ) + { + // search all frames that are children of this window + // and reparent them + if( ImplIsRealParentPath( pFrameWindow ) ) + { + DBG_ASSERT( mpWindowImpl->mpFrame != pFrameWindow->mpWindowImpl->mpFrame, "SetFrameParent to own" ); + DBG_ASSERT( mpWindowImpl->mpFrame, "no frame" ); + SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL; + pFrameWindow->mpWindowImpl->mpFrame->SetParent( pParentFrame ); + } + pFrameWindow = pFrameWindow->mpWindowImpl->mpFrameData->mpNextFrame; + } +} + const SystemEnvData* Window::GetSystemData() const { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 632f881e6d4b..733c4aa33ec2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1127,32 +1127,6 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste GetAccessibleParentWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_CHILDCREATED, this ); } -void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags ) -{ - if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0) - return; - - if (nFlags & COPYAREA_WINDOWINVALIDATE) - { - const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY), - Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight)); - - ImplMoveAllInvalidateRegions(aSrcRect, - aPosAry.mnDestX-aPosAry.mnSrcX, - aPosAry.mnDestY-aPosAry.mnSrcY, - false); - - mpGraphics->CopyArea(aPosAry.mnDestX, aPosAry.mnDestY, - aPosAry.mnSrcX, aPosAry.mnSrcY, - aPosAry.mnSrcWidth, aPosAry.mnSrcHeight, - SAL_COPYAREA_WINDOWINVALIDATE, this); - - return; - } - - OutputDevice::CopyDeviceArea(aPosAry, nFlags); -} - void Window::ImplInitAppFontData( Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1197,6 +1171,46 @@ void Window::ImplInitAppFontData( Window* pWindow ) pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100; } +void Window::ImplInitWindowData( WindowType nType ) +{ + // We will eventually being removing the inheritance of OutputDevice from Window. + // It will be replaced with a composition relationship. A Window will use an OutputDevice, + // it will not *be* an OutputDevice + mpOutputDevice = (OutputDevice*)this; + + mpWindowImpl = new WindowImpl( nType ); + + meOutDevType = OUTDEV_WINDOW; + + mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active +} + +void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags ) +{ + if (aPosAry.mnSrcWidth == 0 || aPosAry.mnSrcHeight == 0 || aPosAry.mnDestWidth == 0 || aPosAry.mnDestHeight == 0) + return; + + if (nFlags & COPYAREA_WINDOWINVALIDATE) + { + const Rectangle aSrcRect(Point(aPosAry.mnSrcX, aPosAry.mnSrcY), + Size(aPosAry.mnSrcWidth, aPosAry.mnSrcHeight)); + + ImplMoveAllInvalidateRegions(aSrcRect, + aPosAry.mnDestX-aPosAry.mnSrcX, + aPosAry.mnDestY-aPosAry.mnSrcY, + false); + + mpGraphics->CopyArea(aPosAry.mnDestX, aPosAry.mnDestY, + aPosAry.mnSrcX, aPosAry.mnSrcY, + aPosAry.mnSrcWidth, aPosAry.mnSrcHeight, + SAL_COPYAREA_WINDOWINVALIDATE, this); + + return; + } + + OutputDevice::CopyDeviceArea(aPosAry, nFlags); +} + bool Window::ImplCheckUIFont( const Font& rFont ) { if( ImplGetSVData()->maGDIData.mbNativeFontConfig ) @@ -1238,20 +1252,6 @@ bool Window::ImplCheckUIFont( const Font& rFont ) return bUIFontOk; } -void Window::ImplInitWindowData( WindowType nType ) -{ - // We will eventually being removing the inheritance of OutputDevice from Window. - // It will be replaced with a composition relationship. A Window will use an OutputDevice, - // it will not *be* an OutputDevice - mpOutputDevice = (OutputDevice*)this; - - mpWindowImpl = new WindowImpl( nType ); - - meOutDevType = OUTDEV_WINDOW; - - mbEnableRTL = Application::GetSettings().GetLayoutRTL(); // true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active -} - bool ImplDoTiledRendering() { #if !HAVE_FEATURE_DESKTOP @@ -1266,24 +1266,6 @@ bool ImplDoTiledRendering() #endif } -void Window::ImplSetFrameParent( const Window* pParent ) -{ - Window* pFrameWindow = ImplGetSVData()->maWinData.mpFirstFrame; - while( pFrameWindow ) - { - // search all frames that are children of this window - // and reparent them - if( ImplIsRealParentPath( pFrameWindow ) ) - { - DBG_ASSERT( mpWindowImpl->mpFrame != pFrameWindow->mpWindowImpl->mpFrame, "SetFrameParent to own" ); - DBG_ASSERT( mpWindowImpl->mpFrame, "no frame" ); - SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL; - pFrameWindow->mpWindowImpl->mpFrame->SetParent( pParentFrame ); - } - pFrameWindow = pFrameWindow->mpWindowImpl->mpFrameData->mpNextFrame; - } -} - ImplWinData* Window::ImplGetWinData() const { if ( !mpWindowImpl->mpWinData ) |