]> git.saurik.com Git - wxWidgets.git/commitdiff
added moving subwindow when scrolling (tested in image.cpp )
authorRobert Roebling <robert@roebling.de>
Mon, 12 Apr 1999 13:47:34 +0000 (13:47 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 12 Apr 1999 13:47:34 +0000 (13:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/image/image.cpp
src/gtk/window.cpp
src/gtk1/window.cpp

index 5f215657ad42391a238214237a3019548a20bfc7..16c2120ba9a4361a9a334d6fd2a03bfa110decef 100644 (file)
@@ -113,6 +113,8 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
   
   image.LoadFile( dir + wxString("test.png"), wxBITMAP_TYPE_PNG );
   my_square = new wxBitmap( image.ConvertToBitmap() );
+  
+  (void)new wxTextCtrl( this, -1, "", wxPoint(10,200), wxSize(120,-1) );
 
   CreateAntiAliasedBitmap();
 }
index 5adc32e77e71c6cc17dac5f68effbe6c15ddc059..ecc4c6101fe42497ad4857e885c066d8d53f4e7b 100644 (file)
@@ -3133,6 +3133,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
 
     wxCHECK_RET( m_wxwindow != NULL, "window needs client area for scrolling" );
 
+    wxNode *node = m_children.First();
+    while (node)
+    {
+        wxWindow *child = (wxWindow*) node->Data();
+       child->Move( child->m_x + dx, child->m_y + dy );
+       node = node->Next();
+    }
+
     int cw = 0;
     int ch = 0;
     GetClientSize( &cw, &ch );
index 5adc32e77e71c6cc17dac5f68effbe6c15ddc059..ecc4c6101fe42497ad4857e885c066d8d53f4e7b 100644 (file)
@@ -3133,6 +3133,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
 
     wxCHECK_RET( m_wxwindow != NULL, "window needs client area for scrolling" );
 
+    wxNode *node = m_children.First();
+    while (node)
+    {
+        wxWindow *child = (wxWindow*) node->Data();
+       child->Move( child->m_x + dx, child->m_y + dy );
+       node = node->Next();
+    }
+
     int cw = 0;
     int ch = 0;
     GetClientSize( &cw, &ch );