]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved deprecated code to source file (didn't compile
authorRobert Roebling <robert@roebling.de>
Sat, 5 May 2007 15:09:45 +0000 (15:09 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 5 May 2007 15:09:45 +0000 (15:09 +0000)
   as inlined, somehow).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dc.h
src/common/dcbase.cpp

index 1cea5b48af3a1753358814a9ab5f3f0ee24e48be..43e7c585bf5b6d815a9fbaae84ce62f785abfeeb 100644 (file)
@@ -613,50 +613,10 @@ public:
                        long *x, long *y,
                        long *descent = NULL,
                        long *externalLeading = NULL,
-                       const wxFont *theFont = NULL) const )
-    {
-        wxCoord x2, y2, descent2, externalLeading2;
-        DoGetTextExtent(string, &x2, &y2,
-                        &descent2, &externalLeading2,
-                        theFont);
-        if ( x )
-            *x = x2;
-        if ( y )
-            *y = y2;
-        if ( descent )
-            *descent = descent2;
-        if ( externalLeading )
-            *externalLeading = externalLeading2;
-    }
-
-    wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const )
-    {
-        wxCoord x2, y2;
-        DoGetLogicalOrigin(&x2, &y2);
-        if ( x )
-            *x = x2;
-        if ( y )
-            *y = y2;
-    }
-
-    wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const )
-    {
-        wxCoord x2, y2;
-        DoGetDeviceOrigin(&x2, &y2);
-        if ( x )
-            *x = x2;
-        if ( y )
-            *y = y2;
-    }
-    wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const )
-    {
-        wxCoord xx,yy,ww,hh;
-        DoGetClippingBox(&xx, &yy, &ww, &hh);
-        if (x) *x = xx;
-        if (y) *y = yy;
-        if (w) *w = ww;
-        if (h) *h = hh;
-    }
+                       const wxFont *theFont = NULL) const );
+    wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const );
+    wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const );
+    wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const );
 #endif  // WXWIN_COMPATIBILITY_2_8
 
     // RTL related functions
index 628b7be0df7adc0697a3944a013064b0691d1b77..d659598d0e068d8b719fc5fa23e187cdeb047cbd 100644 (file)
@@ -94,6 +94,61 @@ void wxDCBase::EndDrawing()
 }
 #endif // WXWIN_COMPATIBILITY_2_6
 
+#if WXWIN_COMPATIBILITY_2_8
+    // for compatibility with the old code when wxCoord was long everywhere
+void wxDCBase::GetTextExtent(const wxString& string,
+                       long *x, long *y,
+                       long *descent = NULL,
+                       long *externalLeading = NULL,
+                       const wxFont *theFont = NULL) const
+    {
+        wxCoord x2, y2, descent2, externalLeading2;
+        DoGetTextExtent(string, &x2, &y2,
+                        &descent2, &externalLeading2,
+                        theFont);
+        if ( x )
+            *x = x2;
+        if ( y )
+            *y = y2;
+        if ( descent )
+            *descent = descent2;
+        if ( externalLeading )
+            *externalLeading = externalLeading2;
+    }
+
+void wxDCBase::GetLogicalOrigin(long *x, long *y) const 
+    {
+        wxCoord x2, y2;
+        DoGetLogicalOrigin(&x2, &y2);
+        if ( x )
+            *x = x2;
+        if ( y )
+            *y = y2;
+    }
+
+void wxDCBase::GetDeviceOrigin(long *x, long *y) const 
+    {
+        wxCoord x2, y2;
+        DoGetDeviceOrigin(&x2, &y2);
+        if ( x )
+            *x = x2;
+        if ( y )
+            *y = y2;
+    } 
+    
+void wxDCBase::GetClippingBox(long *x, long *y, long *w, long *h) const 
+    {
+        wxCoord xx,yy,ww,hh;
+        DoGetClippingBox(&xx, &yy, &ww, &hh);
+        if (x) *x = xx;
+        if (y) *y = yy;
+        if (w) *w = ww;
+        if (h) *h = hh;
+    } 
+#endif  // WXWIN_COMPATIBILITY_2_8
+
+
+
 // ----------------------------------------------------------------------------
 // coordinate conversions and transforms
 // ----------------------------------------------------------------------------