made static box only a frame region in all calculations (otherwise the background would not be redrawn in all situations)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-01-03 12:29:16 +00:00
parent d4e5272b3a
commit be0b002a3e
2 changed files with 40 additions and 4 deletions

View File

@@ -1639,6 +1639,7 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
{
RgnHandle visRgn = NewRgn() ;
RgnHandle tempRgn = NewRgn() ;
RgnHandle tempStaticBoxRgn = NewRgn() ;
SetRectRgn( visRgn , 0 , 0 , m_width , m_height ) ;
@@ -1648,8 +1649,8 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
int borderTop = 14 ;
int borderOther = 4 ;
SetRectRgn( tempRgn , borderOther , borderTop , m_width - borderOther , m_height - borderOther ) ;
DiffRgn( visRgn , tempRgn , visRgn ) ;
SetRectRgn( tempStaticBoxRgn , borderOther , borderTop , m_width - borderOther , m_height - borderOther ) ;
DiffRgn( visRgn , tempStaticBoxRgn , visRgn ) ;
}
if ( !IsTopLevel() )
@@ -1685,6 +1686,14 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
if ( !child->IsTopLevel() && child->IsShown() )
{
SetRectRgn( tempRgn , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
if ( child->IsKindOf( CLASSINFO( wxStaticBox ) ) )
{
int borderTop = 14 ;
int borderOther = 4 ;
SetRectRgn( tempStaticBoxRgn , child->m_x + borderOther , child->m_y + borderTop , child->m_x + child->m_width - borderOther , child->m_y + child->m_height - borderOther ) ;
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
}
DiffRgn( visRgn , tempRgn , visRgn ) ;
}
}
@@ -1709,6 +1718,14 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
if ( !sibling->IsTopLevel() && sibling->IsShown() )
{
SetRectRgn( tempRgn , sibling->m_x - m_x , sibling->m_y - m_y , sibling->m_x + sibling->m_width - m_x , sibling->m_y + sibling->m_height - m_y ) ;
if ( sibling->IsKindOf( CLASSINFO( wxStaticBox ) ) )
{
int borderTop = 14 ;
int borderOther = 4 ;
SetRectRgn( tempStaticBoxRgn , sibling->m_x - m_x + borderOther , sibling->m_y - m_y + borderTop , sibling->m_x + sibling->m_width - m_x - borderOther , sibling->m_y + sibling->m_height - m_y - borderOther ) ;
DiffRgn( tempRgn , tempStaticBoxRgn , tempRgn ) ;
}
DiffRgn( visRgn , tempRgn , visRgn ) ;
}
}
@@ -1717,6 +1734,7 @@ const wxRegion& wxWindowMac::MacGetVisibleRegion( bool respectChildrenAndSibling
m_macVisibleRegion = visRgn ;
DisposeRgn( visRgn ) ;
DisposeRgn( tempRgn ) ;
DisposeRgn( tempStaticBoxRgn ) ;
return m_macVisibleRegion ;
}