// 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() ;
-#if TARGET_API_MAC_OSX
- // if there is already a pending redraw event, we first must flush that, as we don't have
- // means to retrieve the dirty region of a HIView
- if ( HIViewGetNeedsDisplay( (ControlRef) m_macControl ) )
- Update() ;
-#endif
- {
+ {
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
- HIViewConvertRegion( updateRgn , (ControlRef) MacGetTopLevelWindow()->GetHandle() , (ControlRef) m_macControl ) ;
- HIViewSetNeedsDisplayInRegion( (ControlRef) m_macControl , updateRgn , true ) ;
-#else
- // TODO TEST
#endif
}