X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca5e9f677ade66873a9abb63cffa8ad769fa5da1..50c319beec2454b4f669b6c8cf3d089f53c979f6:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a3ee4e93e1..68cf6d87c2 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -108,9 +108,9 @@ END_EVENT_TABLE() // Find an item given the MS Windows id wxWindow *wxWindow::FindItem(int id) const { - if (!GetChildren()) - return NULL; - wxNode *current = GetChildren()->First(); +// if (!GetChildren()) +// return NULL; + wxNode *current = GetChildren().First(); while (current) { wxWindow *childWin = (wxWindow *)current->Data(); @@ -139,9 +139,9 @@ wxWindow *wxWindow::FindItem(int id) const // Find an item given the MS Windows handle wxWindow *wxWindow::FindItemByHWND(WXHWND hWnd, bool controlOnly) const { - if (!GetChildren()) - return NULL; - wxNode *current = GetChildren()->First(); +// if (!GetChildren()) +// return NULL; + wxNode *current = GetChildren().First(); while (current) { wxObject *obj = (wxObject *)current->Data() ; @@ -1594,7 +1594,7 @@ long wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam) { // Rely on MSWNotify to check whether the message // belongs to the window or not - wxNode *node = GetChildren()->First(); + wxNode *node = GetChildren().First(); while (node) { wxWindow *child = (wxWindow *)node->Data(); @@ -1818,7 +1818,7 @@ long wxWindow::MSWOnQueryNewPalette() // 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 @@ -3493,7 +3493,7 @@ bool wxWindow::IsEnabled(void) 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(); @@ -3513,7 +3513,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(); @@ -3529,7 +3529,7 @@ bool wxWindow::TransferDataFromWindow() bool wxWindow::Validate() { - wxNode *node = GetChildren()->First(); + wxNode *node = GetChildren().First(); while ( node ) { wxWindow *child = (wxWindow *)node->Data(); @@ -3556,30 +3556,28 @@ 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); +// if (GetChildren()) + 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) @@ -3794,7 +3792,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(); @@ -3839,7 +3837,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(); @@ -3898,7 +3896,7 @@ void wxWindow::SetConstraintSizes(bool recurse) if (recurse) { - wxNode *node = GetChildren()->First(); + wxNode *node = GetChildren().First(); while (node) { wxWindow *win = (wxWindow *)node->Data(); @@ -4036,9 +4034,9 @@ bool wxWindow::Close(bool force) wxObject* wxWindow::GetChild(int number) const { // Return a pointer to the Nth object in the Panel - if (!GetChildren()) - return(NULL) ; - wxNode *node = GetChildren()->First(); +// if (!GetChildren()) +// return(NULL) ; + wxNode *node = GetChildren().First(); int n = number; while (node && n--) node = node->Next() ; @@ -4100,7 +4098,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(); @@ -4133,7 +4131,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(); @@ -4150,7 +4148,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();