From 629f3c1beaecfd39e0682da25cf9e670cf038b43 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 28 May 2004 19:20:11 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/msw/gizmos.py | 51 +-- wxPython/contrib/gizmos/msw/gizmos_wrap.cpp | 338 +++++++++++++------- wxPython/contrib/ogl/msw/ogl.py | 6 +- wxPython/src/msw/_core.py | 2 +- 4 files changed, 256 insertions(+), 141 deletions(-) diff --git a/wxPython/contrib/gizmos/msw/gizmos.py b/wxPython/contrib/gizmos/msw/gizmos.py index e6d9599c42..107bedf7d4 100644 --- a/wxPython/contrib/gizmos/msw/gizmos.py +++ b/wxPython/contrib/gizmos/msw/gizmos.py @@ -353,18 +353,27 @@ TL_ALIGN_LEFT = _gizmos.TL_ALIGN_LEFT TL_ALIGN_RIGHT = _gizmos.TL_ALIGN_RIGHT TL_ALIGN_CENTER = _gizmos.TL_ALIGN_CENTER TREE_HITTEST_ONITEMCOLUMN = _gizmos.TREE_HITTEST_ONITEMCOLUMN +TL_SEARCH_VISIBLE = _gizmos.TL_SEARCH_VISIBLE +TL_SEARCH_LEVEL = _gizmos.TL_SEARCH_LEVEL +TL_SEARCH_FULL = _gizmos.TL_SEARCH_FULL +TL_SEARCH_PARTIAL = _gizmos.TL_SEARCH_PARTIAL +TL_SEARCH_NOCASE = _gizmos.TL_SEARCH_NOCASE class TreeListColumnInfo(_core.Object): def __repr__(self): return "<%s.%s; proxy of C++ wxTreeListColumnInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ __init__(self, String text=EmptyString, int image=-1, size_t width=100, - int alignment=TL_ALIGN_LEFT) -> TreeListColumnInfo + bool shown=True, int alignment=TL_ALIGN_LEFT) -> TreeListColumnInfo """ newobj = _gizmos.new_TreeListColumnInfo(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown + def GetShown(*args, **kwargs): + """GetShown(self) -> bool""" + return _gizmos.TreeListColumnInfo_GetShown(*args, **kwargs) + def GetAlignment(*args, **kwargs): """GetAlignment(self) -> int""" return _gizmos.TreeListColumnInfo_GetAlignment(*args, **kwargs) @@ -385,6 +394,10 @@ class TreeListColumnInfo(_core.Object): """GetWidth(self) -> size_t""" return _gizmos.TreeListColumnInfo_GetWidth(*args, **kwargs) + def SetShown(*args, **kwargs): + """SetShown(self, bool shown)""" + return _gizmos.TreeListColumnInfo_SetShown(*args, **kwargs) + def SetAlignment(*args, **kwargs): """SetAlignment(self, int alignment)""" return _gizmos.TreeListColumnInfo_SetAlignment(*args, **kwargs) @@ -456,14 +469,6 @@ class TreeListCtrl(_core.Control): """SetIndent(self, unsigned int indent)""" return _gizmos.TreeListCtrl_SetIndent(*args, **kwargs) - def GetSpacing(*args, **kwargs): - """GetSpacing(self) -> unsigned int""" - return _gizmos.TreeListCtrl_GetSpacing(*args, **kwargs) - - def SetSpacing(*args, **kwargs): - """SetSpacing(self, unsigned int spacing)""" - return _gizmos.TreeListCtrl_SetSpacing(*args, **kwargs) - def GetLineSpacing(*args, **kwargs): """GetLineSpacing(self) -> unsigned int""" return _gizmos.TreeListCtrl_GetLineSpacing(*args, **kwargs) @@ -580,6 +585,14 @@ class TreeListCtrl(_core.Control): """GetColumnImage(self, size_t column) -> int""" return _gizmos.TreeListCtrl_GetColumnImage(*args, **kwargs) + def ShowColumn(*args, **kwargs): + """ShowColumn(self, size_t column, bool shown)""" + return _gizmos.TreeListCtrl_ShowColumn(*args, **kwargs) + + def IsColumnShown(*args, **kwargs): + """IsColumnShown(self, size_t column) -> bool""" + return _gizmos.TreeListCtrl_IsColumnShown(*args, **kwargs) + def GetItemText(*args, **kwargs): """GetItemText(self, TreeItemId item, int column=-1) -> String""" return _gizmos.TreeListCtrl_GetItemText(*args, **kwargs) @@ -623,11 +636,11 @@ class TreeListCtrl(_core.Control): return _gizmos.TreeListCtrl_SetItemBold(*args, **kwargs) def SetItemTextColour(*args, **kwargs): - """SetItemTextColour(self, TreeItemId item, Colour col)""" + """SetItemTextColour(self, TreeItemId item, Colour colour)""" return _gizmos.TreeListCtrl_SetItemTextColour(*args, **kwargs) def SetItemBackgroundColour(*args, **kwargs): - """SetItemBackgroundColour(self, TreeItemId item, Colour col)""" + """SetItemBackgroundColour(self, TreeItemId item, Colour colour)""" return _gizmos.TreeListCtrl_SetItemBackgroundColour(*args, **kwargs) def SetItemFont(*args, **kwargs): @@ -695,7 +708,7 @@ class TreeListCtrl(_core.Control): return _gizmos.TreeListCtrl_GetFirstChild(*args, **kwargs) def GetNextChild(*args, **kwargs): - """GetNextChild(self, TreeItemId item, long cookie) -> PyObject""" + """GetNextChild(self, TreeItemId item, void cookie) -> PyObject""" return _gizmos.TreeListCtrl_GetNextChild(*args, **kwargs) def GetLastChild(*args, **kwargs): @@ -802,6 +815,10 @@ class TreeListCtrl(_core.Control): """SelectItem(self, TreeItemId item, bool unselect_others=True, bool extended_select=False)""" return _gizmos.TreeListCtrl_SelectItem(*args, **kwargs) + def SelectAll(*args, **kwargs): + """SelectAll(self, bool extended_select=False)""" + return _gizmos.TreeListCtrl_SelectAll(*args, **kwargs) + def EnsureVisible(*args, **kwargs): """EnsureVisible(self, TreeItemId item)""" return _gizmos.TreeListCtrl_EnsureVisible(*args, **kwargs) @@ -830,13 +847,9 @@ class TreeListCtrl(_core.Control): """SortChildren(self, TreeItemId item)""" return _gizmos.TreeListCtrl_SortChildren(*args, **kwargs) - def GetItemSelectedImage(*args, **kwargs): - """GetItemSelectedImage(self, TreeItemId item) -> int""" - return _gizmos.TreeListCtrl_GetItemSelectedImage(*args, **kwargs) - - def SetItemSelectedImage(*args, **kwargs): - """SetItemSelectedImage(self, TreeItemId item, int image)""" - return _gizmos.TreeListCtrl_SetItemSelectedImage(*args, **kwargs) + def FindItem(*args, **kwargs): + """FindItem(self, TreeItemId item, String str, int flags=0) -> TreeItemId""" + return _gizmos.TreeListCtrl_FindItem(*args, **kwargs) def GetHeaderWindow(*args, **kwargs): """GetHeaderWindow(self) -> Window""" diff --git a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp index ab15c8f5b1..c83fece5b3 100644 --- a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp @@ -294,7 +294,7 @@ static swig_type_info *swig_types[32]; #include "wx/wxPython/wxPython.h" #include "wx/wxPython/pyclasses.h" - + #include #include #include @@ -303,8 +303,8 @@ static swig_type_info *swig_types[32]; #include #include #include - -#include "treelistctrl.h" + +#include "wx/treelistctrl.h" #include "wx/wxPython/pytree.h" @@ -637,21 +637,21 @@ PyObject *wxPyTreeListCtrl_GetSelections(wxPyTreeListCtrl *self){ return rval; } PyObject *wxPyTreeListCtrl_GetFirstChild(wxPyTreeListCtrl *self,wxTreeItemId const &item){ - long cookie = 0; + void* cookie = 0; wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie)); bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie)); + PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); + PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); wxPyEndBlockThreads(blocked); return tup; } -PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId const &item,long cookie){ +PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId const &item,void *cookie){ wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie)); bool blocked = wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(2); - PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true)); - PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(cookie)); + PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True)); + PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void"))); wxPyEndBlockThreads(blocked); return tup; } @@ -2289,18 +2289,20 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py wxString *arg1 = (wxString *) &arg1_defvalue ; int arg2 = (int) -1 ; size_t arg3 = (size_t) 100 ; - int arg4 = (int) wxTL_ALIGN_LEFT ; + bool arg4 = (bool) True ; + int arg5 = (int) wxTL_ALIGN_LEFT ; wxTreeListColumnInfo *result; bool temp1 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; char *kwnames[] = { - (char *) "text",(char *) "image",(char *) "width",(char *) "alignment", NULL + (char *) "text",(char *) "image",(char *) "width",(char *) "shown",(char *) "alignment", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_TreeListColumnInfo",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOOO:new_TreeListColumnInfo",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if (obj0) { { arg1 = wxString_in_helper(obj0); @@ -2317,12 +2319,16 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) SWIG_fail; } if (obj3) { - arg4 = (wxTreeListColumnAlign) SWIG_AsInt(obj3); + arg4 = (bool) SWIG_AsBool(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj4) { + arg5 = (wxTreeListColumnAlign) SWIG_AsInt(obj4); if (PyErr_Occurred()) SWIG_fail; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxTreeListColumnInfo *)new wxTreeListColumnInfo((wxString const &)*arg1,arg2,arg3,(wxTreeListColumnAlign )arg4); + result = (wxTreeListColumnInfo *)new wxTreeListColumnInfo((wxString const &)*arg1,arg2,arg3,arg4,(wxTreeListColumnAlign )arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -2342,6 +2348,34 @@ static PyObject *_wrap_new_TreeListColumnInfo(PyObject *self, PyObject *args, Py } +static PyObject *_wrap_TreeListColumnInfo_GetShown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TreeListColumnInfo_GetShown",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTreeListColumnInfo, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxTreeListColumnInfo const *)arg1)->GetShown(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_TreeListColumnInfo_GetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ; @@ -2478,6 +2512,35 @@ static PyObject *_wrap_TreeListColumnInfo_GetWidth(PyObject *self, PyObject *arg } +static PyObject *_wrap_TreeListColumnInfo_SetShown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "shown", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListColumnInfo_SetShown",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTreeListColumnInfo, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = (bool) SWIG_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetShown(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_TreeListColumnInfo_SetAlignment(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxTreeListColumnInfo *arg1 = (wxTreeListColumnInfo *) 0 ; @@ -2960,61 +3023,6 @@ static PyObject *_wrap_TreeListCtrl_SetIndent(PyObject *self, PyObject *args, Py } -static PyObject *_wrap_TreeListCtrl_GetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; - unsigned int result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TreeListCtrl_GetSpacing",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned int)((wxPyTreeListCtrl const *)arg1)->GetSpacing(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_FromUnsignedInt((unsigned int)result); - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_TreeListCtrl_SetSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; - unsigned int arg2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "spacing", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_SetSpacing",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (unsigned int) SWIG_AsUnsignedInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetSpacing(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_TreeListCtrl_GetLineSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; @@ -3937,6 +3945,71 @@ static PyObject *_wrap_TreeListCtrl_GetColumnImage(PyObject *self, PyObject *arg } +static PyObject *_wrap_TreeListCtrl_ShowColumn(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; + size_t arg2 ; + bool arg3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "column",(char *) "shown", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_ShowColumn",kwnames,&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = (size_t) SWIG_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + arg3 = (bool) SWIG_AsBool(obj2); + if (PyErr_Occurred()) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->ShowColumn(arg2,arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_TreeListCtrl_IsColumnShown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; + size_t arg2 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "column", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_IsColumnShown",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = (size_t) SWIG_AsUnsignedLong(obj1); + if (PyErr_Occurred()) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxPyTreeListCtrl const *)arg1)->IsColumnShown(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_TreeListCtrl_GetItemText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; @@ -4372,7 +4445,7 @@ static PyObject *_wrap_TreeListCtrl_SetItemTextColour(PyObject *self, PyObject * PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "item",(char *) "col", NULL + (char *) "self",(char *) "item",(char *) "colour", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetItemTextColour",kwnames,&obj0,&obj1,&obj2)) goto fail; @@ -4413,7 +4486,7 @@ static PyObject *_wrap_TreeListCtrl_SetItemBackgroundColour(PyObject *self, PyOb PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "item",(char *) "col", NULL + (char *) "self",(char *) "item",(char *) "colour", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetItemBackgroundColour",kwnames,&obj0,&obj1,&obj2)) goto fail; @@ -4976,7 +5049,7 @@ static PyObject *_wrap_TreeListCtrl_GetItemParent(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = ((wxPyTreeListCtrl const *)arg1)->GetParent((wxTreeItemId const &)*arg2); + result = ((wxPyTreeListCtrl const *)arg1)->GetItemParent((wxTreeItemId const &)*arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -5031,7 +5104,7 @@ static PyObject *_wrap_TreeListCtrl_GetNextChild(PyObject *self, PyObject *args, PyObject *resultobj; wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; wxTreeItemId *arg2 = 0 ; - long arg3 ; + void *arg3 = (void *) 0 ; PyObject *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -5050,8 +5123,7 @@ static PyObject *_wrap_TreeListCtrl_GetNextChild(PyObject *self, PyObject *args, PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; } - arg3 = (long) SWIG_AsLong(obj2); - if (PyErr_Occurred()) SWIG_fail; + if ((SWIG_ConvertPtr(obj2,&arg3,0,SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxPyTreeListCtrl_GetNextChild(arg1,(wxTreeItemId const &)*arg2,arg3); @@ -6058,6 +6130,37 @@ static PyObject *_wrap_TreeListCtrl_SelectItem(PyObject *self, PyObject *args, P } +static PyObject *_wrap_TreeListCtrl_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; + bool arg2 = (bool) False ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "extended_select", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:TreeListCtrl_SelectAll",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj1) { + arg2 = (bool) SWIG_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SelectAll(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_TreeListCtrl_EnsureVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; @@ -6320,18 +6423,23 @@ static PyObject *_wrap_TreeListCtrl_SortChildren(PyObject *self, PyObject *args, } -static PyObject *_wrap_TreeListCtrl_GetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_TreeListCtrl_FindItem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; wxTreeItemId *arg2 = 0 ; - int result; + wxString *arg3 = 0 ; + int arg4 = (int) 0 ; + wxTreeItemId result; + bool temp3 = False ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "item", NULL + (char *) "self",(char *) "item",(char *) "str",(char *) "flags", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeListCtrl_GetItemSelectedImage",kwnames,&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:TreeListCtrl_FindItem",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxTreeItemId, @@ -6342,53 +6450,36 @@ static PyObject *_wrap_TreeListCtrl_GetItemSelectedImage(PyObject *self, PyObjec SWIG_fail; } { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxPyTreeListCtrl const *)arg1)->GetItemSelectedImage((wxTreeItemId const &)*arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; } - resultobj = SWIG_FromInt((int)result); - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_TreeListCtrl_SetItemSelectedImage(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxPyTreeListCtrl *arg1 = (wxPyTreeListCtrl *) 0 ; - wxTreeItemId *arg2 = 0 ; - int arg3 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "item",(char *) "image", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:TreeListCtrl_SetItemSelectedImage",kwnames,&obj0,&obj1,&obj2)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyTreeListCtrl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxTreeItemId, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg2 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); - SWIG_fail; + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; } - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetItemSelectedImage((wxTreeItemId const &)*arg2,arg3); + result = (arg1)->FindItem((wxTreeItemId const &)*arg2,(wxString const &)*arg3,arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + wxTreeItemId * resultptr; + resultptr = new wxTreeItemId((wxTreeItemId &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxTreeItemId, 1); + } + { + if (temp3) + delete arg3; + } return resultobj; fail: + { + if (temp3) + delete arg3; + } return NULL; } @@ -6505,11 +6596,13 @@ static PyMethodDef SwigMethods[] = { { (char *)"LEDNumberCtrl_SetValue", (PyCFunction) _wrap_LEDNumberCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, { (char *)"LEDNumberCtrl_swigregister", LEDNumberCtrl_swigregister, METH_VARARGS }, { (char *)"new_TreeListColumnInfo", (PyCFunction) _wrap_new_TreeListColumnInfo, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeListColumnInfo_GetShown", (PyCFunction) _wrap_TreeListColumnInfo_GetShown, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_GetAlignment", (PyCFunction) _wrap_TreeListColumnInfo_GetAlignment, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_GetText", (PyCFunction) _wrap_TreeListColumnInfo_GetText, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_GetImage", (PyCFunction) _wrap_TreeListColumnInfo_GetImage, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_GetSelectedImage", (PyCFunction) _wrap_TreeListColumnInfo_GetSelectedImage, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_GetWidth", (PyCFunction) _wrap_TreeListColumnInfo_GetWidth, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeListColumnInfo_SetShown", (PyCFunction) _wrap_TreeListColumnInfo_SetShown, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_SetAlignment", (PyCFunction) _wrap_TreeListColumnInfo_SetAlignment, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_SetText", (PyCFunction) _wrap_TreeListColumnInfo_SetText, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListColumnInfo_SetImage", (PyCFunction) _wrap_TreeListColumnInfo_SetImage, METH_VARARGS | METH_KEYWORDS }, @@ -6523,8 +6616,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeListCtrl_GetCount", (PyCFunction) _wrap_TreeListCtrl_GetCount, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetIndent", (PyCFunction) _wrap_TreeListCtrl_GetIndent, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_SetIndent", (PyCFunction) _wrap_TreeListCtrl_SetIndent, METH_VARARGS | METH_KEYWORDS }, - { (char *)"TreeListCtrl_GetSpacing", (PyCFunction) _wrap_TreeListCtrl_GetSpacing, METH_VARARGS | METH_KEYWORDS }, - { (char *)"TreeListCtrl_SetSpacing", (PyCFunction) _wrap_TreeListCtrl_SetSpacing, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetLineSpacing", (PyCFunction) _wrap_TreeListCtrl_GetLineSpacing, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_SetLineSpacing", (PyCFunction) _wrap_TreeListCtrl_SetLineSpacing, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetImageList", (PyCFunction) _wrap_TreeListCtrl_GetImageList, METH_VARARGS | METH_KEYWORDS }, @@ -6554,6 +6645,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeListCtrl_GetColumnAlignment", (PyCFunction) _wrap_TreeListCtrl_GetColumnAlignment, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_SetColumnImage", (PyCFunction) _wrap_TreeListCtrl_SetColumnImage, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetColumnImage", (PyCFunction) _wrap_TreeListCtrl_GetColumnImage, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeListCtrl_ShowColumn", (PyCFunction) _wrap_TreeListCtrl_ShowColumn, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeListCtrl_IsColumnShown", (PyCFunction) _wrap_TreeListCtrl_IsColumnShown, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetItemText", (PyCFunction) _wrap_TreeListCtrl_GetItemText, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetItemImage", (PyCFunction) _wrap_TreeListCtrl_GetItemImage, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_SetItemText", (PyCFunction) _wrap_TreeListCtrl_SetItemText, METH_VARARGS | METH_KEYWORDS }, @@ -6606,6 +6699,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeListCtrl_Unselect", (PyCFunction) _wrap_TreeListCtrl_Unselect, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_UnselectAll", (PyCFunction) _wrap_TreeListCtrl_UnselectAll, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_SelectItem", (PyCFunction) _wrap_TreeListCtrl_SelectItem, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeListCtrl_SelectAll", (PyCFunction) _wrap_TreeListCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_EnsureVisible", (PyCFunction) _wrap_TreeListCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_ScrollTo", (PyCFunction) _wrap_TreeListCtrl_ScrollTo, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_HitTest", (PyCFunction) _wrap_TreeListCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, @@ -6613,8 +6707,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeListCtrl_EditLabel", (PyCFunction) _wrap_TreeListCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_Edit", (PyCFunction) _wrap_TreeListCtrl_Edit, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_SortChildren", (PyCFunction) _wrap_TreeListCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS }, - { (char *)"TreeListCtrl_GetItemSelectedImage", (PyCFunction) _wrap_TreeListCtrl_GetItemSelectedImage, METH_VARARGS | METH_KEYWORDS }, - { (char *)"TreeListCtrl_SetItemSelectedImage", (PyCFunction) _wrap_TreeListCtrl_SetItemSelectedImage, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeListCtrl_FindItem", (PyCFunction) _wrap_TreeListCtrl_FindItem, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetHeaderWindow", (PyCFunction) _wrap_TreeListCtrl_GetHeaderWindow, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_GetMainWindow", (PyCFunction) _wrap_TreeListCtrl_GetMainWindow, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeListCtrl_swigregister", TreeListCtrl_swigregister, METH_VARARGS }, @@ -8205,6 +8298,11 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"TL_ALIGN_RIGHT", SWIG_FromInt((int)wxTL_ALIGN_RIGHT)); PyDict_SetItemString(d,"TL_ALIGN_CENTER", SWIG_FromInt((int)wxTL_ALIGN_CENTER)); PyDict_SetItemString(d,"TREE_HITTEST_ONITEMCOLUMN", SWIG_FromInt((int)wxTREE_HITTEST_ONITEMCOLUMN)); + PyDict_SetItemString(d,"TL_SEARCH_VISIBLE", SWIG_FromInt((int)wxTL_SEARCH_VISIBLE)); + PyDict_SetItemString(d,"TL_SEARCH_LEVEL", SWIG_FromInt((int)wxTL_SEARCH_LEVEL)); + PyDict_SetItemString(d,"TL_SEARCH_FULL", SWIG_FromInt((int)wxTL_SEARCH_FULL)); + PyDict_SetItemString(d,"TL_SEARCH_PARTIAL", SWIG_FromInt((int)wxTL_SEARCH_PARTIAL)); + PyDict_SetItemString(d,"TL_SEARCH_NOCASE", SWIG_FromInt((int)wxTL_SEARCH_NOCASE)); wxPyPtrTypeMap_Add("wxTreeCompanionWindow", "wxPyTreeCompanionWindow"); diff --git a/wxPython/contrib/ogl/msw/ogl.py b/wxPython/contrib/ogl/msw/ogl.py index d5defa33c4..13f0fc583b 100644 --- a/wxPython/contrib/ogl/msw/ogl.py +++ b/wxPython/contrib/ogl/msw/ogl.py @@ -3,7 +3,7 @@ """ The Object Graphics Library provides for simple drawing and manipulation -of 2D objects. +of 2D objects. (This version is deprecated, please use wx.lib.ogl instead.) """ import _ogl @@ -12,6 +12,10 @@ import _windows import _core wx = _core __docfilter__ = wx.__DocFilter(globals()) +import warnings +warnings.warn("This module is deprecated. Please use the wx.lib.ogl pacakge instead.", + DeprecationWarning, stacklevel=2) + #--------------------------------------------------------------------------- class ShapeRegion(_core.Object): diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 90e5b299a5..2991fde439 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -5773,7 +5773,7 @@ class Window(EvtHandler): """ GetClientRect(self) -> Rect - Get the client area position and size as a wx.Rect object. + Get the client area position and size as a `wx.Rect` object. """ return _core_.Window_GetClientRect(*args, **kwargs) -- 2.45.2