From 50f151d726bce4dc4179fbf98f8ee7c34691229c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 24 Mar 2006 01:52:48 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_controls.py | 30 ++- wxPython/src/gtk/_controls_wrap.cpp | 278 +++++++++++++++++++++------- wxPython/src/gtk/_core.py | 16 +- wxPython/src/gtk/_core_wrap.cpp | 107 +++++++---- wxPython/src/gtk/wizard_wrap.cpp | 6 +- wxPython/src/mac/_controls.py | 30 ++- wxPython/src/mac/_controls_wrap.cpp | 273 ++++++++++++++++++++------- wxPython/src/mac/_core.py | 16 +- wxPython/src/mac/_core_wrap.cpp | 107 +++++++---- wxPython/src/mac/wizard_wrap.cpp | 6 +- wxPython/src/msw/_controls.py | 30 ++- wxPython/src/msw/_controls_wrap.cpp | 273 ++++++++++++++++++++------- wxPython/src/msw/_core.py | 16 +- wxPython/src/msw/_core_wrap.cpp | 107 +++++++---- wxPython/src/msw/wizard_wrap.cpp | 6 +- 15 files changed, 925 insertions(+), 376 deletions(-) diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 8c2fa54b89..b301b43e8d 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -701,6 +701,14 @@ class ComboBox(_core.Control,_core.ItemContainer): """ return _controls_.ComboBox_SetStringSelection(*args, **kwargs) + def SetString(*args, **kwargs): + """ + SetString(self, int n, String string) + + Set the label for the n'th item (zero based) in the list. + """ + return _controls_.ComboBox_SetString(*args, **kwargs) + def SetEditable(*args, **kwargs): """SetEditable(self, bool editable)""" return _controls_.ComboBox_SetEditable(*args, **kwargs) @@ -1294,7 +1302,7 @@ class ListBox(_core.ControlWithItems): return _controls_.ListBox_Insert(*args, **kwargs) def InsertItems(*args, **kwargs): - """InsertItems(self, wxArrayString items, int pos)""" + """InsertItems(self, wxArrayString items, unsigned int pos)""" return _controls_.ListBox_InsertItems(*args, **kwargs) def Set(*args, **kwargs): @@ -1444,11 +1452,11 @@ class CheckListBox(ListBox): return _controls_.CheckListBox_Create(*args, **kwargs) def IsChecked(*args, **kwargs): - """IsChecked(self, int index) -> bool""" + """IsChecked(self, unsigned int index) -> bool""" return _controls_.CheckListBox_IsChecked(*args, **kwargs) def Check(*args, **kwargs): - """Check(self, int index, int check=True)""" + """Check(self, unsigned int index, int check=True)""" return _controls_.CheckListBox_Check(*args, **kwargs) def GetItemHeight(*args, **kwargs): @@ -2342,19 +2350,27 @@ class RadioBox(_core.Control): GetItemLabel = GetString SetItemLabel = SetString def EnableItem(*args, **kwargs): - """EnableItem(self, int n, bool enable=True)""" + """EnableItem(self, unsigned int n, bool enable=True)""" return _controls_.RadioBox_EnableItem(*args, **kwargs) def ShowItem(*args, **kwargs): - """ShowItem(self, int n, bool show=True)""" + """ShowItem(self, unsigned int n, bool show=True)""" return _controls_.RadioBox_ShowItem(*args, **kwargs) + def IsItemEnabled(*args, **kwargs): + """IsItemEnabled(self, unsigned int n) -> bool""" + return _controls_.RadioBox_IsItemEnabled(*args, **kwargs) + + def IsItemShown(*args, **kwargs): + """IsItemShown(self, unsigned int n) -> bool""" + return _controls_.RadioBox_IsItemShown(*args, **kwargs) + def GetColumnCount(*args, **kwargs): - """GetColumnCount(self) -> int""" + """GetColumnCount(self) -> unsigned int""" return _controls_.RadioBox_GetColumnCount(*args, **kwargs) def GetRowCount(*args, **kwargs): - """GetRowCount(self) -> int""" + """GetRowCount(self) -> unsigned int""" return _controls_.RadioBox_GetRowCount(*args, **kwargs) def GetNextItem(*args, **kwargs): diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index ce0a606823..d4d69ae544 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -2817,6 +2817,35 @@ SWIGINTERN void wxListBox_Insert(wxListBox *self,wxString const &item,int pos,Py } else self->Insert(item, pos); } + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) +{ + long v = 0; + if (SWIG_AsVal_long(obj, &v) && v < 0) { + return SWIG_TypeError; + } + else if (val) + *val = (unsigned long)v; + return SWIG_OK; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + SWIGINTERN PyObject *wxListBox_GetSelections(wxListBox *self){ wxArrayInt lst; self->GetSelections(lst); @@ -2845,19 +2874,6 @@ SWIGINTERN void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){ #endif } static const wxString wxPyTextCtrlNameStr(wxTextCtrlNameStr); - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) -{ - long v = 0; - if (SWIG_AsVal_long(obj, &v) && v < 0) { - return SWIG_TypeError; - } - else if (val) - *val = (unsigned long)v; - return SWIG_OK; -} - SWIGINTERN void wxTextCtrl_write(wxTextCtrl *self,wxString const &text){ self->AppendText(text); } @@ -2884,9 +2900,13 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } -SWIGINTERN int wxRadioBox_GetColumnCount(wxRadioBox const *self){ return -1; } -SWIGINTERN int wxRadioBox_GetRowCount(wxRadioBox const *self){ return -1; } -SWIGINTERN int wxRadioBox_GetNextItem(wxRadioBox const *self,int item,wxDirection dir,long style){ return -1; } + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + #include @@ -3126,29 +3146,6 @@ public: IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); - -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_int (unsigned int value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< unsigned int >(v); - } - } - return res; -} - SWIGINTERN wxPyTreeItemData *wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,wxTreeItemId const &item){ wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { @@ -6277,6 +6274,60 @@ fail: } +SWIGINTERN PyObject *_wrap_ComboBox_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxComboBox *arg1 = (wxComboBox *) 0 ; + int arg2 ; + wxString *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + bool temp3 = false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n",(char *) "string", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxComboBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComboBox_SetString" "', expected argument " "1"" of type '" "wxComboBox *""'"); + } + arg1 = reinterpret_cast< wxComboBox * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComboBox_SetString" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetString(arg2,(wxString const &)*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + { + if (temp3) + delete arg3; + } + return resultobj; +fail: + { + if (temp3) + delete arg3; + } + return NULL; +} + + SWIGINTERN PyObject *_wrap_ComboBox_SetEditable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxComboBox *arg1 = (wxComboBox *) 0 ; @@ -9091,11 +9142,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P PyObject *resultobj = 0; wxListBox *arg1 = (wxListBox *) 0 ; wxArrayString *arg2 = 0 ; - int arg3 ; + unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -9127,11 +9178,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P Py_DECREF(item); } } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "unsigned int""'"); } - arg3 = static_cast< int >(val3); + arg3 = static_cast< unsigned int >(val3); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->InsertItems((wxArrayString const &)*arg2,arg3); @@ -10220,11 +10271,11 @@ fail: SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -10238,11 +10289,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_IsChecked" "', expected argument " "1"" of type '" "wxCheckListBox *""'"); } arg1 = reinterpret_cast< wxCheckListBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->IsChecked(arg2); @@ -10261,11 +10312,11 @@ fail: SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; - int arg2 ; + unsigned int arg2 ; int arg3 = (int) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; @@ -10282,11 +10333,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_Check" "', expected argument " "1"" of type '" "wxCheckListBox *""'"); } arg1 = reinterpret_cast< wxCheckListBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16422,11 +16473,11 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool arg3 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -16443,11 +16494,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_EnableItem" "', expected argument " "1"" of type '" "wxRadioBox *""'"); } arg1 = reinterpret_cast< wxRadioBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16471,11 +16522,11 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool arg3 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -16492,11 +16543,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_ShowItem" "', expected argument " "1"" of type '" "wxRadioBox *""'"); } arg1 = reinterpret_cast< wxRadioBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16517,10 +16568,92 @@ fail: } +SWIGINTERN PyObject *_wrap_RadioBox_IsItemEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRadioBox *arg1 = (wxRadioBox *) 0 ; + unsigned int arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemEnabled",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "1"" of type '" "wxRadioBox const *""'"); + } + arg1 = reinterpret_cast< wxRadioBox * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxRadioBox const *)arg1)->IsItemEnabled(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RadioBox_IsItemShown(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRadioBox *arg1 = (wxRadioBox *) 0 ; + unsigned int arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemShown",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemShown" "', expected argument " "1"" of type '" "wxRadioBox const *""'"); + } + arg1 = reinterpret_cast< wxRadioBox * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemShown" "', expected argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxRadioBox const *)arg1)->IsItemShown(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16534,11 +16667,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxRadioBox_GetColumnCount((wxRadioBox const *)arg1); + result = (unsigned int)((wxRadioBox const *)arg1)->GetColumnCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -16548,7 +16681,7 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16562,11 +16695,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxRadioBox_GetRowCount((wxRadioBox const *)arg1); + result = (unsigned int)((wxRadioBox const *)arg1)->GetRowCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -16619,7 +16752,7 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetNextItem(PyObject *SWIGUNUSEDPARM(self), arg4 = static_cast< long >(val4); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxRadioBox_GetNextItem((wxRadioBox const *)arg1,arg2,arg3,arg4); + result = (int)((wxRadioBox const *)arg1)->GetNextItem(arg2,arg3,arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -40581,6 +40714,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ComboBox_GetMark", (PyCFunction)_wrap_ComboBox_GetMark, METH_O, NULL}, { (char *)"ComboBox_GetCurrentSelection", (PyCFunction)_wrap_ComboBox_GetCurrentSelection, METH_O, NULL}, { (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction)_wrap_ComboBox_SetInsertionPointEnd, METH_O, NULL}, { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -40826,6 +40960,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"RadioBox_SetString", (PyCFunction) _wrap_RadioBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_EnableItem", (PyCFunction) _wrap_RadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_ShowItem", (PyCFunction) _wrap_RadioBox_ShowItem, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"RadioBox_IsItemEnabled", (PyCFunction) _wrap_RadioBox_IsItemEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"RadioBox_IsItemShown", (PyCFunction) _wrap_RadioBox_IsItemShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_GetColumnCount", (PyCFunction)_wrap_RadioBox_GetColumnCount, METH_O, NULL}, { (char *)"RadioBox_GetRowCount", (PyCFunction)_wrap_RadioBox_GetRowCount, METH_O, NULL}, { (char *)"RadioBox_GetNextItem", (PyCFunction) _wrap_RadioBox_GetNextItem, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index d8374f26a4..26162f84fd 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -1738,6 +1738,8 @@ class CPPFileSystemHandler(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + __swig_destroy__ = _core_.delete_CPPFileSystemHandler + __del__ = lambda self : None; CPPFileSystemHandler_swigregister = _core_.CPPFileSystemHandler_swigregister CPPFileSystemHandler_swigregister(CPPFileSystemHandler) @@ -10518,7 +10520,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, int pos, PyObject clientData=None) -> int + Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -10535,7 +10537,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, int n) + Delete(self, unsigned int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -10546,7 +10548,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, int n) -> PyObject + GetClientData(self, unsigned int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -10554,7 +10556,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, int n, PyObject clientData) + SetClientData(self, unsigned int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -10562,7 +10564,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> size_t + GetCount(self) -> unsigned int Returns the number of items in the control. """ @@ -10578,7 +10580,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, int n) -> String + GetString(self, unsigned int n) -> String Returns the label of the item with the given index. """ @@ -10590,7 +10592,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, int n, String s) + SetString(self, unsigned int n, String s) Sets the label for the given item. """ diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index b1618916d9..b69e671a0e 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -3813,14 +3813,14 @@ SWIGINTERN int wxItemContainer_Append(wxItemContainer *self,wxString const &item } else return self->Append(item); } -SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,unsigned int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, pos, data); } else return self->Insert(item, pos); } -SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ +SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigned int n){ wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { Py_INCREF(data->m_obj); @@ -3830,7 +3830,7 @@ SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ return Py_None; } } -SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientData){ +SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,unsigned int n,PyObject *clientData){ wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); } @@ -9830,6 +9830,34 @@ SWIGINTERN PyObject *FSFile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *a return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_delete_CPPFileSystemHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxFileSystemHandler *arg1 = (wxFileSystemHandler *) 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_wxFileSystemHandler, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CPPFileSystemHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); + } + arg1 = reinterpret_cast< wxFileSystemHandler * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *CPPFileSystemHandler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -10652,7 +10680,6 @@ fail: SWIGINTERN PyObject *_wrap_FileSystem_AddHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxFileSystemHandler *arg1 = (wxFileSystemHandler *) 0 ; - void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { @@ -10660,11 +10687,10 @@ SWIGINTERN PyObject *_wrap_FileSystem_AddHandler(PyObject *SWIGUNUSEDPARM(self), }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileSystem_AddHandler",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFileSystemHandler, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_wxFileSystemHandler, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileSystem_AddHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileSystem_AddHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); } - arg1 = reinterpret_cast< wxFileSystemHandler * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxFileSystem::AddHandler(arg1); @@ -43864,13 +43890,13 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; wxString *arg2 = 0 ; - int arg3 ; + unsigned int arg3 ; PyObject *arg4 = (PyObject *) NULL ; int result; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -43891,11 +43917,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), if (arg2 == NULL) SWIG_fail; temp2 = true; } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "unsigned int""'"); } - arg3 = static_cast< int >(val3); + arg3 = static_cast< unsigned int >(val3); if (obj3) { arg4 = obj3; } @@ -43950,10 +43976,10 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -43967,11 +43993,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_Delete" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Delete(arg2); @@ -43988,11 +44014,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44006,11 +44032,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxItemContainer_GetClientData(arg1,arg2); @@ -44027,11 +44053,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44046,11 +44072,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); arg3 = obj2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -44068,7 +44094,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - size_t result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -44082,11 +44108,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (size_t)((wxItemContainer const *)arg1)->GetCount(); + result = (unsigned int)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -44126,11 +44152,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; wxString result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44144,11 +44170,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetString" "', expected argument " "1"" of type '" "wxItemContainer const *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxItemContainer const *)arg1)->GetString(arg2); @@ -44201,11 +44227,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; wxString *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool temp3 = false ; PyObject * obj0 = 0 ; @@ -44221,11 +44247,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetString" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -52499,6 +52525,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FSFile_GetModificationTime", (PyCFunction)_wrap_FSFile_GetModificationTime, METH_O, NULL}, { (char *)"FSFile_swigregister", FSFile_swigregister, METH_VARARGS, NULL}, { (char *)"FSFile_swiginit", FSFile_swiginit, METH_VARARGS, NULL}, + { (char *)"delete_CPPFileSystemHandler", (PyCFunction)_wrap_delete_CPPFileSystemHandler, METH_O, NULL}, { (char *)"CPPFileSystemHandler_swigregister", CPPFileSystemHandler_swigregister, METH_VARARGS, NULL}, { (char *)"new_FileSystemHandler", (PyCFunction)_wrap_new_FileSystemHandler, METH_NOARGS, NULL}, { (char *)"FileSystemHandler__setCallbackInfo", (PyCFunction) _wrap_FileSystemHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/wizard_wrap.cpp b/wxPython/src/gtk/wizard_wrap.cpp index 4b9ca50cd6..5e84e81f7e 100644 --- a/wxPython/src/gtk/wizard_wrap.cpp +++ b/wxPython/src/gtk/wizard_wrap.cpp @@ -2790,7 +2790,7 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) SWIGINTERN bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ wxChar* res = NULL; - if (resource.Length()) + if (resource.length()) res = (wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } @@ -2869,13 +2869,13 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); SWIGINTERN wxPyWizardPage *new_wxPyWizardPage(wxWizard *parent,wxBitmap const *bitmap=&wxNullBitmap,wxString const *resource=&wxPyEmptyString){ wxChar* res = NULL; - if (resource->Length()) + if (resource->length()) res = (wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } SWIGINTERN bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ wxChar* res = NULL; - if (resource.Length()) + if (resource.length()) res = (wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index acbdaca4c6..ac47583bf3 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -692,6 +692,14 @@ class ComboBox(_core.Control,_core.ItemContainer): """ return _controls_.ComboBox_SetStringSelection(*args, **kwargs) + def SetString(*args, **kwargs): + """ + SetString(self, int n, String string) + + Set the label for the n'th item (zero based) in the list. + """ + return _controls_.ComboBox_SetString(*args, **kwargs) + def SetEditable(*args, **kwargs): """SetEditable(self, bool editable)""" return _controls_.ComboBox_SetEditable(*args, **kwargs) @@ -1285,7 +1293,7 @@ class ListBox(_core.ControlWithItems): return _controls_.ListBox_Insert(*args, **kwargs) def InsertItems(*args, **kwargs): - """InsertItems(self, wxArrayString items, int pos)""" + """InsertItems(self, wxArrayString items, unsigned int pos)""" return _controls_.ListBox_InsertItems(*args, **kwargs) def Set(*args, **kwargs): @@ -1435,11 +1443,11 @@ class CheckListBox(ListBox): return _controls_.CheckListBox_Create(*args, **kwargs) def IsChecked(*args, **kwargs): - """IsChecked(self, int index) -> bool""" + """IsChecked(self, unsigned int index) -> bool""" return _controls_.CheckListBox_IsChecked(*args, **kwargs) def Check(*args, **kwargs): - """Check(self, int index, int check=True)""" + """Check(self, unsigned int index, int check=True)""" return _controls_.CheckListBox_Check(*args, **kwargs) CheckListBox_swigregister = _controls_.CheckListBox_swigregister @@ -2329,19 +2337,27 @@ class RadioBox(_core.Control): GetItemLabel = GetString SetItemLabel = SetString def EnableItem(*args, **kwargs): - """EnableItem(self, int n, bool enable=True)""" + """EnableItem(self, unsigned int n, bool enable=True)""" return _controls_.RadioBox_EnableItem(*args, **kwargs) def ShowItem(*args, **kwargs): - """ShowItem(self, int n, bool show=True)""" + """ShowItem(self, unsigned int n, bool show=True)""" return _controls_.RadioBox_ShowItem(*args, **kwargs) + def IsItemEnabled(*args, **kwargs): + """IsItemEnabled(self, unsigned int n) -> bool""" + return _controls_.RadioBox_IsItemEnabled(*args, **kwargs) + + def IsItemShown(*args, **kwargs): + """IsItemShown(self, unsigned int n) -> bool""" + return _controls_.RadioBox_IsItemShown(*args, **kwargs) + def GetColumnCount(*args, **kwargs): - """GetColumnCount(self) -> int""" + """GetColumnCount(self) -> unsigned int""" return _controls_.RadioBox_GetColumnCount(*args, **kwargs) def GetRowCount(*args, **kwargs): - """GetRowCount(self) -> int""" + """GetRowCount(self) -> unsigned int""" return _controls_.RadioBox_GetRowCount(*args, **kwargs) def GetNextItem(*args, **kwargs): diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 123dcc7f6a..8ef6785530 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -2817,6 +2817,35 @@ SWIGINTERN void wxListBox_Insert(wxListBox *self,wxString const &item,int pos,Py } else self->Insert(item, pos); } + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) +{ + long v = 0; + if (SWIG_AsVal_long(obj, &v) && v < 0) { + return SWIG_TypeError; + } + else if (val) + *val = (unsigned long)v; + return SWIG_OK; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + SWIGINTERN PyObject *wxListBox_GetSelections(wxListBox *self){ wxArrayInt lst; self->GetSelections(lst); @@ -2845,19 +2874,6 @@ SWIGINTERN void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){ #endif } static const wxString wxPyTextCtrlNameStr(wxTextCtrlNameStr); - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) -{ - long v = 0; - if (SWIG_AsVal_long(obj, &v) && v < 0) { - return SWIG_TypeError; - } - else if (val) - *val = (unsigned long)v; - return SWIG_OK; -} - SWIGINTERN void wxTextCtrl_write(wxTextCtrl *self,wxString const &text){ self->AppendText(text); } @@ -2885,6 +2901,13 @@ SWIG_From_size_t (size_t value) } +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + #include @@ -3123,29 +3146,6 @@ public: IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); - -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_int (unsigned int value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< unsigned int >(v); - } - } - return res; -} - SWIGINTERN wxPyTreeItemData *wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,wxTreeItemId const &item){ wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { @@ -6227,6 +6227,60 @@ fail: } +SWIGINTERN PyObject *_wrap_ComboBox_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxComboBox *arg1 = (wxComboBox *) 0 ; + int arg2 ; + wxString *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + bool temp3 = false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n",(char *) "string", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxComboBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComboBox_SetString" "', expected argument " "1"" of type '" "wxComboBox *""'"); + } + arg1 = reinterpret_cast< wxComboBox * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComboBox_SetString" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetString(arg2,(wxString const &)*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + { + if (temp3) + delete arg3; + } + return resultobj; +fail: + { + if (temp3) + delete arg3; + } + return NULL; +} + + SWIGINTERN PyObject *_wrap_ComboBox_SetEditable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxComboBox *arg1 = (wxComboBox *) 0 ; @@ -9041,11 +9095,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P PyObject *resultobj = 0; wxListBox *arg1 = (wxListBox *) 0 ; wxArrayString *arg2 = 0 ; - int arg3 ; + unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -9077,11 +9131,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P Py_DECREF(item); } } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "unsigned int""'"); } - arg3 = static_cast< int >(val3); + arg3 = static_cast< unsigned int >(val3); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->InsertItems((wxArrayString const &)*arg2,arg3); @@ -10170,11 +10224,11 @@ fail: SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -10188,11 +10242,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_IsChecked" "', expected argument " "1"" of type '" "wxCheckListBox *""'"); } arg1 = reinterpret_cast< wxCheckListBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->IsChecked(arg2); @@ -10211,11 +10265,11 @@ fail: SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; - int arg2 ; + unsigned int arg2 ; int arg3 = (int) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; @@ -10232,11 +10286,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_Check" "', expected argument " "1"" of type '" "wxCheckListBox *""'"); } arg1 = reinterpret_cast< wxCheckListBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16344,11 +16398,11 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool arg3 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -16365,11 +16419,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_EnableItem" "', expected argument " "1"" of type '" "wxRadioBox *""'"); } arg1 = reinterpret_cast< wxRadioBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16393,11 +16447,11 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool arg3 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -16414,11 +16468,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_ShowItem" "', expected argument " "1"" of type '" "wxRadioBox *""'"); } arg1 = reinterpret_cast< wxRadioBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16439,10 +16493,92 @@ fail: } +SWIGINTERN PyObject *_wrap_RadioBox_IsItemEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRadioBox *arg1 = (wxRadioBox *) 0 ; + unsigned int arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemEnabled",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "1"" of type '" "wxRadioBox const *""'"); + } + arg1 = reinterpret_cast< wxRadioBox * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxRadioBox const *)arg1)->IsItemEnabled(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RadioBox_IsItemShown(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRadioBox *arg1 = (wxRadioBox *) 0 ; + unsigned int arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemShown",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemShown" "', expected argument " "1"" of type '" "wxRadioBox const *""'"); + } + arg1 = reinterpret_cast< wxRadioBox * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemShown" "', expected argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxRadioBox const *)arg1)->IsItemShown(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16456,11 +16592,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxRadioBox const *)arg1)->GetColumnCount(); + result = (unsigned int)((wxRadioBox const *)arg1)->GetColumnCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -16470,7 +16606,7 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16484,11 +16620,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxRadioBox const *)arg1)->GetRowCount(); + result = (unsigned int)((wxRadioBox const *)arg1)->GetRowCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -40502,6 +40638,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_GetCurrentSelection", (PyCFunction)_wrap_ComboBox_GetCurrentSelection, METH_O, NULL}, { (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction)_wrap_ComboBox_SetInsertionPointEnd, METH_O, NULL}, { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -40746,6 +40883,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"RadioBox_SetString", (PyCFunction) _wrap_RadioBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_EnableItem", (PyCFunction) _wrap_RadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_ShowItem", (PyCFunction) _wrap_RadioBox_ShowItem, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"RadioBox_IsItemEnabled", (PyCFunction) _wrap_RadioBox_IsItemEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"RadioBox_IsItemShown", (PyCFunction) _wrap_RadioBox_IsItemShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_GetColumnCount", (PyCFunction)_wrap_RadioBox_GetColumnCount, METH_O, NULL}, { (char *)"RadioBox_GetRowCount", (PyCFunction)_wrap_RadioBox_GetRowCount, METH_O, NULL}, { (char *)"RadioBox_GetNextItem", (PyCFunction) _wrap_RadioBox_GetNextItem, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index d8374f26a4..26162f84fd 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -1738,6 +1738,8 @@ class CPPFileSystemHandler(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + __swig_destroy__ = _core_.delete_CPPFileSystemHandler + __del__ = lambda self : None; CPPFileSystemHandler_swigregister = _core_.CPPFileSystemHandler_swigregister CPPFileSystemHandler_swigregister(CPPFileSystemHandler) @@ -10518,7 +10520,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, int pos, PyObject clientData=None) -> int + Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -10535,7 +10537,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, int n) + Delete(self, unsigned int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -10546,7 +10548,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, int n) -> PyObject + GetClientData(self, unsigned int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -10554,7 +10556,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, int n, PyObject clientData) + SetClientData(self, unsigned int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -10562,7 +10564,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> size_t + GetCount(self) -> unsigned int Returns the number of items in the control. """ @@ -10578,7 +10580,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, int n) -> String + GetString(self, unsigned int n) -> String Returns the label of the item with the given index. """ @@ -10590,7 +10592,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, int n, String s) + SetString(self, unsigned int n, String s) Sets the label for the given item. """ diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index 3a61b2376d..a51236fa86 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -3811,14 +3811,14 @@ SWIGINTERN int wxItemContainer_Append(wxItemContainer *self,wxString const &item } else return self->Append(item); } -SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,unsigned int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, pos, data); } else return self->Insert(item, pos); } -SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ +SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigned int n){ wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { Py_INCREF(data->m_obj); @@ -3828,7 +3828,7 @@ SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ return Py_None; } } -SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientData){ +SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,unsigned int n,PyObject *clientData){ wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); } @@ -9828,6 +9828,34 @@ SWIGINTERN PyObject *FSFile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *a return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_delete_CPPFileSystemHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxFileSystemHandler *arg1 = (wxFileSystemHandler *) 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_wxFileSystemHandler, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CPPFileSystemHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); + } + arg1 = reinterpret_cast< wxFileSystemHandler * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *CPPFileSystemHandler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -10650,7 +10678,6 @@ fail: SWIGINTERN PyObject *_wrap_FileSystem_AddHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxFileSystemHandler *arg1 = (wxFileSystemHandler *) 0 ; - void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { @@ -10658,11 +10685,10 @@ SWIGINTERN PyObject *_wrap_FileSystem_AddHandler(PyObject *SWIGUNUSEDPARM(self), }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileSystem_AddHandler",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFileSystemHandler, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_wxFileSystemHandler, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileSystem_AddHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileSystem_AddHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); } - arg1 = reinterpret_cast< wxFileSystemHandler * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxFileSystem::AddHandler(arg1); @@ -43862,13 +43888,13 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; wxString *arg2 = 0 ; - int arg3 ; + unsigned int arg3 ; PyObject *arg4 = (PyObject *) NULL ; int result; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -43889,11 +43915,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), if (arg2 == NULL) SWIG_fail; temp2 = true; } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "unsigned int""'"); } - arg3 = static_cast< int >(val3); + arg3 = static_cast< unsigned int >(val3); if (obj3) { arg4 = obj3; } @@ -43948,10 +43974,10 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -43965,11 +43991,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_Delete" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Delete(arg2); @@ -43986,11 +44012,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44004,11 +44030,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxItemContainer_GetClientData(arg1,arg2); @@ -44025,11 +44051,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44044,11 +44070,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); arg3 = obj2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -44066,7 +44092,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - size_t result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -44080,11 +44106,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (size_t)((wxItemContainer const *)arg1)->GetCount(); + result = (unsigned int)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -44124,11 +44150,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; wxString result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44142,11 +44168,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetString" "', expected argument " "1"" of type '" "wxItemContainer const *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxItemContainer const *)arg1)->GetString(arg2); @@ -44199,11 +44225,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; wxString *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool temp3 = false ; PyObject * obj0 = 0 ; @@ -44219,11 +44245,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetString" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -52497,6 +52523,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FSFile_GetModificationTime", (PyCFunction)_wrap_FSFile_GetModificationTime, METH_O, NULL}, { (char *)"FSFile_swigregister", FSFile_swigregister, METH_VARARGS, NULL}, { (char *)"FSFile_swiginit", FSFile_swiginit, METH_VARARGS, NULL}, + { (char *)"delete_CPPFileSystemHandler", (PyCFunction)_wrap_delete_CPPFileSystemHandler, METH_O, NULL}, { (char *)"CPPFileSystemHandler_swigregister", CPPFileSystemHandler_swigregister, METH_VARARGS, NULL}, { (char *)"new_FileSystemHandler", (PyCFunction)_wrap_new_FileSystemHandler, METH_NOARGS, NULL}, { (char *)"FileSystemHandler__setCallbackInfo", (PyCFunction) _wrap_FileSystemHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/wizard_wrap.cpp b/wxPython/src/mac/wizard_wrap.cpp index 41fcba0048..965853c264 100644 --- a/wxPython/src/mac/wizard_wrap.cpp +++ b/wxPython/src/mac/wizard_wrap.cpp @@ -2790,7 +2790,7 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) SWIGINTERN bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ wxChar* res = NULL; - if (resource.Length()) + if (resource.length()) res = (wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } @@ -2869,13 +2869,13 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); SWIGINTERN wxPyWizardPage *new_wxPyWizardPage(wxWizard *parent,wxBitmap const *bitmap=&wxNullBitmap,wxString const *resource=&wxPyEmptyString){ wxChar* res = NULL; - if (resource->Length()) + if (resource->length()) res = (wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } SWIGINTERN bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ wxChar* res = NULL; - if (resource.Length()) + if (resource.length()) res = (wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index e868ec051e..703e56d137 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -701,6 +701,14 @@ class ComboBox(Choice): """ return _controls_.ComboBox_SetStringSelection(*args, **kwargs) + def SetString(*args, **kwargs): + """ + SetString(self, int n, String string) + + Set the label for the n'th item (zero based) in the list. + """ + return _controls_.ComboBox_SetString(*args, **kwargs) + def SetEditable(*args, **kwargs): """SetEditable(self, bool editable)""" return _controls_.ComboBox_SetEditable(*args, **kwargs) @@ -1294,7 +1302,7 @@ class ListBox(_core.ControlWithItems): return _controls_.ListBox_Insert(*args, **kwargs) def InsertItems(*args, **kwargs): - """InsertItems(self, wxArrayString items, int pos)""" + """InsertItems(self, wxArrayString items, unsigned int pos)""" return _controls_.ListBox_InsertItems(*args, **kwargs) def Set(*args, **kwargs): @@ -1444,11 +1452,11 @@ class CheckListBox(ListBox): return _controls_.CheckListBox_Create(*args, **kwargs) def IsChecked(*args, **kwargs): - """IsChecked(self, int index) -> bool""" + """IsChecked(self, unsigned int index) -> bool""" return _controls_.CheckListBox_IsChecked(*args, **kwargs) def Check(*args, **kwargs): - """Check(self, int index, int check=True)""" + """Check(self, unsigned int index, int check=True)""" return _controls_.CheckListBox_Check(*args, **kwargs) def GetItemHeight(*args, **kwargs): @@ -2350,19 +2358,27 @@ class RadioBox(_core.Control): GetItemLabel = GetString SetItemLabel = SetString def EnableItem(*args, **kwargs): - """EnableItem(self, int n, bool enable=True)""" + """EnableItem(self, unsigned int n, bool enable=True)""" return _controls_.RadioBox_EnableItem(*args, **kwargs) def ShowItem(*args, **kwargs): - """ShowItem(self, int n, bool show=True)""" + """ShowItem(self, unsigned int n, bool show=True)""" return _controls_.RadioBox_ShowItem(*args, **kwargs) + def IsItemEnabled(*args, **kwargs): + """IsItemEnabled(self, unsigned int n) -> bool""" + return _controls_.RadioBox_IsItemEnabled(*args, **kwargs) + + def IsItemShown(*args, **kwargs): + """IsItemShown(self, unsigned int n) -> bool""" + return _controls_.RadioBox_IsItemShown(*args, **kwargs) + def GetColumnCount(*args, **kwargs): - """GetColumnCount(self) -> int""" + """GetColumnCount(self) -> unsigned int""" return _controls_.RadioBox_GetColumnCount(*args, **kwargs) def GetRowCount(*args, **kwargs): - """GetRowCount(self) -> int""" + """GetRowCount(self) -> unsigned int""" return _controls_.RadioBox_GetRowCount(*args, **kwargs) def GetNextItem(*args, **kwargs): diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index 9e1ce040ca..b7737a4a9d 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -2817,6 +2817,35 @@ SWIGINTERN void wxListBox_Insert(wxListBox *self,wxString const &item,int pos,Py } else self->Insert(item, pos); } + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) +{ + long v = 0; + if (SWIG_AsVal_long(obj, &v) && v < 0) { + return SWIG_TypeError; + } + else if (val) + *val = (unsigned long)v; + return SWIG_OK; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + SWIGINTERN PyObject *wxListBox_GetSelections(wxListBox *self){ wxArrayInt lst; self->GetSelections(lst); @@ -2845,19 +2874,6 @@ SWIGINTERN void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){ #endif } static const wxString wxPyTextCtrlNameStr(wxTextCtrlNameStr); - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val) -{ - long v = 0; - if (SWIG_AsVal_long(obj, &v) && v < 0) { - return SWIG_TypeError; - } - else if (val) - *val = (unsigned long)v; - return SWIG_OK; -} - SWIGINTERN void wxTextCtrl_write(wxTextCtrl *self,wxString const &text){ self->AppendText(text); } @@ -2885,6 +2901,13 @@ SWIG_From_size_t (size_t value) } +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + #include @@ -3123,29 +3146,6 @@ public: IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); - -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_int (unsigned int value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< unsigned int >(v); - } - } - return res; -} - SWIGINTERN wxPyTreeItemData *wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,wxTreeItemId const &item){ wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { @@ -6274,6 +6274,60 @@ fail: } +SWIGINTERN PyObject *_wrap_ComboBox_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxComboBox *arg1 = (wxComboBox *) 0 ; + int arg2 ; + wxString *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + bool temp3 = false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n",(char *) "string", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxComboBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComboBox_SetString" "', expected argument " "1"" of type '" "wxComboBox *""'"); + } + arg1 = reinterpret_cast< wxComboBox * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComboBox_SetString" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetString(arg2,(wxString const &)*arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + { + if (temp3) + delete arg3; + } + return resultobj; +fail: + { + if (temp3) + delete arg3; + } + return NULL; +} + + SWIGINTERN PyObject *_wrap_ComboBox_SetEditable(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxComboBox *arg1 = (wxComboBox *) 0 ; @@ -9088,11 +9142,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P PyObject *resultobj = 0; wxListBox *arg1 = (wxListBox *) 0 ; wxArrayString *arg2 = 0 ; - int arg3 ; + unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -9124,11 +9178,11 @@ SWIGINTERN PyObject *_wrap_ListBox_InsertItems(PyObject *SWIGUNUSEDPARM(self), P Py_DECREF(item); } } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ListBox_InsertItems" "', expected argument " "3"" of type '" "unsigned int""'"); } - arg3 = static_cast< int >(val3); + arg3 = static_cast< unsigned int >(val3); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->InsertItems((wxArrayString const &)*arg2,arg3); @@ -10217,11 +10271,11 @@ fail: SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -10235,11 +10289,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_IsChecked(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_IsChecked" "', expected argument " "1"" of type '" "wxCheckListBox *""'"); } arg1 = reinterpret_cast< wxCheckListBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_IsChecked" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (bool)(arg1)->IsChecked(arg2); @@ -10258,11 +10312,11 @@ fail: SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; - int arg2 ; + unsigned int arg2 ; int arg3 = (int) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; @@ -10279,11 +10333,11 @@ SWIGINTERN PyObject *_wrap_CheckListBox_Check(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CheckListBox_Check" "', expected argument " "1"" of type '" "wxCheckListBox *""'"); } arg1 = reinterpret_cast< wxCheckListBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CheckListBox_Check" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16492,11 +16546,11 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool arg3 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -16513,11 +16567,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_EnableItem(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_EnableItem" "', expected argument " "1"" of type '" "wxRadioBox *""'"); } arg1 = reinterpret_cast< wxRadioBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_EnableItem" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16541,11 +16595,11 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int arg2 ; + unsigned int arg2 ; bool arg3 = (bool) true ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; @@ -16562,11 +16616,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_ShowItem(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_ShowItem" "', expected argument " "1"" of type '" "wxRadioBox *""'"); } arg1 = reinterpret_cast< wxRadioBox * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_ShowItem" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); if (obj2) { ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { @@ -16587,10 +16641,92 @@ fail: } +SWIGINTERN PyObject *_wrap_RadioBox_IsItemEnabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRadioBox *arg1 = (wxRadioBox *) 0 ; + unsigned int arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemEnabled",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "1"" of type '" "wxRadioBox const *""'"); + } + arg1 = reinterpret_cast< wxRadioBox * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemEnabled" "', expected argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxRadioBox const *)arg1)->IsItemEnabled(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_RadioBox_IsItemShown(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxRadioBox *arg1 = (wxRadioBox *) 0 ; + unsigned int arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RadioBox_IsItemShown",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRadioBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RadioBox_IsItemShown" "', expected argument " "1"" of type '" "wxRadioBox const *""'"); + } + arg1 = reinterpret_cast< wxRadioBox * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RadioBox_IsItemShown" "', expected argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxRadioBox const *)arg1)->IsItemShown(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16604,11 +16740,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetColumnCount(PyObject *SWIGUNUSEDPARM(self arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxRadioBox const *)arg1)->GetColumnCount(); + result = (unsigned int)((wxRadioBox const *)arg1)->GetColumnCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -16618,7 +16754,7 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16632,11 +16768,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetRowCount(PyObject *SWIGUNUSEDPARM(self), arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxRadioBox const *)arg1)->GetRowCount(); + result = (unsigned int)((wxRadioBox const *)arg1)->GetRowCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -40790,6 +40926,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ComboBox_GetMark", (PyCFunction)_wrap_ComboBox_GetMark, METH_O, NULL}, { (char *)"ComboBox_GetCurrentSelection", (PyCFunction)_wrap_ComboBox_GetCurrentSelection, METH_O, NULL}, { (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction)_wrap_ComboBox_SetInsertionPointEnd, METH_O, NULL}, { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -41037,6 +41174,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"RadioBox_SetString", (PyCFunction) _wrap_RadioBox_SetString, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_EnableItem", (PyCFunction) _wrap_RadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_ShowItem", (PyCFunction) _wrap_RadioBox_ShowItem, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"RadioBox_IsItemEnabled", (PyCFunction) _wrap_RadioBox_IsItemEnabled, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"RadioBox_IsItemShown", (PyCFunction) _wrap_RadioBox_IsItemShown, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RadioBox_GetColumnCount", (PyCFunction)_wrap_RadioBox_GetColumnCount, METH_O, NULL}, { (char *)"RadioBox_GetRowCount", (PyCFunction)_wrap_RadioBox_GetRowCount, METH_O, NULL}, { (char *)"RadioBox_GetNextItem", (PyCFunction) _wrap_RadioBox_GetNextItem, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index f65f117204..64c546c016 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -1738,6 +1738,8 @@ class CPPFileSystemHandler(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + __swig_destroy__ = _core_.delete_CPPFileSystemHandler + __del__ = lambda self : None; CPPFileSystemHandler_swigregister = _core_.CPPFileSystemHandler_swigregister CPPFileSystemHandler_swigregister(CPPFileSystemHandler) @@ -10522,7 +10524,7 @@ class ItemContainer(object): def Insert(*args, **kwargs): """ - Insert(self, String item, int pos, PyObject clientData=None) -> int + Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int Insert an item into the control before the item at the ``pos`` index, optionally associating some data object with the item. @@ -10539,7 +10541,7 @@ class ItemContainer(object): def Delete(*args, **kwargs): """ - Delete(self, int n) + Delete(self, unsigned int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if @@ -10550,7 +10552,7 @@ class ItemContainer(object): def GetClientData(*args, **kwargs): """ - GetClientData(self, int n) -> PyObject + GetClientData(self, unsigned int n) -> PyObject Returns the client data associated with the given item, (if any.) """ @@ -10558,7 +10560,7 @@ class ItemContainer(object): def SetClientData(*args, **kwargs): """ - SetClientData(self, int n, PyObject clientData) + SetClientData(self, unsigned int n, PyObject clientData) Associate the given client data with the item at position n. """ @@ -10566,7 +10568,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> size_t + GetCount(self) -> unsigned int Returns the number of items in the control. """ @@ -10582,7 +10584,7 @@ class ItemContainer(object): def GetString(*args, **kwargs): """ - GetString(self, int n) -> String + GetString(self, unsigned int n) -> String Returns the label of the item with the given index. """ @@ -10594,7 +10596,7 @@ class ItemContainer(object): def SetString(*args, **kwargs): """ - SetString(self, int n, String s) + SetString(self, unsigned int n, String s) Sets the label for the given item. """ diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 9640df2b5e..3b97164879 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -3796,14 +3796,14 @@ SWIGINTERN int wxItemContainer_Append(wxItemContainer *self,wxString const &item } else return self->Append(item); } -SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,int pos,PyObject *clientData=NULL){ +SWIGINTERN int wxItemContainer_Insert(wxItemContainer *self,wxString const &item,unsigned int pos,PyObject *clientData=NULL){ if (clientData) { wxPyClientData* data = new wxPyClientData(clientData); return self->Insert(item, pos, data); } else return self->Insert(item, pos); } -SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ +SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,unsigned int n){ wxPyClientData* data = (wxPyClientData*)self->GetClientObject(n); if (data) { Py_INCREF(data->m_obj); @@ -3813,7 +3813,7 @@ SWIGINTERN PyObject *wxItemContainer_GetClientData(wxItemContainer *self,int n){ return Py_None; } } -SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientData){ +SWIGINTERN void wxItemContainer_SetClientData(wxItemContainer *self,unsigned int n,PyObject *clientData){ wxPyClientData* data = new wxPyClientData(clientData); self->SetClientObject(n, data); } @@ -9813,6 +9813,34 @@ SWIGINTERN PyObject *FSFile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *a return SWIG_Python_InitShadowInstance(args); } +SWIGINTERN PyObject *_wrap_delete_CPPFileSystemHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxFileSystemHandler *arg1 = (wxFileSystemHandler *) 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_wxFileSystemHandler, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CPPFileSystemHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); + } + arg1 = reinterpret_cast< wxFileSystemHandler * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete arg1; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *CPPFileSystemHandler_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -10635,7 +10663,6 @@ fail: SWIGINTERN PyObject *_wrap_FileSystem_AddHandler(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxFileSystemHandler *arg1 = (wxFileSystemHandler *) 0 ; - void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; char * kwnames[] = { @@ -10643,11 +10670,10 @@ SWIGINTERN PyObject *_wrap_FileSystem_AddHandler(PyObject *SWIGUNUSEDPARM(self), }; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileSystem_AddHandler",kwnames,&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxFileSystemHandler, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_wxFileSystemHandler, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileSystem_AddHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileSystem_AddHandler" "', expected argument " "1"" of type '" "wxFileSystemHandler *""'"); } - arg1 = reinterpret_cast< wxFileSystemHandler * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); wxFileSystem::AddHandler(arg1); @@ -43888,13 +43914,13 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; wxString *arg2 = 0 ; - int arg3 ; + unsigned int arg3 ; PyObject *arg4 = (PyObject *) NULL ; int result; void *argp1 = 0 ; int res1 = 0 ; bool temp2 = false ; - int val3 ; + unsigned int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -43915,11 +43941,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Insert(PyObject *SWIGUNUSEDPARM(self), if (arg2 == NULL) SWIG_fail; temp2 = true; } - ecode3 = SWIG_AsVal_int(obj2, &val3); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ItemContainer_Insert" "', expected argument " "3"" of type '" "unsigned int""'"); } - arg3 = static_cast< int >(val3); + arg3 = static_cast< unsigned int >(val3); if (obj3) { arg4 = obj3; } @@ -43974,10 +44000,10 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -43991,11 +44017,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_Delete(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_Delete" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_Delete" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->Delete(arg2); @@ -44012,11 +44038,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; PyObject *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44030,11 +44056,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = (PyObject *)wxItemContainer_GetClientData(arg1,arg2); @@ -44051,11 +44077,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; PyObject *arg3 = (PyObject *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44070,11 +44096,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetClientData(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetClientData" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetClientData" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); arg3 = obj2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -44092,7 +44118,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - size_t result; + unsigned int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -44106,11 +44132,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (size_t)((wxItemContainer const *)arg1)->GetCount(); + result = (unsigned int)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: return NULL; @@ -44150,11 +44176,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; wxString result; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -44168,11 +44194,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_GetString" "', expected argument " "1"" of type '" "wxItemContainer const *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_GetString" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); result = ((wxItemContainer const *)arg1)->GetString(arg2); @@ -44225,11 +44251,11 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int arg2 ; + unsigned int arg2 ; wxString *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - int val2 ; + unsigned int val2 ; int ecode2 = 0 ; bool temp3 = false ; PyObject * obj0 = 0 ; @@ -44245,11 +44271,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_SetString(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ItemContainer_SetString" "', expected argument " "1"" of type '" "wxItemContainer *""'"); } arg1 = reinterpret_cast< wxItemContainer * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ItemContainer_SetString" "', expected argument " "2"" of type '" "unsigned int""'"); } - arg2 = static_cast< int >(val2); + arg2 = static_cast< unsigned int >(val2); { arg3 = wxString_in_helper(obj2); if (arg3 == NULL) SWIG_fail; @@ -52523,6 +52549,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FSFile_GetModificationTime", (PyCFunction)_wrap_FSFile_GetModificationTime, METH_O, NULL}, { (char *)"FSFile_swigregister", FSFile_swigregister, METH_VARARGS, NULL}, { (char *)"FSFile_swiginit", FSFile_swiginit, METH_VARARGS, NULL}, + { (char *)"delete_CPPFileSystemHandler", (PyCFunction)_wrap_delete_CPPFileSystemHandler, METH_O, NULL}, { (char *)"CPPFileSystemHandler_swigregister", CPPFileSystemHandler_swigregister, METH_VARARGS, NULL}, { (char *)"new_FileSystemHandler", (PyCFunction)_wrap_new_FileSystemHandler, METH_NOARGS, NULL}, { (char *)"FileSystemHandler__setCallbackInfo", (PyCFunction) _wrap_FileSystemHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/wizard_wrap.cpp b/wxPython/src/msw/wizard_wrap.cpp index 4b9ca50cd6..5e84e81f7e 100644 --- a/wxPython/src/msw/wizard_wrap.cpp +++ b/wxPython/src/msw/wizard_wrap.cpp @@ -2790,7 +2790,7 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) SWIGINTERN bool wxWizardPage_Create(wxWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ wxChar* res = NULL; - if (resource.Length()) + if (resource.length()) res = (wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } @@ -2869,13 +2869,13 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); SWIGINTERN wxPyWizardPage *new_wxPyWizardPage(wxWizard *parent,wxBitmap const *bitmap=&wxNullBitmap,wxString const *resource=&wxPyEmptyString){ wxChar* res = NULL; - if (resource->Length()) + if (resource->length()) res = (wxChar*)resource->c_str(); return new wxPyWizardPage(parent, *bitmap, res); } SWIGINTERN bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const &bitmap=wxNullBitmap,wxString const &resource=wxPyEmptyString){ wxChar* res = NULL; - if (resource.Length()) + if (resource.length()) res = (wxChar*)resource.c_str(); return self->Create(parent, bitmap, res); } -- 2.45.2