git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14399
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
{
+ // use native scrolling when available and do it in generic way
+ // otherwise:
- wxWindowX11::ScrollWindow( dx, dy, rect );
+ wxWindowNative::ScrollWindow(dx, dy, rect);
Refresh(TRUE /* erase bkgnd */, &r);
}
Refresh(TRUE /* erase bkgnd */, &r);
}
+ // scroll children accordingly:
+ wxPoint offset(dx, dy);
+
+ for (wxWindowList::Node *node = GetChildren().GetFirst();
+ node; node = node->GetNext())
+ {
+ wxWindow *child = node->GetData();
+ if ( child != m_scrollbarVert && child != m_scrollbarHorz &&
+ (rect == NULL || rect->Intersects(child->GetRect())) )
+ {
+ child->Move(child->GetPosition() + offset);
+ }
+ }