X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bab6390a9c4b927a0e421f38f22516964c1f345..1eb1eae717bea7942825313db9074529927db482:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 7c16fec3fe..ae8c7e79dc 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -6,7 +6,7 @@ // Created: 29/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998 Julian Smart -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -431,10 +431,10 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt) if (frame->GetToolBar()) extraChildren.Append(frame->GetToolBar()); - wxNode* node = extraChildren.First(); + wxNode* node = extraChildren.GetFirst(); while (node) { - wxWindow* child = (wxWindow*) node->Data(); + wxWindow* child = (wxWindow*) node->GetData(); wxWindow* foundWin = wxFindWindowAtPoint(child, pt); if (foundWin) return foundWin; @@ -443,14 +443,14 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt) } */ - wxNode* node = win->GetChildren().Last(); + wxWindowList::Node *node = win->GetChildren().GetLast(); while (node) { - wxWindow* child = (wxWindow*) node->Data(); + wxWindow* child = node->GetData(); wxWindow* foundWin = wxFindWindowAtPoint(child, pt); if (foundWin) return foundWin; - node = node->Previous(); + node = node->GetPrevious(); } wxPoint pos = win->GetPosition(); @@ -472,14 +472,14 @@ wxWindow* wxGenericFindWindowAtPoint(const wxPoint& pt) // Go backwards through the list since windows // on top are likely to have been appended most // recently. - wxNode* node = wxTopLevelWindows.Last(); + wxWindowList::Node *node = wxTopLevelWindows.GetLast(); while (node) { - wxWindow* win = (wxWindow*) node->Data(); + wxWindow* win = node->GetData(); wxWindow* found = wxFindWindowAtPoint(win, pt); if (found) return found; - node = node->Previous(); + node = node->GetPrevious(); } return NULL; } @@ -801,13 +801,11 @@ wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit) // missing C RTL functions (FIXME shouldn't be here at all) // ---------------------------------------------------------------------------- -#ifdef __MWERKS__ -#if __MSL__ < 0x7000 +#if defined( __MWERKS__ ) && !defined(__MACH__) char *strdup(const char *s) { return strcpy( (char*) malloc( strlen( s ) + 1 ) , s ) ; } -#endif int isascii( int c ) { return ( c >= 0 && c < 128 ) ; @@ -876,7 +874,7 @@ bool wxSafeYield(wxWindow *win, bool onlyIfNeeded) { wxWindowDisabler wd(win); - bool rc + bool rc; if (onlyIfNeeded) rc = wxYieldIfNeeded(); else @@ -1069,6 +1067,7 @@ wxString wxGetCurrentDir() // wxDoExecuteWithCapture() helper: reads an entire stream into one array // // returns TRUE if ok, FALSE if error +#if wxUSE_STREAMS static bool ReadAll(wxInputStream *is, wxArrayString& output) { wxCHECK_MSG( is, FALSE, _T("NULL stream in wxExecute()?") ); @@ -1097,6 +1096,7 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output) return cont; } +#endif // wxUSE_STREAMS // this is a private function because it hasn't a clean interface: the first // array is passed by reference, the second by pointer - instead we have 2