scroll of subwindow confined to rect param

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-02-08 11:07:23 +00:00
parent f8e089e0c5
commit 00f5539438
2 changed files with 20 additions and 2 deletions

View File

@@ -1278,8 +1278,17 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
child->GetPosition( &x, &y ); child->GetPosition( &x, &y );
int w,h; int w,h;
child->GetSize( &w, &h ); child->GetSize( &w, &h );
if (rect)
{
wxRect rc(x,y,w,h);
if (rect->Intersects(rc))
child->SetSize( x+dx, y+dy, w, h ); child->SetSize( x+dx, y+dy, w, h );
} }
else
{
child->SetSize( x+dx, y+dy, w, h );
}
}
Update() ; Update() ;

View File

@@ -1278,8 +1278,17 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
child->GetPosition( &x, &y ); child->GetPosition( &x, &y );
int w,h; int w,h;
child->GetSize( &w, &h ); child->GetSize( &w, &h );
if (rect)
{
wxRect rc(x,y,w,h);
if (rect->Intersects(rc))
child->SetSize( x+dx, y+dy, w, h ); child->SetSize( x+dx, y+dy, w, h );
} }
else
{
child->SetSize( x+dx, y+dy, w, h );
}
}
Update() ; Update() ;