X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04ab8b6ddfa26fbabeadad36966a21a42fe649b1..593ac8df8eea35e4e0402a7ab0fbba13440b20bf:/src/gtk/dc.cpp diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index be84d8994e..fc3b001282 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -12,13 +12,23 @@ #include "wx/dc.h" + //----------------------------------------------------------------------------- // wxDC //----------------------------------------------------------------------------- -IMPLEMENT_ABSTRACT_CLASS(wxDC, wxDCBase) +#if wxUSE_NEW_DC +IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxImplDC) +#else +IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDCBase) +#endif +#if wxUSE_NEW_DC +wxGTKImplDC::wxGTKImplDC( wxDC *owner ) + : wxImplDC( owner ) +#else wxDC::wxDC() +#endif { m_ok = FALSE; @@ -27,7 +37,11 @@ wxDC::wxDC() m_brush = *wxWHITE_BRUSH; } -void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) +wxGTKImplDC::~wxGTKImplDC() +{ +} + +void wxGTKImplDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) { m_clipping = TRUE; m_clipX1 = x; @@ -40,17 +54,17 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei // get DC capabilities // --------------------------------------------------------------------------- -void wxDC::DoGetSizeMM( int* width, int* height ) const +void wxGTKImplDC::DoGetSizeMM( int* width, int* height ) const { int w = 0; int h = 0; - GetSize( &w, &h ); + GetOwner()->GetSize( &w, &h ); if (width) *width = int( double(w) / (m_userScaleX*m_mm_to_pix_x) ); if (height) *height = int( double(h) / (m_userScaleY*m_mm_to_pix_y) ); } // Resolution in pixels per logical inch -wxSize wxDC::GetPPI() const +wxSize wxGTKImplDC::GetPPI() const { // TODO (should probably be pure virtual) return wxSize(0, 0);