From 1ceb4f4d19bc45746028f757527b52542b303660 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 8 Jan 2007 23:10:39 +0000 Subject: [PATCH] Minor tweaks to get up to date with wx CVS git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/docs/CHANGES.txt | 19 ++++++ wxPython/src/_picker.i | 2 + wxPython/src/_taskbar.i | 2 + wxPython/src/_treectrl.i | 9 +++ wxPython/src/gtk/_controls.py | 12 ++++ wxPython/src/gtk/_controls_wrap.cpp | 101 ++++++++++++++++++++++++++++ wxPython/src/gtk/_windows.py | 2 + wxPython/src/gtk/_windows_wrap.cpp | 1 + wxPython/src/mac/_controls.py | 12 ++++ wxPython/src/mac/_controls_wrap.cpp | 101 ++++++++++++++++++++++++++++ wxPython/src/mac/_windows.py | 2 + wxPython/src/mac/_windows_wrap.cpp | 1 + wxPython/src/msw/_controls.py | 12 ++++ wxPython/src/msw/_controls_wrap.cpp | 101 ++++++++++++++++++++++++++++ wxPython/src/msw/_windows.py | 2 + wxPython/src/msw/_windows_wrap.cpp | 1 + 16 files changed, 380 insertions(+) diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 7f16793927..b4bb8f235c 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -1,6 +1,25 @@ Recent Changes for wxPython ===================================================================== +2.8.1.0 +------- +* + +Added EVT_TASKBAR_CLICK and use it to show taskbar icon menu on right +button release, not press, under MSW (bug 1623761) + +Added wxTreeCtrl::CollapseAll[Children]() and IsEmpty() methods; +documented wxTreeItemId (patch 1622125) + +Fix wxMDIChidFrame::GetPosition() (patch 1626610) + +Fix attribute memory leak in wxGrid::ShowCellEditControl() (patch +1629949) + + + + + 2.8.0.2 ------- * 6-Jan-2007 diff --git a/wxPython/src/_picker.i b/wxPython/src/_picker.i index 88e616e403..3d1384ca96 100644 --- a/wxPython/src/_picker.i +++ b/wxPython/src/_picker.i @@ -153,6 +153,7 @@ clicked. Native implementations may differ but this is usually a " Window Styles ------------- + ====================== ============================================ wx.CLRP_DEFAULT Default style. wx.CLRP_USE_TEXTCTRL Creates a text control to the left of the @@ -168,6 +169,7 @@ Window Styles Events ------ + ======================== ========================================== EVT_COLOURPICKER_CHANGED The user changed the colour selected in the control either using the button or using the diff --git a/wxPython/src/_taskbar.i b/wxPython/src/_taskbar.i index f0f110698f..8bde975e47 100644 --- a/wxPython/src/_taskbar.i +++ b/wxPython/src/_taskbar.i @@ -143,6 +143,7 @@ public: %constant wxEventType wxEVT_TASKBAR_RIGHT_UP; %constant wxEventType wxEVT_TASKBAR_LEFT_DCLICK; %constant wxEventType wxEVT_TASKBAR_RIGHT_DCLICK; +%constant wxEventType wxEVT_TASKBAR_CLICK; %pythoncode { @@ -153,6 +154,7 @@ EVT_TASKBAR_RIGHT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DOWN ) EVT_TASKBAR_RIGHT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_UP ) EVT_TASKBAR_LEFT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DCLICK ) EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) +EVT_TASKBAR_CLICK = wx.PyEventBinder ( wxEVT_TASKBAR_CLICK ) } //--------------------------------------------------------------------------- diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index b50cb86f8c..d992e451b6 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -516,6 +516,9 @@ public: // is item text in bold font? bool IsBold(const wxTreeItemId& item) const; + // is the control empty? + bool IsEmpty() const; + // if 'recursively' is False, only immediate children count, otherwise // the returned number is the number of all items in this branch @@ -673,6 +676,12 @@ public: // collapse the item without removing its children void Collapse(const wxTreeItemId& item); + // collapse the item and all its childs and thats childs + void CollapseAllChildren(const wxTreeItemId& item); + + // collapse all items + void CollapseAll(); + // collapse the item and remove all children void CollapseAndReset(const wxTreeItemId& item); diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 4faab448cd..6dab20c33b 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -5326,6 +5326,10 @@ class TreeCtrl(_core.Control): """IsBold(self, TreeItemId item) -> bool""" return _controls_.TreeCtrl_IsBold(*args, **kwargs) + def IsEmpty(*args, **kwargs): + """IsEmpty(self) -> bool""" + return _controls_.TreeCtrl_IsEmpty(*args, **kwargs) + def GetChildrenCount(*args, **kwargs): """GetChildrenCount(self, TreeItemId item, bool recursively=True) -> size_t""" return _controls_.TreeCtrl_GetChildrenCount(*args, **kwargs) @@ -5438,6 +5442,14 @@ class TreeCtrl(_core.Control): """Collapse(self, TreeItemId item)""" return _controls_.TreeCtrl_Collapse(*args, **kwargs) + def CollapseAllChildren(*args, **kwargs): + """CollapseAllChildren(self, TreeItemId item)""" + return _controls_.TreeCtrl_CollapseAllChildren(*args, **kwargs) + + def CollapseAll(*args, **kwargs): + """CollapseAll(self)""" + return _controls_.TreeCtrl_CollapseAll(*args, **kwargs) + def CollapseAndReset(*args, **kwargs): """CollapseAndReset(self, TreeItemId item)""" return _controls_.TreeCtrl_CollapseAndReset(*args, **kwargs) diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index c5533bdb1b..e0479c2ba9 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -35575,6 +35575,36 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_IsEmpty" "', expected argument " "1"" of type '" "wxPyTreeCtrl const *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPyTreeCtrl const *)arg1)->IsEmpty(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -36796,6 +36826,74 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAllChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + wxTreeItemId *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_CollapseAllChildren",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxTreeItemId, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + arg2 = reinterpret_cast< wxTreeItemId * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CollapseAllChildren((wxTreeItemId const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_CollapseAll" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CollapseAll(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAndReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -47500,6 +47598,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_IsExpanded", (PyCFunction) _wrap_TreeCtrl_IsExpanded, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_IsSelected", (PyCFunction) _wrap_TreeCtrl_IsSelected, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_IsBold", (PyCFunction) _wrap_TreeCtrl_IsBold, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_IsEmpty", (PyCFunction)_wrap_TreeCtrl_IsEmpty, METH_O, NULL}, { (char *)"TreeCtrl_GetChildrenCount", (PyCFunction) _wrap_TreeCtrl_GetChildrenCount, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_GetRootItem", (PyCFunction)_wrap_TreeCtrl_GetRootItem, METH_O, NULL}, { (char *)"TreeCtrl_GetSelection", (PyCFunction)_wrap_TreeCtrl_GetSelection, METH_O, NULL}, @@ -47525,6 +47624,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_ExpandAllChildren", (PyCFunction) _wrap_TreeCtrl_ExpandAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_ExpandAll", (PyCFunction)_wrap_TreeCtrl_ExpandAll, METH_O, NULL}, { (char *)"TreeCtrl_Collapse", (PyCFunction) _wrap_TreeCtrl_Collapse, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_CollapseAllChildren", (PyCFunction) _wrap_TreeCtrl_CollapseAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_CollapseAll", (PyCFunction)_wrap_TreeCtrl_CollapseAll, METH_O, NULL}, { (char *)"TreeCtrl_CollapseAndReset", (PyCFunction) _wrap_TreeCtrl_CollapseAndReset, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Toggle", (PyCFunction) _wrap_TreeCtrl_Toggle, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Unselect", (PyCFunction)_wrap_TreeCtrl_Unselect, METH_O, NULL}, diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index 0a8042fbd7..275d841160 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -2176,6 +2176,7 @@ wxEVT_TASKBAR_RIGHT_DOWN = _windows_.wxEVT_TASKBAR_RIGHT_DOWN wxEVT_TASKBAR_RIGHT_UP = _windows_.wxEVT_TASKBAR_RIGHT_UP wxEVT_TASKBAR_LEFT_DCLICK = _windows_.wxEVT_TASKBAR_LEFT_DCLICK wxEVT_TASKBAR_RIGHT_DCLICK = _windows_.wxEVT_TASKBAR_RIGHT_DCLICK +wxEVT_TASKBAR_CLICK = _windows_.wxEVT_TASKBAR_CLICK EVT_TASKBAR_MOVE = wx.PyEventBinder ( wxEVT_TASKBAR_MOVE ) EVT_TASKBAR_LEFT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DOWN ) EVT_TASKBAR_LEFT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_UP ) @@ -2183,6 +2184,7 @@ EVT_TASKBAR_RIGHT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DOWN ) EVT_TASKBAR_RIGHT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_UP ) EVT_TASKBAR_LEFT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DCLICK ) EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) +EVT_TASKBAR_CLICK = wx.PyEventBinder ( wxEVT_TASKBAR_CLICK ) #--------------------------------------------------------------------------- diff --git a/wxPython/src/gtk/_windows_wrap.cpp b/wxPython/src/gtk/_windows_wrap.cpp index 3f281a6a88..16fe704ec8 100644 --- a/wxPython/src/gtk/_windows_wrap.cpp +++ b/wxPython/src/gtk/_windows_wrap.cpp @@ -34967,6 +34967,7 @@ SWIGEXPORT void SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_UP", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_UP)); PyDict_SetItemString(d, "wxEVT_TASKBAR_LEFT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_LEFT_DCLICK)); PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_DCLICK)); + PyDict_SetItemString(d, "wxEVT_TASKBAR_CLICK", PyInt_FromLong(wxEVT_TASKBAR_CLICK)); SWIG_addvarlink(SWIG_globals(),(char*)"FileSelectorPromptStr",FileSelectorPromptStr_get, FileSelectorPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"DirSelectorPromptStr",DirSelectorPromptStr_get, DirSelectorPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"DirDialogNameStr",DirDialogNameStr_get, DirDialogNameStr_set); diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index cfad5cc0ba..4e71ef1984 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -5319,6 +5319,10 @@ class TreeCtrl(_core.Control): """IsBold(self, TreeItemId item) -> bool""" return _controls_.TreeCtrl_IsBold(*args, **kwargs) + def IsEmpty(*args, **kwargs): + """IsEmpty(self) -> bool""" + return _controls_.TreeCtrl_IsEmpty(*args, **kwargs) + def GetChildrenCount(*args, **kwargs): """GetChildrenCount(self, TreeItemId item, bool recursively=True) -> size_t""" return _controls_.TreeCtrl_GetChildrenCount(*args, **kwargs) @@ -5431,6 +5435,14 @@ class TreeCtrl(_core.Control): """Collapse(self, TreeItemId item)""" return _controls_.TreeCtrl_Collapse(*args, **kwargs) + def CollapseAllChildren(*args, **kwargs): + """CollapseAllChildren(self, TreeItemId item)""" + return _controls_.TreeCtrl_CollapseAllChildren(*args, **kwargs) + + def CollapseAll(*args, **kwargs): + """CollapseAll(self)""" + return _controls_.TreeCtrl_CollapseAll(*args, **kwargs) + def CollapseAndReset(*args, **kwargs): """CollapseAndReset(self, TreeItemId item)""" return _controls_.TreeCtrl_CollapseAndReset(*args, **kwargs) diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index a9754f1170..7a58693669 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -35502,6 +35502,36 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_IsEmpty" "', expected argument " "1"" of type '" "wxPyTreeCtrl const *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPyTreeCtrl const *)arg1)->IsEmpty(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -36723,6 +36753,74 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAllChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + wxTreeItemId *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_CollapseAllChildren",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxTreeItemId, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + arg2 = reinterpret_cast< wxTreeItemId * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CollapseAllChildren((wxTreeItemId const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_CollapseAll" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CollapseAll(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAndReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -47425,6 +47523,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_IsExpanded", (PyCFunction) _wrap_TreeCtrl_IsExpanded, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_IsSelected", (PyCFunction) _wrap_TreeCtrl_IsSelected, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_IsBold", (PyCFunction) _wrap_TreeCtrl_IsBold, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_IsEmpty", (PyCFunction)_wrap_TreeCtrl_IsEmpty, METH_O, NULL}, { (char *)"TreeCtrl_GetChildrenCount", (PyCFunction) _wrap_TreeCtrl_GetChildrenCount, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_GetRootItem", (PyCFunction)_wrap_TreeCtrl_GetRootItem, METH_O, NULL}, { (char *)"TreeCtrl_GetSelection", (PyCFunction)_wrap_TreeCtrl_GetSelection, METH_O, NULL}, @@ -47450,6 +47549,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_ExpandAllChildren", (PyCFunction) _wrap_TreeCtrl_ExpandAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_ExpandAll", (PyCFunction)_wrap_TreeCtrl_ExpandAll, METH_O, NULL}, { (char *)"TreeCtrl_Collapse", (PyCFunction) _wrap_TreeCtrl_Collapse, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_CollapseAllChildren", (PyCFunction) _wrap_TreeCtrl_CollapseAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_CollapseAll", (PyCFunction)_wrap_TreeCtrl_CollapseAll, METH_O, NULL}, { (char *)"TreeCtrl_CollapseAndReset", (PyCFunction) _wrap_TreeCtrl_CollapseAndReset, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Toggle", (PyCFunction) _wrap_TreeCtrl_Toggle, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Unselect", (PyCFunction)_wrap_TreeCtrl_Unselect, METH_O, NULL}, diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index 6889b3be2a..c566783951 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -2156,6 +2156,7 @@ wxEVT_TASKBAR_RIGHT_DOWN = _windows_.wxEVT_TASKBAR_RIGHT_DOWN wxEVT_TASKBAR_RIGHT_UP = _windows_.wxEVT_TASKBAR_RIGHT_UP wxEVT_TASKBAR_LEFT_DCLICK = _windows_.wxEVT_TASKBAR_LEFT_DCLICK wxEVT_TASKBAR_RIGHT_DCLICK = _windows_.wxEVT_TASKBAR_RIGHT_DCLICK +wxEVT_TASKBAR_CLICK = _windows_.wxEVT_TASKBAR_CLICK EVT_TASKBAR_MOVE = wx.PyEventBinder ( wxEVT_TASKBAR_MOVE ) EVT_TASKBAR_LEFT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DOWN ) EVT_TASKBAR_LEFT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_UP ) @@ -2163,6 +2164,7 @@ EVT_TASKBAR_RIGHT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DOWN ) EVT_TASKBAR_RIGHT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_UP ) EVT_TASKBAR_LEFT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DCLICK ) EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) +EVT_TASKBAR_CLICK = wx.PyEventBinder ( wxEVT_TASKBAR_CLICK ) #--------------------------------------------------------------------------- diff --git a/wxPython/src/mac/_windows_wrap.cpp b/wxPython/src/mac/_windows_wrap.cpp index 66ddcffbb4..301920c5e6 100644 --- a/wxPython/src/mac/_windows_wrap.cpp +++ b/wxPython/src/mac/_windows_wrap.cpp @@ -34828,6 +34828,7 @@ SWIGEXPORT void SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_UP", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_UP)); PyDict_SetItemString(d, "wxEVT_TASKBAR_LEFT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_LEFT_DCLICK)); PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_DCLICK)); + PyDict_SetItemString(d, "wxEVT_TASKBAR_CLICK", PyInt_FromLong(wxEVT_TASKBAR_CLICK)); SWIG_addvarlink(SWIG_globals(),(char*)"FileSelectorPromptStr",FileSelectorPromptStr_get, FileSelectorPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"DirSelectorPromptStr",DirSelectorPromptStr_get, DirSelectorPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"DirDialogNameStr",DirDialogNameStr_get, DirDialogNameStr_set); diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index bda432b95e..e0d49fa855 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -5333,6 +5333,10 @@ class TreeCtrl(_core.Control): """IsBold(self, TreeItemId item) -> bool""" return _controls_.TreeCtrl_IsBold(*args, **kwargs) + def IsEmpty(*args, **kwargs): + """IsEmpty(self) -> bool""" + return _controls_.TreeCtrl_IsEmpty(*args, **kwargs) + def GetChildrenCount(*args, **kwargs): """GetChildrenCount(self, TreeItemId item, bool recursively=True) -> size_t""" return _controls_.TreeCtrl_GetChildrenCount(*args, **kwargs) @@ -5445,6 +5449,14 @@ class TreeCtrl(_core.Control): """Collapse(self, TreeItemId item)""" return _controls_.TreeCtrl_Collapse(*args, **kwargs) + def CollapseAllChildren(*args, **kwargs): + """CollapseAllChildren(self, TreeItemId item)""" + return _controls_.TreeCtrl_CollapseAllChildren(*args, **kwargs) + + def CollapseAll(*args, **kwargs): + """CollapseAll(self)""" + return _controls_.TreeCtrl_CollapseAll(*args, **kwargs) + def CollapseAndReset(*args, **kwargs): """CollapseAndReset(self, TreeItemId item)""" return _controls_.TreeCtrl_CollapseAndReset(*args, **kwargs) diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index 3f2c1d706a..fe413e8179 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -35643,6 +35643,36 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_IsEmpty" "', expected argument " "1"" of type '" "wxPyTreeCtrl const *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPyTreeCtrl const *)arg1)->IsEmpty(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -36864,6 +36894,74 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAllChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + wxTreeItemId *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_CollapseAllChildren",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxTreeItemId, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TreeCtrl_CollapseAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + arg2 = reinterpret_cast< wxTreeItemId * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CollapseAllChildren((wxTreeItemId const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_CollapseAll" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->CollapseAll(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_CollapseAndReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -47714,6 +47812,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_IsExpanded", (PyCFunction) _wrap_TreeCtrl_IsExpanded, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_IsSelected", (PyCFunction) _wrap_TreeCtrl_IsSelected, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_IsBold", (PyCFunction) _wrap_TreeCtrl_IsBold, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_IsEmpty", (PyCFunction)_wrap_TreeCtrl_IsEmpty, METH_O, NULL}, { (char *)"TreeCtrl_GetChildrenCount", (PyCFunction) _wrap_TreeCtrl_GetChildrenCount, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_GetRootItem", (PyCFunction)_wrap_TreeCtrl_GetRootItem, METH_O, NULL}, { (char *)"TreeCtrl_GetSelection", (PyCFunction)_wrap_TreeCtrl_GetSelection, METH_O, NULL}, @@ -47739,6 +47838,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_ExpandAllChildren", (PyCFunction) _wrap_TreeCtrl_ExpandAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_ExpandAll", (PyCFunction)_wrap_TreeCtrl_ExpandAll, METH_O, NULL}, { (char *)"TreeCtrl_Collapse", (PyCFunction) _wrap_TreeCtrl_Collapse, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_CollapseAllChildren", (PyCFunction) _wrap_TreeCtrl_CollapseAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_CollapseAll", (PyCFunction)_wrap_TreeCtrl_CollapseAll, METH_O, NULL}, { (char *)"TreeCtrl_CollapseAndReset", (PyCFunction) _wrap_TreeCtrl_CollapseAndReset, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Toggle", (PyCFunction) _wrap_TreeCtrl_Toggle, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Unselect", (PyCFunction)_wrap_TreeCtrl_Unselect, METH_O, NULL}, diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index 83fd5b92c7..353b8cd112 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -2184,6 +2184,7 @@ wxEVT_TASKBAR_RIGHT_DOWN = _windows_.wxEVT_TASKBAR_RIGHT_DOWN wxEVT_TASKBAR_RIGHT_UP = _windows_.wxEVT_TASKBAR_RIGHT_UP wxEVT_TASKBAR_LEFT_DCLICK = _windows_.wxEVT_TASKBAR_LEFT_DCLICK wxEVT_TASKBAR_RIGHT_DCLICK = _windows_.wxEVT_TASKBAR_RIGHT_DCLICK +wxEVT_TASKBAR_CLICK = _windows_.wxEVT_TASKBAR_CLICK EVT_TASKBAR_MOVE = wx.PyEventBinder ( wxEVT_TASKBAR_MOVE ) EVT_TASKBAR_LEFT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DOWN ) EVT_TASKBAR_LEFT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_UP ) @@ -2191,6 +2192,7 @@ EVT_TASKBAR_RIGHT_DOWN = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DOWN ) EVT_TASKBAR_RIGHT_UP = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_UP ) EVT_TASKBAR_LEFT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_LEFT_DCLICK ) EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) +EVT_TASKBAR_CLICK = wx.PyEventBinder ( wxEVT_TASKBAR_CLICK ) #--------------------------------------------------------------------------- diff --git a/wxPython/src/msw/_windows_wrap.cpp b/wxPython/src/msw/_windows_wrap.cpp index 4fc3c48678..fa0f21ca61 100644 --- a/wxPython/src/msw/_windows_wrap.cpp +++ b/wxPython/src/msw/_windows_wrap.cpp @@ -35103,6 +35103,7 @@ SWIGEXPORT void SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_UP", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_UP)); PyDict_SetItemString(d, "wxEVT_TASKBAR_LEFT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_LEFT_DCLICK)); PyDict_SetItemString(d, "wxEVT_TASKBAR_RIGHT_DCLICK", PyInt_FromLong(wxEVT_TASKBAR_RIGHT_DCLICK)); + PyDict_SetItemString(d, "wxEVT_TASKBAR_CLICK", PyInt_FromLong(wxEVT_TASKBAR_CLICK)); SWIG_addvarlink(SWIG_globals(),(char*)"FileSelectorPromptStr",FileSelectorPromptStr_get, FileSelectorPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"DirSelectorPromptStr",DirSelectorPromptStr_get, DirSelectorPromptStr_set); SWIG_addvarlink(SWIG_globals(),(char*)"DirDialogNameStr",DirDialogNameStr_get, DirDialogNameStr_set); -- 2.45.2