- child = node->GetData();
- if (child == NULL)
- continue;
- if (child == m_vScrollBar)
- continue;
- if (child == m_hScrollBar)
- continue;
- if (child->IsTopLevel())
- continue;
- if (!child->IsShown())
- continue;
-
- // only draw those in the update region (add a safety margin of 10 pixels for shadow effects
-
- child->GetPosition( &x, &y );
- child->GetSize( &w, &h );
- Rect childRect = { y , x , y + h , x + w } ;
- OffsetRect( &childRect , clientOrigin.x , clientOrigin.y ) ;
- InsetRect( &childRect , -10 , -10) ;
-
- if ( RectInRgn( &childRect , updatergn ) )
+ // paint custom borders
+ wxNcPaintEvent eventNc( child->GetId() );
+ eventNc.SetEventObject( child );
+ if ( !child->HandleWindowEvent( eventNc ) )