From: Robert Roebling Date: Sat, 5 May 2007 15:09:45 +0000 (+0000) Subject: Moved deprecated code to source file (didn't compile X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cfa87e8121c94814302ad0a94c7c043c8bb277f6 Moved deprecated code to source file (didn't compile as inlined, somehow). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dc.h b/include/wx/dc.h index 1cea5b48af..43e7c585bf 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -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 diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 628b7be0df..d659598d0e 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -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 // ----------------------------------------------------------------------------