X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04ab8b6ddfa26fbabeadad36966a21a42fe649b1..31a9fc93900c8f958a4d37b3281e73f7601e6a63:/src/motif/dc.cpp?ds=sidebyside diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index 042d25d8c7..6ce44a8df1 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,36 +12,36 @@ // 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( IsOk(), "invalid dc" ); wxCHECK_RET( icon.Ok(), "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" ); @@ -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);