Implemented wxScreenDC the hard way

INcreased menu bar size
  Ripped off handles (a few days ago)
  Corrected $Id:$ somewhere


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-10-26 10:56:58 +00:00
parent f96aa4d9eb
commit dbf858b5d6
55 changed files with 644 additions and 184 deletions

View File

@@ -119,6 +119,7 @@ wxPaintDC::wxPaintDC( wxWindow *window )
wxPaintDC::~wxPaintDC(void)
{
Destroy();
}
void wxPaintDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1),
@@ -827,15 +828,12 @@ void wxPaintDC::DestroyClippingRegion(void)
void wxPaintDC::SetUpDC(void)
{
Destroy();
m_ok = TRUE;
m_logicalFunction = wxCOPY;
if (m_penGC) gdk_gc_unref( m_penGC );
m_penGC = gdk_gc_new( m_window );
if (m_brushGC) gdk_gc_unref( m_brushGC );
m_brushGC = gdk_gc_new( m_window );
if (m_textGC) gdk_gc_unref( m_textGC );
m_textGC = gdk_gc_new( m_window );
if (m_bgGC) gdk_gc_unref( m_bgGC );
m_bgGC = gdk_gc_new( m_window );
SetTextForeground( m_textForegroundColour );
SetTextBackground( m_textBackgroundColour );
@@ -857,6 +855,18 @@ void wxPaintDC::SetUpDC(void)
}
}
void wxPaintDC::Destroy(void)
{
if (m_penGC) gdk_gc_unref( m_penGC );
m_penGC = (GdkGC*) NULL;
if (m_brushGC) gdk_gc_unref( m_brushGC );
m_brushGC = (GdkGC*) NULL;
if (m_textGC) gdk_gc_unref( m_textGC );
m_textGC = (GdkGC*) NULL;
if (m_bgGC) gdk_gc_unref( m_bgGC );
m_bgGC = (GdkGC*) NULL;
}
GdkWindow *wxPaintDC::GetWindow(void)
{
return m_window;