diff options
author | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:16:28 +0100 |
---|---|---|
committer | Matthias Huetsch [mhu] <matthias.huetsch@oracle.com> | 2011-01-27 18:16:28 +0100 |
commit | 45893f9a2740eb9c291476df4eaa3700003f0efd (patch) | |
tree | a7e2381af1a4136eb18b89b55af639306c9fc2c0 /vcl/source/window/decoview.cxx | |
parent | e3f92103a5a14baf81c7f4fca6bc8fb4f3741e1d (diff) | |
parent | ffd600e777970df0908125da66b280e1b00dbec9 (diff) |
Update from master repository (DEV300_m98).
Diffstat (limited to 'vcl/source/window/decoview.cxx')
-rw-r--r-- | vcl/source/window/decoview.cxx | 112 |
1 files changed, 6 insertions, 106 deletions
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index a32790cfb0d4..d51988d4d5d3 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -44,71 +44,6 @@ // ======================================================================= -void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect, - USHORT nStyle, BOOL bClose ) -{ - DecorationView aView( pDev ); - const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); - Rectangle aRect = rRect; - Color aColor1; - Color aColor2; - - pDev->SetFillColor(); - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - { - aColor1 = rStyleSettings.GetShadowColor(); - aColor2 = rStyleSettings.GetLightColor(); - } - else - { - aColor1 = rStyleSettings.GetLightColor(); - aColor2 = rStyleSettings.GetShadowColor(); - } - aView.DrawFrame( aRect, aColor1, aColor2 ); - - aRect.Left() += 2; - aRect.Top() += 2; - aRect.Right() -= 2; - aRect.Bottom() -= 2; - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - pDev->SetLineColor( rStyleSettings.GetLightColor() ); - else - pDev->SetLineColor( rStyleSettings.GetShadowColor() ); - if ( bClose ) - { - pDev->DrawLine( aRect.TopLeft(), Point( aRect.Left(), aRect.Bottom()-2 ) ); - pDev->DrawLine( aRect.TopLeft(), Point( aRect.Right()-2, aRect.Top() ) ); - pDev->DrawLine( Point( aRect.Left()+2, aRect.Bottom()-1 ), - Point( aRect.Right()-1, aRect.Top()+2 ) ); - } - else - { - pDev->DrawLine( aRect.TopLeft(), aRect.BottomLeft() ); - pDev->DrawLine( aRect.TopLeft(), Point( aRect.Right()-1, aRect.Top() ) ); - } - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - pDev->SetLineColor( rStyleSettings.GetShadowColor() ); - else - pDev->SetLineColor( rStyleSettings.GetLightColor() ); - if ( bClose ) - { - pDev->DrawLine( Point( aRect.Right(), aRect.Top()+2 ), aRect.BottomRight() ); - pDev->DrawLine( Point( aRect.Left()+2, aRect.Bottom() ), aRect.BottomRight() ); - pDev->DrawLine( Point( aRect.Right()-2, aRect.Top()+1 ), - Point( aRect.Left()+1, aRect.Bottom()-2 ) ); - } - else - { - pDev->DrawLine( aRect.TopRight(), aRect.BottomRight() ); - pDev->DrawLine( Point( aRect.Left()+1, aRect.Bottom() ), aRect.BottomRight() ); - } -} - -// ======================================================================= - static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, SymbolType eType ) { @@ -630,41 +565,6 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, pDev->DrawRect( aRect ); } break; - - case SYMBOL_OS2CLOSE: - { - Rectangle aRect( nCenterX-n2, nCenterY-n2, - nCenterX+n2, nCenterY+n2 ); - ImplDrawOS2Symbol( pDev, aRect, 0, TRUE ); - } - break; - - case SYMBOL_OS2FLOAT: - { - Rectangle aRect( nCenterX-n2+4, nCenterY-n2+4, - nCenterX+n2-4, nCenterY+n2-3 ); - ImplDrawOS2Symbol( pDev, aRect, 0, FALSE ); - DecorationView aDecoView( pDev ); - Rectangle aRect2( nCenterX-n2, nCenterY-n2, - nCenterX-n2+2, nCenterY+n2 ); - aDecoView.DrawFrame( aRect2, - pDev->GetSettings().GetStyleSettings().GetLightColor(), - pDev->GetSettings().GetStyleSettings().GetShadowColor() ); - Rectangle aRect3( nCenterX+n2-2, nCenterY-n2, - nCenterX+n2, nCenterY+n2 ); - aDecoView.DrawFrame( aRect3, - pDev->GetSettings().GetStyleSettings().GetLightColor(), - pDev->GetSettings().GetStyleSettings().GetShadowColor() ); - } - break; - - case SYMBOL_OS2HIDE: - { - Rectangle aRect( nCenterX-n2+3, nCenterY-n2+3, - nCenterX+n2-3, nCenterY+n2-3 ); - ImplDrawOS2Symbol( pDev, aRect, 0, FALSE ); - } - break; } } @@ -877,12 +777,12 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, if( pWin->GetType() == WINDOW_BORDERWINDOW ) nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER; ImplControlValue aControlValue( nValueStyle ); - Region aBound, aContent; - Region aNatRgn( rRect ); + Rectangle aBound, aContent; + Rectangle aNatRgn( rRect ); if(pWin && pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER, aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) ) { - rRect = aContent.GetBoundRect(); + rRect = aContent; } else if ( nStyle & FRAME_DRAW_MONO ) ImplDrawDPILineRect( pDev, rRect, NULL, bRound ); @@ -922,15 +822,15 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect, if( pWin->GetType() == WINDOW_BORDERWINDOW ) nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER; ImplControlValue aControlValue( nValueStyle ); - Region aBound, aContent; - Region aNatRgn( rRect ); + Rectangle aBound, aContent; + Rectangle aNatRgn( rRect ); if( pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER, aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) ) { if( pWin->DrawNativeControl( CTRL_FRAME, PART_BORDER, aContent, CTRL_STATE_ENABLED, aControlValue, rtl::OUString()) ) { - rRect = aContent.GetBoundRect(); + rRect = aContent; return; } } |