From: Robin Dunn Date: Wed, 6 Apr 2005 04:28:28 +0000 (+0000) Subject: reSWIGged X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3215336ed098573ced5295dea1e7efe5405d89b7 reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index 95dfec8ca5..6f0b8c3375 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -5135,7 +5135,7 @@ EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLI EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1) EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1) EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 1) -EVT_COMMAND_TREE_ITEM_MENU = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MENU, 1) +EVT_TREE_ITEM_MENU = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MENU, 1) class TreeEvent(_core.NotifyEvent): """Proxy of C++ TreeEvent class""" diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 15b96cc1d8..156482c38b 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -8277,6 +8277,18 @@ def FindWindowByLabel(*args, **kwargs): def Window_FromHWND(*args, **kwargs): """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" return _core_.Window_FromHWND(*args, **kwargs) + +def GetTopLevelWindows(*args, **kwargs): + """ + GetTopLevelWindows() -> PyObject + + 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. + + """ + return _core_.GetTopLevelWindows(*args, **kwargs) #--------------------------------------------------------------------------- class Validator(EvtHandler): diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 9baf755dce..9e06d29628 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -2766,6 +2766,11 @@ wxWindow* wxFindWindowByLabel( const wxString& label, } + PyObject* GetTopLevelWindows() { + return wxPy_ConvertList(&wxTopLevelWindows); + } + + IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate); IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferToWindow); IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); @@ -32244,6 +32249,28 @@ static PyObject *_wrap_Window_FromHWND(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_GetTopLevelWindows(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + PyObject *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetTopLevelWindows",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (PyObject *)GetTopLevelWindows(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = result; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_new_Validator(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxValidator *result; @@ -46194,6 +46221,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FindWindowByName", (PyCFunction) _wrap_FindWindowByName, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FindWindowByLabel", (PyCFunction) _wrap_FindWindowByLabel, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_FromHWND", (PyCFunction) _wrap_Window_FromHWND, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GetTopLevelWindows", (PyCFunction) _wrap_GetTopLevelWindows, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_Validator", (PyCFunction) _wrap_new_Validator, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Validator_Clone", (PyCFunction) _wrap_Validator_Clone, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Validator_Validate", (PyCFunction) _wrap_Validator_Validate, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 16c781f41a..98c7a4ae63 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -5160,7 +5160,7 @@ EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLI EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1) EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1) EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 1) -EVT_COMMAND_TREE_ITEM_MENU = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MENU, 1) +EVT_TREE_ITEM_MENU = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MENU, 1) class TreeEvent(_core.NotifyEvent): """Proxy of C++ TreeEvent class""" diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index d4fd3fbed8..6fca60e50f 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -8290,6 +8290,18 @@ def FindWindowByLabel(*args, **kwargs): def Window_FromHWND(*args, **kwargs): """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" return _core_.Window_FromHWND(*args, **kwargs) + +def GetTopLevelWindows(*args, **kwargs): + """ + GetTopLevelWindows() -> PyObject + + 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. + + """ + return _core_.GetTopLevelWindows(*args, **kwargs) #--------------------------------------------------------------------------- class Validator(EvtHandler): diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 0937d1e410..48b4e030e9 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -2765,6 +2765,11 @@ wxWindow* wxFindWindowByLabel( const wxString& label, } + PyObject* GetTopLevelWindows() { + return wxPy_ConvertList(&wxTopLevelWindows); + } + + IMP_PYCALLBACK_BOOL_WXWIN(wxPyValidator, wxValidator, Validate); IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferToWindow); IMP_PYCALLBACK_BOOL_(wxPyValidator, wxValidator, TransferFromWindow); @@ -32294,6 +32299,28 @@ static PyObject *_wrap_Window_FromHWND(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_GetTopLevelWindows(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + PyObject *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetTopLevelWindows",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (PyObject *)GetTopLevelWindows(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = result; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_new_Validator(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxValidator *result; @@ -46246,6 +46273,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FindWindowByName", (PyCFunction) _wrap_FindWindowByName, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"FindWindowByLabel", (PyCFunction) _wrap_FindWindowByLabel, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_FromHWND", (PyCFunction) _wrap_Window_FromHWND, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GetTopLevelWindows", (PyCFunction) _wrap_GetTopLevelWindows, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_Validator", (PyCFunction) _wrap_new_Validator, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Validator_Clone", (PyCFunction) _wrap_Validator_Clone, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Validator_Validate", (PyCFunction) _wrap_Validator_Validate, METH_VARARGS | METH_KEYWORDS, NULL},