X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab3a145407008f07e065f0b72bae9b8f88aeaf65..8cf30134cd3881c0da18ef348206215f5b62bcb7:/src/common/overlaycmn.cpp diff --git a/src/common/overlaycmn.cpp b/src/common/overlaycmn.cpp index b3e0304101..722cd5794f 100644 --- a/src/common/overlaycmn.cpp +++ b/src/common/overlaycmn.cpp @@ -53,24 +53,24 @@ bool wxOverlay::IsOk() return m_impl->IsOk(); } -void wxOverlay::Init( wxWindowDC* dc, int x , int y , int width , int height ) +void wxOverlay::Init( wxDC* dc, int x , int y , int width , int height ) { m_impl->Init(dc, x, y, width, height); } -void wxOverlay::BeginDrawing( wxWindowDC* dc) +void wxOverlay::BeginDrawing( wxDC* dc) { m_impl->BeginDrawing(dc); m_inDrawing = true ; } -void wxOverlay::EndDrawing( wxWindowDC* dc) +void wxOverlay::EndDrawing( wxDC* dc) { m_impl->EndDrawing(dc); m_inDrawing = false ; } -void wxOverlay::Clear( wxWindowDC* dc) +void wxOverlay::Clear( wxDC* dc) { m_impl->Clear(dc); } @@ -86,13 +86,13 @@ void wxOverlay::Reset() // wxDCOverlay // ---------------------------------------------------------------------------- -wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc, int x , int y , int width , int height) : +wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxDC *dc, int x , int y , int width , int height) : m_overlay(overlay) { Init(dc, x, y, width, height); } -wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc) : +wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxDC *dc) : m_overlay(overlay) { int width; @@ -106,7 +106,7 @@ wxDCOverlay::~wxDCOverlay() m_overlay.EndDrawing(m_dc); } -void wxDCOverlay::Init(wxWindowDC *dc, int x , int y , int width , int height ) +void wxDCOverlay::Init(wxDC *dc, int x , int y , int width , int height ) { m_dc = dc ; if ( !m_overlay.IsOk() ) @@ -116,7 +116,7 @@ void wxDCOverlay::Init(wxWindowDC *dc, int x , int y , int width , int height ) m_overlay.BeginDrawing(dc); } -void wxDCOverlay::Clear() +void wxDCOverlay::Clear() { m_overlay.Clear(m_dc); } @@ -129,9 +129,7 @@ void wxDCOverlay::Clear() wxOverlayImpl::wxOverlayImpl() { -#if defined(__WXGTK__) || defined(__WXMSW__) m_window = NULL ; -#endif m_x = m_y = m_width = m_height = 0 ; } @@ -139,28 +137,14 @@ wxOverlayImpl::~wxOverlayImpl() { } -bool wxOverlayImpl::IsOk() +bool wxOverlayImpl::IsOk() { return m_bmpSaved.Ok() ; } -void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height ) +void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height ) { -#if defined(__WXGTK__) -#if wxUSE_NEW_DC - wxImplDC *impl = dc->GetImpl(); - wxGTKWindowImplDC *gtk_impl = wxDynamicCast( impl, wxGTKWindowImplDC ); - if (gtk_impl) - m_window = gtk_impl->m_owningWindow; -#else - m_window = dc->m_owningWindow; -#endif -#else - #if defined (__WXMSW__) m_window = dc->GetWindow(); - #endif // __WXMSW__ - -#endif wxMemoryDC dcMem ; m_bmpSaved.Create( width, height ); dcMem.SelectObject( m_bmpSaved ); @@ -178,7 +162,7 @@ void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height dcMem.SelectObject( wxNullBitmap ); } -void wxOverlayImpl::Clear(wxWindowDC* dc) +void wxOverlayImpl::Clear(wxDC* dc) { wxMemoryDC dcMem ; dcMem.SelectObject( m_bmpSaved ); @@ -191,11 +175,11 @@ void wxOverlayImpl::Reset() m_bmpSaved = wxBitmap(); } -void wxOverlayImpl::BeginDrawing(wxWindowDC* WXUNUSED(dc)) +void wxOverlayImpl::BeginDrawing(wxDC* WXUNUSED(dc)) { } -void wxOverlayImpl::EndDrawing(wxWindowDC* WXUNUSED(dc)) +void wxOverlayImpl::EndDrawing(wxDC* WXUNUSED(dc)) { }