Fix error and some warnings - wxTopLevelWindowMac needs toplevel.h, but we only need a plain window - warnings are an unused variable (commented out) and passing floats in place of shorts - and why is this file in wxBase anyway? Oh well...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2005-02-26 10:00:30 +00:00
parent 24d7cbea55
commit 1b5bee64fd

View File

@@ -790,18 +790,18 @@ OSStatus UMAPutScrap( Size size , OSType type , void *data )
Rect* UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds) Rect* UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds)
{ {
wxWindow* win = wxFindControlFromMacControl( theControl ) ; // wxWindow* win = wxFindControlFromMacControl( theControl ) ;
GetControlBounds( theControl , bounds ) ; GetControlBounds( theControl , bounds ) ;
#if TARGET_API_MAC_OSX #if TARGET_API_MAC_OSX
WindowRef tlwref = GetControlOwner( theControl ) ; WindowRef tlwref = GetControlOwner( theControl ) ;
wxTopLevelWindowMac* tlwwx = wxFindWinFromMacWindow( tlwref ) ; wxWindow* tlwwx = (wxWindow*) wxFindWinFromMacWindow( tlwref ) ;
ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ; ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ;
HIPoint hiPoint = CGPointMake( 0 , 0 ) ; HIPoint hiPoint = CGPointMake( 0 , 0 ) ;
HIViewConvertPoint( &hiPoint , HIViewGetSuperview(theControl) , rootControl ) ; HIViewConvertPoint( &hiPoint , HIViewGetSuperview(theControl) , rootControl ) ;
OffsetRect( bounds , hiPoint.x , hiPoint.y ) ; OffsetRect( bounds , (short) (hiPoint.x) , (short) (hiPoint.y) ) ;
#endif #endif
return bounds ; return bounds ;
} }