Added child window scrolling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1246,6 +1246,20 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
|
|||||||
InvalWindowRgn( GetMacRootWindow() , updateRgn ) ;
|
InvalWindowRgn( GetMacRootWindow() , updateRgn ) ;
|
||||||
DisposeRgn( updateRgn ) ;
|
DisposeRgn( updateRgn ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (wxNode *node = GetChildren().First(); node; node = node->Next())
|
||||||
|
{
|
||||||
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
if (child == m_vScrollBar) continue;
|
||||||
|
if (child == m_hScrollBar) continue;
|
||||||
|
if (child->IsTopLevel()) continue;
|
||||||
|
int x,y;
|
||||||
|
child->GetPosition( &x, &y );
|
||||||
|
int w,h;
|
||||||
|
child->GetSize( &w, &h );
|
||||||
|
child->SetSize( x+dx, y+dy, w, h );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::MacOnScroll(wxScrollEvent &event )
|
void wxWindow::MacOnScroll(wxScrollEvent &event )
|
||||||
@@ -1741,6 +1755,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
|
|||||||
RgnHandle newupdate = NewRgn() ;
|
RgnHandle newupdate = NewRgn() ;
|
||||||
wxSize point = GetClientSize() ;
|
wxSize point = GetClientSize() ;
|
||||||
wxPoint origin = GetClientAreaOrigin() ;
|
wxPoint origin = GetClientAreaOrigin() ;
|
||||||
|
|
||||||
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
||||||
SectRgn( newupdate , m_macUpdateRgn , newupdate ) ;
|
SectRgn( newupdate , m_macUpdateRgn , newupdate ) ;
|
||||||
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
|
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
|
||||||
@@ -1754,9 +1769,6 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
|
|||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RgnHandle childupdate = NewRgn() ;
|
RgnHandle childupdate = NewRgn() ;
|
||||||
|
@@ -1246,6 +1246,20 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
|
|||||||
InvalWindowRgn( GetMacRootWindow() , updateRgn ) ;
|
InvalWindowRgn( GetMacRootWindow() , updateRgn ) ;
|
||||||
DisposeRgn( updateRgn ) ;
|
DisposeRgn( updateRgn ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (wxNode *node = GetChildren().First(); node; node = node->Next())
|
||||||
|
{
|
||||||
|
wxWindow *child = (wxWindow*)node->Data();
|
||||||
|
if (child == m_vScrollBar) continue;
|
||||||
|
if (child == m_hScrollBar) continue;
|
||||||
|
if (child->IsTopLevel()) continue;
|
||||||
|
int x,y;
|
||||||
|
child->GetPosition( &x, &y );
|
||||||
|
int w,h;
|
||||||
|
child->GetSize( &w, &h );
|
||||||
|
child->SetSize( x+dx, y+dy, w, h );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::MacOnScroll(wxScrollEvent &event )
|
void wxWindow::MacOnScroll(wxScrollEvent &event )
|
||||||
@@ -1741,6 +1755,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
|
|||||||
RgnHandle newupdate = NewRgn() ;
|
RgnHandle newupdate = NewRgn() ;
|
||||||
wxSize point = GetClientSize() ;
|
wxSize point = GetClientSize() ;
|
||||||
wxPoint origin = GetClientAreaOrigin() ;
|
wxPoint origin = GetClientAreaOrigin() ;
|
||||||
|
|
||||||
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
||||||
SectRgn( newupdate , m_macUpdateRgn , newupdate ) ;
|
SectRgn( newupdate , m_macUpdateRgn , newupdate ) ;
|
||||||
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
|
OffsetRgn( newupdate , -origin.x , -origin.y ) ;
|
||||||
@@ -1754,9 +1769,6 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
|
|||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RgnHandle childupdate = NewRgn() ;
|
RgnHandle childupdate = NewRgn() ;
|
||||||
|
Reference in New Issue
Block a user