summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-02-16 10:13:00 +0000
committerMalte Timmermann <mt@openoffice.org>2001-02-16 10:13:00 +0000
commit6cd1f48f8fb4341b67675aab357c9f5450dddf47 (patch)
tree61a31fe2662c092ecfa9a6de0633e378035fef56 /vcl
parent2fff4e87b4523860332d8a53b077828b1670b15c (diff)
Implemented the Draw() method
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/dialog.cxx43
1 files changed, 16 insertions, 27 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 6def7d93e3da..bfab04945a9f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dialog.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mt $ $Date: 2001-02-14 18:11:46 $
+ * last change: $Author: mt $ $Date: 2001-02-16 11:13:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -839,35 +839,24 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULO
{
ImplInitSettings();
+ pDev->Push();
+ pDev->SetMapMode();
+ pDev->SetLineColor();
+ pDev->SetFillColor( GetBackground().GetColor() );
+
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
-// Font aFont = GetDrawPixelFont( pDev );
- OutDevType eOutDevType = pDev->GetOutDevType();
- pDev->Push();
- pDev->SetMapMode();
-// pDev->SetFont( aFont );
-// pDev->SetTextFillColor();
+ pDev->DrawRect( Rectangle( aPos, aSize ) );
+
+ ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
+ aImplWin.SetText( GetText() );
+ aImplWin.SetPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() );
+ aImplWin.SetDisplayActive( TRUE );
+ aImplWin.InitView();
+
+ aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos );
- // Border/Background
- pDev->SetLineColor();
- pDev->SetFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
- if ( bBorder || bBackground )
- {
- Rectangle aRect( aPos, aSize );
- if ( bBorder )
- {
- DecorationView aDecoView( pDev );
- aRect = aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEIN );
- }
- if ( bBackground )
- {
- pDev->SetFillColor( GetControlBackground() );
- pDev->DrawRect( aRect );
- }
- }
pDev->Pop();
}