X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d0c4d2e7bcedb4599c3cce0af19adf73b2f8ecd..f8c5636c42238296eb67bf73d1da3c5acb010fee:/src/gtk1/dcclient.cpp diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index f0a96e5694..588fbb5501 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -393,6 +393,13 @@ void wxWindowDC::SetUpDC() } } +void wxWindowDC::DoGetSize( int* width, int* height ) const +{ + wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") ); + + m_owner->GetSize(width, height); +} + void wxWindowDC::DoFloodFill( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxColour &WXUNUSED(col), int WXUNUSED(style) ) { @@ -528,7 +535,7 @@ void wxWindowDC::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, if (m_pen.GetStyle() != wxTRANSPARENT) { gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); - + gdk_draw_line( m_window, m_penGC, xx1, yy1, xxc, yyc ); gdk_draw_line( m_window, m_penGC, xxc, yyc, xx2, yy2 ); } @@ -2217,20 +2224,15 @@ void wxWindowDC::DoDrawSpline( wxList *points ) // wxPaintDC //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxWindowDC) - -wxPaintDC::wxPaintDC() - : wxWindowDC() -{ -} +IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxClientDC) wxPaintDC::wxPaintDC( wxWindow *win ) - : wxWindowDC( win ) + : wxClientDC( win ) { #if USE_PAINT_REGION if (!win->m_clipPaintRegion) return; - + m_paintClippingRegion = win->GetUpdateRegion(); GdkRegion *region = m_paintClippingRegion.GetRegion(); if ( region ) @@ -2249,16 +2251,18 @@ wxPaintDC::wxPaintDC( wxWindow *win ) // wxClientDC //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxClientDC,wxWindowDC) +IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC) -wxClientDC::wxClientDC() - : wxWindowDC() +wxClientDC::wxClientDC( wxWindow *win ) + : wxWindowDC( win ) { } -wxClientDC::wxClientDC( wxWindow *win ) - : wxWindowDC( win ) +void wxClientDC::DoGetSize(int *width, int *height) const { + wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") ); + + m_owner->GetClientSize( width, height ); } // ----------------------------------------------------------------------------