]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stubs/window.cpp
Corrected some typos.
[wxWidgets.git] / src / stubs / window.cpp
index 1d51541d8d0ffd45441d37debcd4f72d1ef60421..10ec3976dd283405badbaea6bddbe998945603a2 100644 (file)
@@ -370,7 +370,7 @@ void wxWindow::GetTextExtent(const wxString& string, int *x, int *y,
     // TODO
 }
 
-void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect)
+void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
 {
     // TODO
 }
@@ -378,7 +378,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRectangle *rect)
 // Responds to colour changes: passes event on to children.
 void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while ( node )
     {
         // Only propagate to non-top-level windows
@@ -534,7 +534,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible,
 }
 
 // Does a physical scroll
-void wxWindow::ScrollWindow(int dx, int dy, const wxRectangle *rect)
+void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
 {
     // TODO
     return;
@@ -583,7 +583,7 @@ bool wxWindow::IsEnabled() const
 // it's an application error (pops up a dialog)
 bool wxWindow::TransferDataToWindow()
 {
-       wxNode *node = GetChildren()->First();
+       wxNode *node = GetChildren().First();
        while ( node )
        {
                wxWindow *child = (wxWindow *)node->Data();
@@ -603,7 +603,7 @@ bool wxWindow::TransferDataToWindow()
 // validation failed: don't quit
 bool wxWindow::TransferDataFromWindow()
 {
-       wxNode *node = GetChildren()->First();
+       wxNode *node = GetChildren().First();
        while ( node )
        {
                wxWindow *child = (wxWindow *)node->Data();
@@ -619,7 +619,7 @@ bool wxWindow::TransferDataFromWindow()
 
 bool wxWindow::Validate()
 {
-       wxNode *node = GetChildren()->First();
+       wxNode *node = GetChildren().First();
        while ( node )
        {
                wxWindow *child = (wxWindow *)node->Data();
@@ -642,30 +642,27 @@ wxWindow *wxWindow::FindFocus()
 
 void wxWindow::AddChild(wxWindow *child)
 {
-    GetChildren()->Append(child);
+    GetChildren().Append(child);
     child->m_windowParent = this;
 }
 
 void wxWindow::RemoveChild(wxWindow *child)
 {
-    if (GetChildren())
-        GetChildren()->DeleteObject(child);
+    GetChildren().DeleteObject(child);
     child->m_windowParent = NULL;
 }
 
 void wxWindow::DestroyChildren()
 {
-  if (GetChildren()) {
     wxNode *node;
-    while ((node = GetChildren()->First()) != (wxNode *)NULL) {
+    while ((node = GetChildren().First()) != (wxNode *)NULL) {
       wxWindow *child;
       if ((child = (wxWindow *)node->Data()) != (wxWindow *)NULL) {
         delete child;
-               if ( GetChildren()->Member(child) )
+               if ( GetChildren().Member(child) )
                        delete node;
       }
     } /* while */
-  }
 }
 
 void wxWindow::MakeModal(bool modal)
@@ -880,7 +877,7 @@ bool wxWindow::DoPhase(int phase)
   {
     noChanges = 0;
     noFailures = 0;
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *child = (wxWindow *)node->Data();
@@ -925,7 +922,7 @@ void wxWindow::ResetConstraints()
     constr->centreX.SetDone(FALSE);
     constr->centreY.SetDone(FALSE);
   }
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   while (node)
   {
     wxWindow *win = (wxWindow *)node->Data();
@@ -984,7 +981,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
 
   if (recurse)
   {
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *win = (wxWindow *)node->Data();
@@ -1121,9 +1118,7 @@ bool wxWindow::Close(bool force)
 wxObject* wxWindow::GetChild(int number) const
 {
   // Return a pointer to the Nth object in the window
-  if (!GetChildren())
-    return(NULL) ;
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   int n = number;
   while (node && n--)
     node = node->Next() ;
@@ -1154,7 +1149,7 @@ void wxWindow::Fit()
 {
        int maxX = 0;
        int maxY = 0;
-       wxNode *node = GetChildren()->First();
+       wxNode *node = GetChildren().First();
        while ( node )
        {
                wxWindow *win = (wxWindow *)node->Data();
@@ -1192,7 +1187,7 @@ wxWindow *wxWindow::FindWindow(long id)
        if ( GetId() == id)
                return this;
 
-       wxNode *node = GetChildren()->First();
+       wxNode *node = GetChildren().First();
        while ( node )
        {
                wxWindow *child = (wxWindow *)node->Data();
@@ -1209,7 +1204,7 @@ wxWindow *wxWindow::FindWindow(const wxString& name)
        if ( GetName() == name)
                return this;
 
-       wxNode *node = GetChildren()->First();
+       wxNode *node = GetChildren().First();
        while ( node )
        {
                wxWindow *child = (wxWindow *)node->Data();