From: Robin Dunn Date: Wed, 6 Apr 2005 04:15:36 +0000 (+0000) Subject: Added wx.GetTopLevelWindows() function which returns a copy of the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/791fbf3481006a916c6d941fb037a17e9b9dc507 Added wx.GetTopLevelWindows() function which returns a copy of the list of top-level windows that currently exist in the application. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 4f20b2b888..8ead239ebb 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -79,6 +79,8 @@ affecting the label. wxMSW: Fixed missing EVT_RIGHT_DOWN and EVT_TREE_ITEM_RIGHT_CLICK events in a wx.TreeCtrl. +Added wx.GetTopLevelWindows() function which returns a copy of the +list of top-level windows that currently exist in the application. diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 668b6d5264..8861980054 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -2068,6 +2068,20 @@ wxWindow* wxFindWindowByLabel( const wxString& label, } %} +//--------------------------------------------------------------------------- + +DocStr(GetTopLevelWindows, +"Returns a list of the the application's top-level windows, (frames, +dialogs, etc.) NOTE: Currently this is a copy of the list maintained +by wxWidgets, and so it is only valid as long as no top-level windows +are closed or new top-level windows are created. +", ""); +%inline %{ + PyObject* GetTopLevelWindows() { + return wxPy_ConvertList(&wxTopLevelWindows); + } +%} + //--------------------------------------------------------------------------- //---------------------------------------------------------------------------