{
wxClientDC dc(this) ;
wxMacPortSetter helper(&dc) ;
-
+/*
+ Rect r = { 0 , 0 , 32000 , 32000 } ;
+ ClipRect( &r ) ;
+*/
int x = 0 , y = 0;
- GetParent()->MacWindowToRootWindow( &x,&y ) ;
+ wxWindow *parent = GetParent() ;
+ parent->MacWindowToRootWindow( &x,&y ) ;
RgnHandle clrgn = NewRgn() ;
- CopyRgn( (RgnHandle) GetParent()->MacGetVisibleRegion().GetWXHRGN() , clrgn ) ;
+ RgnHandle insidergn = NewRgn() ;
+ wxSize size = parent->GetSize() ;
+ SetRectRgn( insidergn , parent->MacGetLeftBorderSize() , parent->MacGetTopBorderSize() ,
+ size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
+ size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+
+ CopyRgn( (RgnHandle) parent->MacGetVisibleRegion(false).GetWXHRGN() , clrgn ) ;
+ SectRgn( clrgn , insidergn , clrgn ) ;
OffsetRgn( clrgn , x , y ) ;
SetClip( clrgn ) ;
+ DisposeRgn( clrgn ) ;
+ DisposeRgn( insidergn ) ;
wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
UMADrawControl( (ControlHandle) m_macControl ) ;
{
wxPaintDC dc(this) ;
wxMacPortSetter helper(&dc) ;
+/*
+ Rect r = { 0 , 0 , 32000 , 32000 } ;
+ ClipRect( &r ) ;
+*/
int x = 0 , y = 0;
- GetParent()->MacWindowToRootWindow( &x,&y ) ;
+ wxWindow *parent = GetParent() ;
+ parent->MacWindowToRootWindow( &x,&y ) ;
RgnHandle clrgn = NewRgn() ;
- CopyRgn( (RgnHandle) GetParent()->MacGetVisibleRegion().GetWXHRGN() , clrgn ) ;
+ RgnHandle insidergn = NewRgn() ;
+ wxSize size = parent->GetSize() ;
+ SetRectRgn( insidergn , parent->MacGetLeftBorderSize() , parent->MacGetTopBorderSize() ,
+ size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
+ size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+
+ CopyRgn( (RgnHandle) parent->MacGetVisibleRegion(false).GetWXHRGN() , clrgn ) ;
+ SectRgn( clrgn , insidergn , clrgn ) ;
OffsetRgn( clrgn , x , y ) ;
SetClip( clrgn ) ;
+ DisposeRgn( clrgn ) ;
+ DisposeRgn( insidergn ) ;
wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
UMADrawControl( (ControlHandle) m_macControl ) ;
x = y = 0 ;
parent->MacWindowToRootWindow( &x, &y ) ;
MacRootWindowToWindow( &x , &y ) ;
- SetRectRgn( tempRgn , x , y , x + size.x , y + size.y ) ;
+
+ SetRectRgn( tempRgn ,
+ x + parent->MacGetLeftBorderSize() , y + parent->MacGetTopBorderSize() ,
+ x + size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
+ y + size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+
SectRgn( visRgn , tempRgn , visRgn ) ;
if ( parent->IsTopLevel() )
break ;
{
wxClientDC dc(this) ;
wxMacPortSetter helper(&dc) ;
-
+/*
+ Rect r = { 0 , 0 , 32000 , 32000 } ;
+ ClipRect( &r ) ;
+*/
int x = 0 , y = 0;
- GetParent()->MacWindowToRootWindow( &x,&y ) ;
+ wxWindow *parent = GetParent() ;
+ parent->MacWindowToRootWindow( &x,&y ) ;
RgnHandle clrgn = NewRgn() ;
- CopyRgn( (RgnHandle) GetParent()->MacGetVisibleRegion().GetWXHRGN() , clrgn ) ;
+ RgnHandle insidergn = NewRgn() ;
+ wxSize size = parent->GetSize() ;
+ SetRectRgn( insidergn , parent->MacGetLeftBorderSize() , parent->MacGetTopBorderSize() ,
+ size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
+ size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+
+ CopyRgn( (RgnHandle) parent->MacGetVisibleRegion(false).GetWXHRGN() , clrgn ) ;
+ SectRgn( clrgn , insidergn , clrgn ) ;
OffsetRgn( clrgn , x , y ) ;
SetClip( clrgn ) ;
+ DisposeRgn( clrgn ) ;
+ DisposeRgn( insidergn ) ;
wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
UMADrawControl( (ControlHandle) m_macControl ) ;
{
wxPaintDC dc(this) ;
wxMacPortSetter helper(&dc) ;
+/*
+ Rect r = { 0 , 0 , 32000 , 32000 } ;
+ ClipRect( &r ) ;
+*/
int x = 0 , y = 0;
- GetParent()->MacWindowToRootWindow( &x,&y ) ;
+ wxWindow *parent = GetParent() ;
+ parent->MacWindowToRootWindow( &x,&y ) ;
RgnHandle clrgn = NewRgn() ;
- CopyRgn( (RgnHandle) GetParent()->MacGetVisibleRegion().GetWXHRGN() , clrgn ) ;
+ RgnHandle insidergn = NewRgn() ;
+ wxSize size = parent->GetSize() ;
+ SetRectRgn( insidergn , parent->MacGetLeftBorderSize() , parent->MacGetTopBorderSize() ,
+ size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
+ size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+
+ CopyRgn( (RgnHandle) parent->MacGetVisibleRegion(false).GetWXHRGN() , clrgn ) ;
+ SectRgn( clrgn , insidergn , clrgn ) ;
OffsetRgn( clrgn , x , y ) ;
SetClip( clrgn ) ;
+ DisposeRgn( clrgn ) ;
+ DisposeRgn( insidergn ) ;
wxDC::MacSetupBackgroundForCurrentPort( MacGetBackgroundBrush() ) ;
UMADrawControl( (ControlHandle) m_macControl ) ;
x = y = 0 ;
parent->MacWindowToRootWindow( &x, &y ) ;
MacRootWindowToWindow( &x , &y ) ;
- SetRectRgn( tempRgn , x , y , x + size.x , y + size.y ) ;
+
+ SetRectRgn( tempRgn ,
+ x + parent->MacGetLeftBorderSize() , y + parent->MacGetTopBorderSize() ,
+ x + size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
+ y + size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+
SectRgn( visRgn , tempRgn , visRgn ) ;
if ( parent->IsTopLevel() )
break ;