X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04ab8b6ddfa26fbabeadad36966a21a42fe649b1..43f4e852a1b2ac37c3db6a2b87315192ac549191:/src/motif/dc.cpp diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index 042d25d8c7..4e83cd78e6 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/motif/dc.cpp -// Purpose: wxDC class +// Purpose: wxMotifDCImpl class // Author: Julian Smart // Modified by: // Created: 01/02/97 @@ -12,38 +12,38 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/dc.h" - #ifndef WX_PRECOMP #include "wx/dcmemory.h" + #include "wx/icon.h" #endif -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) +#include "wx/motif/dc.h" + +IMPLEMENT_ABSTRACT_CLASS(wxMotifDCImpl, wxDCImpl) //----------------------------------------------------------------------------- -// wxDC +// wxMotifDCImpl //----------------------------------------------------------------------------- -wxDC::wxDC() +wxMotifDCImpl::wxMotifDCImpl(wxDC *owner) + : wxDCImpl(owner) { m_ok = false; m_backgroundMode = wxTRANSPARENT; - - m_isInteractive = false; } -void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y) +void wxMotifDCImpl::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y) { - wxCHECK_RET( Ok(), "invalid dc" ); - wxCHECK_RET( icon.Ok(), "invalid icon" ); + wxCHECK_RET( IsOk(), "invalid dc" ); + wxCHECK_RET( icon.IsOk(), "invalid icon" ); DoDrawBitmap(icon, x, y, true); } -void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask ) +void wxMotifDCImpl::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask ) { - wxCHECK_RET( bitmap.Ok(), "invalid bitmap" ); + wxCHECK_RET( bitmap.IsOk(), "invalid bitmap" ); wxMemoryDC memDC; memDC.SelectObjectAsSource(bitmap); @@ -60,12 +60,12 @@ void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useM } #endif // 0 - Blit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), &memDC, 0, 0, wxCOPY, useMask); + DoBlit(x, y, bitmap.GetWidth(), bitmap.GetHeight(), &memDC, 0, 0, wxCOPY, useMask); memDC.SelectObject(wxNullBitmap); } -void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) +void wxMotifDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) { m_clipping = true; m_clipX1 = x; @@ -74,7 +74,7 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei m_clipY2 = y + height; } -void wxDC::DoGetSize( int* width, int* height ) const +void wxMotifDCImpl::DoGetSize( int* width, int* height ) const { if ( width ) *width = m_maxX - m_minX; @@ -82,7 +82,7 @@ void wxDC::DoGetSize( int* width, int* height ) const *height = m_maxY - m_minY; } -void wxDC::DoGetSizeMM( int* width, int* height ) const +void wxMotifDCImpl::DoGetSizeMM( int* width, int* height ) const { int w, h; GetSize( &w, &h ); @@ -94,7 +94,7 @@ void wxDC::DoGetSizeMM( int* width, int* height ) const } // Resolution in pixels per logical inch -wxSize wxDC::GetPPI() const +wxSize wxMotifDCImpl::GetPPI() const { // TODO (should probably be pure virtual) return wxSize(0, 0);