diff options
author | th <th@openoffice.org> | 2001-08-23 12:47:30 +0000 |
---|---|---|
committer | th <th@openoffice.org> | 2001-08-23 12:47:30 +0000 |
commit | 5ab2d0e01e51e2b5e25b8daa6917bb2a95167073 (patch) | |
tree | 51b8022d7d39a7342e5ec3b97d5286c3575f7c1c /vcl/source/window/window2.cxx | |
parent | 18df2f75351d2683d013dac56dc22cafa73f68fd (diff) |
#78526# - SnapShot() with bBorder
Diffstat (limited to 'vcl/source/window/window2.cxx')
-rw-r--r-- | vcl/source/window/window2.cxx | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index ecc8bf1816e8..2c9fc6dc5bff 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: window2.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: th $ $Date: 2001-06-21 21:01:12 $ + * last change: $Author: th $ $Date: 2001-08-23 13:47:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,6 +66,9 @@ #include <svsys.h> #endif #ifndef REMOTE_APPSERVER +#ifndef _SV_SALBMP_HXX +#include <salbmp.hxx> +#endif #ifndef _SV_SALGDI_HXX #include <salgdi.hxx> #endif @@ -83,6 +86,9 @@ #ifndef _SV_SVDATA_HXX #include <svdata.hxx> #endif +#ifndef _SV_IMPBMP_HXX +#include <impbmp.hxx> +#endif #ifndef _SV_BITMAP_HXX #include <bitmap.hxx> #endif @@ -381,22 +387,52 @@ void Window::ImplInvalidateAllOverlapBackgrounds() // ======================================================================= -Bitmap Window::SnapShot() const +Bitmap Window::SnapShot( BOOL bBorder ) const { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); Bitmap aBmp; - if ( mpBorderWindow ) - aBmp = mpBorderWindow->SnapShot(); - else if ( IsReallyVisible() ) - mpFrameWindow->ImplGetFrameBitmap( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ), aBmp ); + if ( IsReallyVisible() ) + { + if ( bBorder && mpBorderWindow ) + aBmp = mpBorderWindow->SnapShot(); + else + { + ((Window*)this)->Update(); + +#ifndef REMOTE_APPSERVER + if ( bBorder && mbFrame ) + { + SalBitmap* pSalBmp = mpFrame->SnapShot(); + + if ( pSalBmp ) + { + ImpBitmap* pImpBmp = new ImpBitmap; + pImpBmp->ImplSetSalBitmap( pSalBmp ); + aBmp.ImplSetImpBitmap( pImpBmp ); + return aBmp; + } + } +#endif + + mpFrameWindow->ImplGetFrameBitmap( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ), aBmp ); + } + } return aBmp; } // ----------------------------------------------------------------------- +Bitmap Window::SnapShot() const +{ + // Should be merged in the next top level build !!! + return SnapShot( TRUE ); +} + +// ----------------------------------------------------------------------- + void Window::ShowFocus( const Rectangle& rRect ) { DBG_CHKTHIS( Window, ImplDbgCheckWindow ); |