]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dc.cpp
Use a GtkVBox to do TLW layout. Rework some of the remaining sizing code.
[wxWidgets.git] / src / gtk / dc.cpp
index 9b2bcee17f75d91edff90cde35294e5bae4c1561..fc3b0012821247a6a286fee7618e7b1590474849 100644 (file)
 //-----------------------------------------------------------------------------
 
 #if wxUSE_NEW_DC
-IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDC)
+IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxImplDC)
 #else
 IMPLEMENT_ABSTRACT_CLASS(wxGTKImplDC, wxDCBase)
 #endif
 
-wxGTKImplDC::wxGTKImplDC()
+#if wxUSE_NEW_DC
+wxGTKImplDC::wxGTKImplDC( wxDC *owner ) 
+   : wxImplDC( owner )
+#else
+wxDC::wxDC()
+#endif
 {
     m_ok = FALSE;
 
@@ -32,6 +37,10 @@ wxGTKImplDC::wxGTKImplDC()
     m_brush = *wxWHITE_BRUSH;
 }
 
+wxGTKImplDC::~wxGTKImplDC()
+{
+}
+
 void wxGTKImplDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
 {
     m_clipping = TRUE;
@@ -49,7 +58,7 @@ 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) );
 }