// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
{
+
int width , height ;
GetClientSize( &width , &height ) ;
+#if TARGET_API_MAC_OSX
+ HIRect scrollrect = CGRectMake( MacGetLeftBorderSize() , MacGetTopBorderSize() , width , height ) ;
+ if ( rect )
+ {
+ HIRect scrollarea = CGRectMake( rect->x , rect->y , rect->width , rect->height) ;
+ scrollrect = CGRectIntersection( scrollrect , scrollarea ) ;
+ }
+ HIViewScrollRect ( (ControlRef) m_macControl , &scrollrect , dx ,dy ) ;
+#else
wxPoint pos;
pos.x = pos.y = 0;
Rect scrollrect;
RgnHandle updateRgn = NewRgn() ;
- {
+ {
wxClientDC dc(this) ;
wxMacPortSetter helper(&dc) ;
GetControlBounds( (ControlRef) m_macControl, &scrollrect);
-#if TARGET_API_MAC_OSX
- GetParent()->MacWindowToRootWindow( &scrollrect.left , &scrollrect.top ) ;
-#endif
scrollrect.top += MacGetTopBorderSize() ;
scrollrect.left += MacGetLeftBorderSize() ;
scrollrect.bottom = scrollrect.top + height ;
ScrollRect( &scrollrect , dx , dy , updateRgn ) ;
}
// ScrollWindowRect( (WindowRef) MacGetTopLevelWindowRef() , &scrollrect , dx , dy , kScrollWindowInvalidate, updateRgn ) ;
-#if TARGET_API_MAC_OSX
- Rect before,after ;
- GetRegionBounds( updateRgn , &before ) ;
- HIViewConvertRegion( updateRgn , (ControlRef) MacGetTopLevelWindow()->GetHandle() , (ControlRef) m_macControl ) ;
- GetRegionBounds( updateRgn , &after ) ;
- HIViewSetNeedsDisplayInRegion( (ControlRef) m_macControl , updateRgn , true ) ;
-#else
- // TODO TEST
#endif
}
void wxWindowMac::Update()
{
#if TARGET_API_MAC_OSX
- HIViewSetNeedsDisplay( (ControlRef) m_macControl , true ) ;
WindowRef window = (WindowRef)MacGetTopLevelWindowRef() ;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
// for composited windows this also triggers a redraw of all
OSStatus status = noErr ;
status = ReceiveNextEvent( 0 , NULL , kEventDurationNoWait , false , &theEvent ) ;
}
+ else
+ HIViewSetNeedsDisplay( (ControlRef) m_macControl , true ) ;
}
#else
::Draw1Control( (ControlRef) m_macControl ) ;