- RgnHandle visRgn = NewRgn() ;
- RgnHandle tempRgn = NewRgn() ;
- RgnHandle tempStaticBoxRgn = NewRgn() ;
-
- SetRectRgn( visRgn , 0 , 0 , m_width , m_height ) ;
-
- //TODO : as soon as the new scheme has proven to work correctly, move this to wxStaticBox
- if ( IsKindOf( CLASSINFO( wxStaticBox ) ) )
- {
- int borderTop = 14 ;
- int borderOther = 4 ;
-
- SetRectRgn( tempStaticBoxRgn , borderOther , borderTop , m_width - borderOther , m_height - borderOther ) ;
- DiffRgn( visRgn , tempStaticBoxRgn , visRgn ) ;
- }
-
- if ( !IsTopLevel() )
- {
- wxWindow* parent = GetParent() ;
- while( parent )
- {
- wxSize size = parent->GetSize() ;
- int x , y ;
- x = y = 0 ;
- parent->MacWindowToRootWindow( &x, &y ) ;
- MacRootWindowToWindow( &x , &y ) ;
-
- SetRectRgn( tempRgn ,
- x + parent->MacGetLeftBorderSize() , y + parent->MacGetTopBorderSize() ,
- x + size.x - parent->MacGetRightBorderSize(),
- y + size.y - parent->MacGetBottomBorderSize()) ;
-
- SectRgn( visRgn , tempRgn , visRgn ) ;
- if ( parent->IsTopLevel() )
- break ;
- parent = parent->GetParent() ;
- }
- }
- if ( respectChildrenAndSiblings )
- {
- if ( GetWindowStyle() & wxCLIP_CHILDREN )
- {
- for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext())
- {
- wxWindowMac *child = (wxWindowMac*)node->GetData();
+ RgnHandle visRgn = NewRgn() ;
+ RgnHandle tempRgn = NewRgn() ;
+ RgnHandle tempStaticBoxRgn = NewRgn() ;
+
+ SetRectRgn( visRgn , 0 , 0 , m_width , m_height ) ;
+
+ //TODO : as soon as the new scheme has proven to work correctly, move this to wxStaticBox
+ if ( IsKindOf( CLASSINFO( wxStaticBox ) ) )
+ {
+ int borderTop = 14 ;
+ int borderOther = 4 ;
+
+ SetRectRgn( tempStaticBoxRgn , borderOther , borderTop , m_width - borderOther , m_height - borderOther ) ;
+ DiffRgn( visRgn , tempStaticBoxRgn , visRgn ) ;
+ }