X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/474c48f92ec642facb72551404955c55ac9f3fba..daa3eac94c219acca125c79177ac662961850929:/wxPython/src/gtk/controls.cpp diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index e7cb20a093..4520a7c713 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -74,7 +74,6 @@ extern PyObject *SWIG_newvarlink(void); #endif - static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; @@ -101,11 +100,30 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif +//#define DECLARE_DEF_STRING(name) static wxString* wxPy##name + + // Put some wx default wxChar* values into wxStrings. + DECLARE_DEF_STRING(ControlNameStr); + DECLARE_DEF_STRING(ButtonNameStr); + DECLARE_DEF_STRING(CheckBoxNameStr); + DECLARE_DEF_STRING(ChoiceNameStr); + DECLARE_DEF_STRING(ComboBoxNameStr); + DECLARE_DEF_STRING(GaugeNameStr); + DECLARE_DEF_STRING(StaticBoxNameStr); + DECLARE_DEF_STRING(StaticTextNameStr); + DECLARE_DEF_STRING(ListBoxNameStr); + DECLARE_DEF_STRING(TextCtrlNameStr); + DECLARE_DEF_STRING(ScrollBarNameStr); + DECLARE_DEF_STRING(SPIN_BUTTON_NAME); + DECLARE_DEF_STRING(StaticBitmapNameStr); + DECLARE_DEF_STRING(RadioBoxNameStr); + DECLARE_DEF_STRING(RadioButtonNameStr); + DECLARE_DEF_STRING(SliderNameStr); + + wxChar* wxSpinCtrlNameStr = _T("wxSpinCtrl"); + DECLARE_DEF_STRING(SpinCtrlNameStr); + + static const wxString wxPyEmptyString(wxT("")); #ifdef __cplusplus extern "C" { #endif @@ -158,18 +176,19 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; - char * _arg6 = (char *) "control"; + wxString * _arg6 = (wxString *) &wxPyControlNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; PyObject * _argo5 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "parent","id","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlOs:new_wxControl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_argo5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlOO:new_wxControl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_argo5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -197,9 +216,15 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k return NULL; } } + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxControl *)new_wxControl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -210,6 +235,10 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -225,7 +254,7 @@ static PyObject *_wrap_new_wxPreControl(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxControl *)new_wxPreControl(); + _result = (wxControl *)new_wxPreControl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -250,7 +279,7 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "control"; + wxString * _arg7 = (wxString *) &wxPyControlNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -258,10 +287,11 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlOs:wxControl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlOO:wxControl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -296,13 +326,23 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxControl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -334,7 +374,7 @@ static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_Command(_arg0,*_arg1); + wxControl_Command(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -363,12 +403,16 @@ static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControl_GetLabel(_arg0)); + _result = new wxString (wxControl_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -396,26 +440,13 @@ static PyObject *_wrap_wxControl_SetLabel(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_SetLabel(_arg0,*_arg1); + wxControl_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -480,7 +511,7 @@ static PyObject *_wrap_wxControlWithItems_Delete(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Delete(_arg0,_arg1); + wxControlWithItems_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -509,7 +540,7 @@ static PyObject *_wrap_wxControlWithItems_GetCount(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_GetCount(_arg0); + _result = (int )wxControlWithItems_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -538,12 +569,16 @@ static PyObject *_wrap_wxControlWithItems_GetString(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); + _result = new wxString (wxControlWithItems_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -572,26 +607,13 @@ static PyObject *_wrap_wxControlWithItems_SetString(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_SetString(_arg0,_arg1,*_arg2); + wxControlWithItems_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -625,26 +647,13 @@ static PyObject *_wrap_wxControlWithItems_FindString(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); + _result = (int )wxControlWithItems_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -676,7 +685,7 @@ static PyObject *_wrap_wxControlWithItems_Select(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Select(_arg0,_arg1); + wxControlWithItems_Select(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -705,7 +714,7 @@ static PyObject *_wrap_wxControlWithItems_GetSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxControlWithItems_GetSelection(_arg0); + _result = (int )wxControlWithItems_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -733,12 +742,16 @@ static PyObject *_wrap_wxControlWithItems_GetStringSelection(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); + _result = new wxString (wxControlWithItems_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -774,22 +787,9 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { @@ -797,7 +797,7 @@ static PyObject *_wrap_wxControlWithItems_Append(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_Append(_arg0,*_arg1,_arg2); + wxControlWithItems_Append(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -840,7 +840,7 @@ static PyObject *_wrap_wxControlWithItems_GetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); + _result = (PyObject *)wxControlWithItems_GetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -878,12 +878,66 @@ static PyObject *_wrap_wxControlWithItems_SetClientData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); + wxControlWithItems_SetClientData(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxControlWithItems_AppendItems(_swigobj,_swigarg0) (_swigobj->Append(_swigarg0)) +static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxControlWithItems * _arg0; + wxArrayString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","strings", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxControlWithItems_AppendItems",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxControlWithItems_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxControlWithItems_AppendItems. Expected _wxControlWithItems_p."); + return NULL; + } + } +{ + if (! PySequence_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, "Sequence of strings expected."); + return NULL; + } + _arg1 = new wxArrayString; + int i, len=PySequence_Length(_obj1); + for (i=0; iAdd(PyUnicode_AsUnicode(str)); +#else + PyObject* str = PyObject_Str(item); + _arg1->Add(PyString_AsString(str)); +#endif + Py_DECREF(item); + Py_DECREF(str); + } +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxControlWithItems_AppendItems(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -930,7 +984,7 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "button"; + wxString * _arg7 = (wxString *) &wxPyButtonNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; @@ -938,11 +992,12 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","label","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOs:new_wxButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOO:new_wxButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -952,22 +1007,9 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -988,9 +1030,15 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxButton *)new_wxButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1004,6 +1052,10 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -1020,7 +1072,7 @@ static PyObject *_wrap_new_wxPreButton(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxButton *)new_wxPreButton(); + _result = (wxButton *)new_wxPreButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1046,7 +1098,7 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "button"; + wxString * _arg8 = (wxString *) &wxPyButtonNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -1055,10 +1107,11 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","label","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOO:wxButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1075,22 +1128,9 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -1111,9 +1151,15 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1121,6 +1167,10 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -1144,7 +1194,7 @@ static PyObject *_wrap_wxButton_SetDefault(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetDefault(_arg0); + wxButton_SetDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1180,7 +1230,7 @@ static PyObject *_wrap_wxButton_SetBackgroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetBackgroundColour(_arg0,*_arg1); + wxButton_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1216,7 +1266,7 @@ static PyObject *_wrap_wxButton_SetForegroundColour(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxButton_SetForegroundColour(_arg0,*_arg1); + wxButton_SetForegroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1236,7 +1286,7 @@ static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxButton::GetDefaultSize()); + _result = new wxSize (wxButton::GetDefaultSize()); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1296,7 +1346,7 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxBU_AUTODRAW; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "button"; + wxString * _arg7 = (wxString *) &wxPyButtonNameStr; PyObject * _argo0 = 0; PyObject * _argo2 = 0; wxPoint temp; @@ -1304,11 +1354,12 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","bitmap","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOs:new_wxBitmapButton",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOO:new_wxBitmapButton",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1343,9 +1394,15 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxBitmapButton *)new_wxBitmapButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1356,6 +1413,10 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -1371,7 +1432,7 @@ static PyObject *_wrap_new_wxPreBitmapButton(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxBitmapButton *)new_wxPreBitmapButton(); + _result = (wxBitmapButton *)new_wxPreBitmapButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1397,7 +1458,7 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) wxBU_AUTODRAW; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "button"; + wxString * _arg8 = (wxString *) &wxPyButtonNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _argo3 = 0; @@ -1406,10 +1467,11 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","bitmap","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxBitmapButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOO:wxBitmapButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1451,13 +1513,23 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxBitmapButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj8) + delete _arg8; +} return _resultobj; } @@ -1482,7 +1554,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapLabel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1512,7 +1584,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapDisabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapDisabled(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1542,7 +1614,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapFocus(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapFocus(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1572,7 +1644,7 @@ static PyObject *_wrap_wxBitmapButton_GetBitmapSelected(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); + _result = new wxBitmap (wxBitmapButton_GetBitmapSelected(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1609,7 +1681,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); + wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1646,7 +1718,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); + wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1683,7 +1755,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); + wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1720,7 +1792,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); + wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1750,7 +1822,7 @@ static PyObject *_wrap_wxBitmapButton_SetMargins(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); + wxBitmapButton_SetMargins(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1779,7 +1851,7 @@ static PyObject *_wrap_wxBitmapButton_GetMarginX(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmapButton_GetMarginX(_arg0); + _result = (int )wxBitmapButton_GetMarginX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1807,7 +1879,7 @@ static PyObject *_wrap_wxBitmapButton_GetMarginY(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxBitmapButton_GetMarginY(_arg0); + _result = (int )wxBitmapButton_GetMarginY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1858,7 +1930,7 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "checkBox"; + wxString * _arg7 = (wxString *) &wxPyCheckBoxNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; @@ -1866,11 +1938,12 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","label","pos","size","style","val","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOs:new_wxCheckBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOO:new_wxCheckBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1880,22 +1953,9 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -1916,9 +1976,15 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxCheckBox *)new_wxCheckBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1932,6 +1998,10 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -1948,7 +2018,7 @@ static PyObject *_wrap_new_wxPreCheckBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckBox *)new_wxPreCheckBox(); + _result = (wxCheckBox *)new_wxPreCheckBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1974,7 +2044,7 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "checkBox"; + wxString * _arg8 = (wxString *) &wxPyCheckBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -1983,10 +2053,11 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","label","pos","size","style","val","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxCheckBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOO:wxCheckBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2003,22 +2074,9 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -2039,9 +2097,15 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxCheckBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2049,6 +2113,10 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -2073,7 +2141,7 @@ static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckBox_GetValue(_arg0); + _result = (bool )wxCheckBox_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2103,7 +2171,7 @@ static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckBox_SetValue(_arg0,_arg1); + wxCheckBox_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2164,7 +2232,7 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "choice"; + wxString * _arg8 = (wxString *) &wxPyChoiceNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; @@ -2172,11 +2240,12 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw PyObject * _obj3 = 0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOs:new_wxChoice",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOO:new_wxChoice",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2211,6 +2280,12 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { if (_obj5) { _arg4 = PyList_Size(_obj5); @@ -2221,7 +2296,7 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxChoice *)new_wxChoice(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2234,6 +2309,10 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } { delete [] _arg5; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -2250,7 +2329,7 @@ static PyObject *_wrap_new_wxPreChoice(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxChoice *)new_wxPreChoice(); + _result = (wxChoice *)new_wxPreChoice(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2277,7 +2356,7 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; - char * _arg9 = (char *) "choice"; + wxString * _arg9 = (wxString *) &wxPyChoiceNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -2286,10 +2365,11 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject PyObject * _obj4 = 0; PyObject * _obj6 = 0; PyObject * _argo8 = 0; + PyObject * _obj9 = 0; char *_kwnames[] = { "self","parent","id","pos","size","choices","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOs:wxChoice_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOO:wxChoice_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2331,6 +2411,12 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -2341,13 +2427,17 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxChoice_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,*_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { delete [] _arg6; +} +{ + if (_obj9) + delete _arg9; } return _resultobj; } @@ -2371,7 +2461,7 @@ static PyObject *_wrap_wxChoice_Clear(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_Clear(_arg0); + wxChoice_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2400,7 +2490,7 @@ static PyObject *_wrap_wxChoice_GetColumns(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxChoice_GetColumns(_arg0); + _result = (int )wxChoice_GetColumns(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2428,7 +2518,7 @@ static PyObject *_wrap_wxChoice_SetColumns(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetColumns(_arg0,_arg1); + wxChoice_SetColumns(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2457,7 +2547,7 @@ static PyObject *_wrap_wxChoice_SetSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetSelection(_arg0,_arg1); + wxChoice_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2486,26 +2576,13 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetStringSelection(_arg0,*_arg1); + wxChoice_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2539,26 +2616,13 @@ static PyObject *_wrap_wxChoice_SetString(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxChoice_SetString(_arg0,_arg1,*_arg2); + wxChoice_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2609,26 +2673,28 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * wxComboBox * _result; wxWindow * _arg0; wxWindowID _arg1; - char * _arg2 = (char *) ""; + wxString * _arg2 = (wxString *) &wxPyEmptyString; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; int _arg5 = (int ) 0; wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; - char * _arg9 = (char *) "comboBox"; + wxString * _arg9 = (wxString *) &wxPyComboBoxNameStr; PyObject * _argo0 = 0; + PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; PyObject * _obj6 = 0; PyObject * _argo8 = 0; + PyObject * _obj9 = 0; char *_kwnames[] = { "parent","id","value","pos","size","choices","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|sOOOlOs:new_wxComboBox",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOOlOO:new_wxComboBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2637,6 +2703,12 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} if (_obj3) { _arg3 = &temp; @@ -2663,6 +2735,12 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -2673,7 +2751,7 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (wxComboBox *)new_wxComboBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,*_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2684,8 +2762,16 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj2) + delete _arg2; +} { delete [] _arg6; +} +{ + if (_obj9) + delete _arg9; } return _resultobj; } @@ -2702,7 +2788,7 @@ static PyObject *_wrap_new_wxPreComboBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxComboBox *)new_wxPreComboBox(); + _result = (wxComboBox *)new_wxPreComboBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2723,26 +2809,28 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec wxComboBox * _arg0; wxWindow * _arg1; wxWindowID _arg2; - char * _arg3 = (char *) ""; + wxString * _arg3 = (wxString *) &wxPyEmptyString; wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; wxSize * _arg5 = (wxSize *) &wxDefaultSize; int _arg6 = (int ) 0; wxString * _arg7 = (wxString *) NULL; long _arg8 = (long ) 0; wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; - char * _arg10 = (char *) "comboBox"; + wxString * _arg10 = (wxString *) &wxPyComboBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; + PyObject * _obj3 = 0; wxPoint temp; PyObject * _obj4 = 0; wxSize temp0; PyObject * _obj5 = 0; PyObject * _obj7 = 0; PyObject * _argo9 = 0; + PyObject * _obj10 = 0; char *_kwnames[] = { "self","parent","id","value","pos","size","choices","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|sOOOlOs:wxComboBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_obj7,&_arg8,&_argo9,&_arg10)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOOlOO:wxComboBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_obj7,&_arg8,&_argo9,&_obj10)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2758,6 +2846,12 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj3) +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} if (_obj4) { _arg4 = &temp; @@ -2784,6 +2878,12 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj10) +{ + _arg10 = wxString_in_helper(_obj10); + if (_arg10 == NULL) + return NULL; +} { if (_obj7) { _arg6 = PyList_Size(_obj7); @@ -2794,13 +2894,21 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + _result = (bool )wxComboBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,*_arg9,*_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} { delete [] _arg7; +} +{ + if (_obj10) + delete _arg10; } return _resultobj; } @@ -2824,7 +2932,7 @@ static PyObject *_wrap_wxComboBox_Copy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Copy(_arg0); + wxComboBox_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2852,7 +2960,7 @@ static PyObject *_wrap_wxComboBox_Cut(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Cut(_arg0); + wxComboBox_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2881,7 +2989,7 @@ static PyObject *_wrap_wxComboBox_GetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxComboBox_GetInsertionPoint(_arg0); + _result = (long )wxComboBox_GetInsertionPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2909,7 +3017,7 @@ static PyObject *_wrap_wxComboBox_GetLastPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxComboBox_GetLastPosition(_arg0); + _result = (long )wxComboBox_GetLastPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2937,12 +3045,16 @@ static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetValue(_arg0)); + _result = new wxString (wxComboBox_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -2969,7 +3081,7 @@ static PyObject *_wrap_wxComboBox_Paste(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Paste(_arg0); + wxComboBox_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3000,26 +3112,13 @@ static PyObject *_wrap_wxComboBox_Replace(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); + wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3053,7 +3152,7 @@ static PyObject *_wrap_wxComboBox_Remove(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Remove(_arg0,_arg1,_arg2); + wxComboBox_Remove(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3082,7 +3181,7 @@ static PyObject *_wrap_wxComboBox_SetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetInsertionPoint(_arg0,_arg1); + wxComboBox_SetInsertionPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3110,7 +3209,7 @@ static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetInsertionPointEnd(_arg0); + wxComboBox_SetInsertionPointEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3139,7 +3238,7 @@ static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetSelection(_arg0,_arg1); + wxComboBox_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3169,7 +3268,7 @@ static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetMark(_arg0,_arg1,_arg2); + wxComboBox_SetMark(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3198,26 +3297,13 @@ static PyObject *_wrap_wxComboBox_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetValue(_arg0,*_arg1); + wxComboBox_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3252,7 +3338,7 @@ static PyObject *_wrap_wxComboBox_SetEditable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetEditable(_arg0,_arg1); + wxComboBox_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3280,7 +3366,7 @@ static PyObject *_wrap_wxComboBox_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Clear(_arg0); + wxComboBox_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3309,7 +3395,7 @@ static PyObject *_wrap_wxComboBox_Delete(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Delete(_arg0,_arg1); + wxComboBox_Delete(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3338,7 +3424,7 @@ static PyObject *_wrap_wxComboBox_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxComboBox_GetCount(_arg0); + _result = (int )wxComboBox_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3367,12 +3453,16 @@ static PyObject *_wrap_wxComboBox_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetString(_arg0,_arg1)); + _result = new wxString (wxComboBox_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3401,26 +3491,13 @@ static PyObject *_wrap_wxComboBox_FindString(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxComboBox_FindString(_arg0,*_arg1); + _result = (int )wxComboBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3452,7 +3529,7 @@ static PyObject *_wrap_wxComboBox_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxComboBox_GetSelection(_arg0); + _result = (int )wxComboBox_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3480,12 +3557,16 @@ static PyObject *_wrap_wxComboBox_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxComboBox_GetStringSelection(_arg0)); + _result = new wxString (wxComboBox_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3521,22 +3602,9 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } if (_obj2) { @@ -3544,7 +3612,7 @@ static PyObject *_wrap_wxComboBox_Append(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Append(_arg0,*_arg1,_arg2); + wxComboBox_Append(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3587,7 +3655,7 @@ static PyObject *_wrap_wxComboBox_GetClientData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxComboBox_GetClientData(_arg0,_arg1); + _result = (PyObject *)wxComboBox_GetClientData(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3625,7 +3693,7 @@ static PyObject *_wrap_wxComboBox_SetClientData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_SetClientData(_arg0,_arg1,_arg2); + wxComboBox_SetClientData(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3677,18 +3745,19 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxGA_HORIZONTAL; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "gauge"; + wxString * _arg7 = (wxString *) &wxPyGaugeNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","range","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|OOlOs:new_wxGauge",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|OOlOO:new_wxGauge",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3716,9 +3785,15 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxGauge *)new_wxGauge(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3729,6 +3804,10 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -3744,7 +3823,7 @@ static PyObject *_wrap_new_wxPreGauge(PyObject *self, PyObject *args, PyObject * return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxGauge *)new_wxPreGauge(); + _result = (wxGauge *)new_wxPreGauge(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3770,7 +3849,7 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) wxGA_HORIZONTAL; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "gauge"; + wxString * _arg8 = (wxString *) &wxPyGaugeNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -3778,10 +3857,11 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","range","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii|OOlOs:wxGauge_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii|OOlOO:wxGauge_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3816,13 +3896,23 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxGauge_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj8) + delete _arg8; +} return _resultobj; } @@ -3846,7 +3936,7 @@ static PyObject *_wrap_wxGauge_GetBezelFace(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetBezelFace(_arg0); + _result = (int )wxGauge_GetBezelFace(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3874,7 +3964,7 @@ static PyObject *_wrap_wxGauge_GetRange(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetRange(_arg0); + _result = (int )wxGauge_GetRange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3902,7 +3992,7 @@ static PyObject *_wrap_wxGauge_GetShadowWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetShadowWidth(_arg0); + _result = (int )wxGauge_GetShadowWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3930,7 +4020,7 @@ static PyObject *_wrap_wxGauge_GetValue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxGauge_GetValue(_arg0); + _result = (int )wxGauge_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3958,7 +4048,7 @@ static PyObject *_wrap_wxGauge_SetBezelFace(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetBezelFace(_arg0,_arg1); + wxGauge_SetBezelFace(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3987,7 +4077,7 @@ static PyObject *_wrap_wxGauge_SetRange(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetRange(_arg0,_arg1); + wxGauge_SetRange(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4016,7 +4106,7 @@ static PyObject *_wrap_wxGauge_SetShadowWidth(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetShadowWidth(_arg0,_arg1); + wxGauge_SetShadowWidth(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4045,7 +4135,7 @@ static PyObject *_wrap_wxGauge_SetValue(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGauge_SetValue(_arg0,_arg1); + wxGauge_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4096,18 +4186,19 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - char * _arg6 = (char *) "staticBox"; + wxString * _arg6 = (wxString *) &wxPyStaticBoxNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "parent","id","label","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxStaticBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlO:new_wxStaticBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4117,22 +4208,9 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -4145,10 +4223,16 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticBox *)new_wxStaticBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4162,6 +4246,10 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -4178,7 +4266,7 @@ static PyObject *_wrap_new_wxPreStaticBox(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBox *)new_wxPreStaticBox(); + _result = (wxStaticBox *)new_wxPreStaticBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4203,7 +4291,7 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; - char * _arg7 = (char *) "staticBox"; + wxString * _arg7 = (wxString *) &wxPyStaticBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -4211,10 +4299,11 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje PyObject * _obj4 = 0; wxSize temp0; PyObject * _obj5 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "self","parent","id","label","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxStaticBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlO:wxStaticBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4231,22 +4320,9 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4259,10 +4335,16 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje _arg5 = &temp0; if (! wxSize_helper(_obj5, &_arg5)) return NULL; +} + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4270,6 +4352,10 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje { if (_obj3) delete _arg3; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -4315,17 +4401,18 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxLI_HORIZONTAL; - char * _arg5 = (char *) "staticLine"; + wxString * _arg5 = (wxString *) &wxPyStaticTextNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxStaticLine",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxStaticLine",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4345,10 +4432,16 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject _arg3 = &temp0; if (! wxSize_helper(_obj3, &_arg3)) return NULL; +} + if (_obj5) +{ + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxStaticLine *)new_wxStaticLine(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4359,6 +4452,10 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -4374,7 +4471,7 @@ static PyObject *_wrap_new_wxPreStaticLine(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticLine *)new_wxPreStaticLine(); + _result = (wxStaticLine *)new_wxPreStaticLine(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4398,17 +4495,18 @@ static PyObject *_wrap_wxStaticLine_Create(PyObject *self, PyObject *args, PyObj wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxLI_HORIZONTAL; - char * _arg6 = (char *) "staticLine"; + wxString * _arg6 = (wxString *) &wxPyStaticTextNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxStaticLine_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxStaticLine_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4435,14 +4533,24 @@ static PyObject *_wrap_wxStaticLine_Create(PyObject *self, PyObject *args, PyObj _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxStaticLine_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -4488,18 +4596,19 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - char * _arg6 = (char *) "staticText"; + wxString * _arg6 = (wxString *) &wxPyStaticTextNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "parent","id","label","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxStaticText",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlO:new_wxStaticText",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4509,22 +4618,9 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -4537,10 +4633,16 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticText *)new_wxStaticText(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4554,6 +4656,10 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -4570,7 +4676,7 @@ static PyObject *_wrap_new_wxPreStaticText(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticText *)new_wxPreStaticText(); + _result = (wxStaticText *)new_wxPreStaticText(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4595,7 +4701,7 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; - char * _arg7 = (char *) "staticText"; + wxString * _arg7 = (wxString *) &wxPyStaticTextNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -4603,10 +4709,11 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj PyObject * _obj4 = 0; wxSize temp0; PyObject * _obj5 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "self","parent","id","label","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxStaticText_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlO:wxStaticText_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4623,22 +4730,9 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -4651,10 +4745,16 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj _arg5 = &temp0; if (! wxSize_helper(_obj5, &_arg5)) return NULL; +} + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticText_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4662,6 +4762,10 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj { if (_obj3) delete _arg3; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -4686,12 +4790,16 @@ static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxStaticText_GetLabel(_arg0)); + _result = new wxString (wxStaticText_GetLabel(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4719,26 +4827,13 @@ static PyObject *_wrap_wxStaticText_SetLabel(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticText_SetLabel(_arg0,*_arg1); + wxStaticText_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4803,7 +4898,7 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "listBox"; + wxString * _arg8 = (wxString *) &wxPyListBoxNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; @@ -4811,11 +4906,12 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k PyObject * _obj3 = 0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOs:new_wxListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOO:new_wxListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4850,6 +4946,12 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { if (_obj5) { _arg4 = PyList_Size(_obj5); @@ -4860,7 +4962,7 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxListBox *)new_wxListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4873,6 +4975,10 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } { delete [] _arg5; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -4889,7 +4995,7 @@ static PyObject *_wrap_new_wxPreListBox(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxListBox *)new_wxPreListBox(); + _result = (wxListBox *)new_wxPreListBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4916,7 +5022,7 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; - char * _arg9 = (char *) "listBox"; + wxString * _arg9 = (wxString *) &wxPyListBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -4925,10 +5031,11 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject PyObject * _obj4 = 0; PyObject * _obj6 = 0; PyObject * _argo8 = 0; + PyObject * _obj9 = 0; char *_kwnames[] = { "self","parent","id","pos","size","choices","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOs:wxListBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOO:wxListBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4970,6 +5077,12 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -4980,13 +5093,17 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,*_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { delete [] _arg6; +} +{ + if (_obj9) + delete _arg9; } return _resultobj; } @@ -5010,7 +5127,7 @@ static PyObject *_wrap_wxListBox_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Clear(_arg0); + wxListBox_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5039,7 +5156,7 @@ static PyObject *_wrap_wxListBox_Deselect(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Deselect(_arg0,_arg1); + wxListBox_Deselect(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5076,7 +5193,7 @@ static PyObject *_wrap_wxListBox_GetSelections(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxListBox_GetSelections(_arg0); + _result = (PyObject *)wxListBox_GetSelections(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5123,7 +5240,7 @@ static PyObject *_wrap_wxListBox_InsertItems(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + wxListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5156,7 +5273,7 @@ static PyObject *_wrap_wxListBox_IsSelected(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_IsSelected(_arg0,_arg1); + _result = (bool )wxListBox_IsSelected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5185,7 +5302,7 @@ static PyObject *_wrap_wxListBox_Selected(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxListBox_Selected(_arg0,_arg1); + _result = (bool )wxListBox_Selected(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5230,7 +5347,7 @@ static PyObject *_wrap_wxListBox_Set(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_Set(_arg0,_arg1,_arg2); + wxListBox_Set(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5262,7 +5379,7 @@ static PyObject *_wrap_wxListBox_SetFirstItem(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetFirstItem(_arg0,_arg1); + wxListBox_SetFirstItem(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5291,26 +5408,13 @@ static PyObject *_wrap_wxListBox_SetFirstItemStr(PyObject *self, PyObject *args, } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetFirstItemStr(_arg0,*_arg1); + wxListBox_SetFirstItemStr(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5346,7 +5450,7 @@ static PyObject *_wrap_wxListBox_SetSelection(PyObject *self, PyObject *args, Py _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetSelection(_arg0,_arg1,_arg2); + wxListBox_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5376,26 +5480,13 @@ static PyObject *_wrap_wxListBox_SetString(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetString(_arg0,_arg1,*_arg2); + wxListBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5430,27 +5521,14 @@ static PyObject *_wrap_wxListBox_SetStringSelection(PyObject *self, PyObject *ar } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); + wxListBox_SetStringSelection(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5523,7 +5601,7 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje wxString * _arg5 = (wxString *) NULL; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "listBox"; + wxString * _arg8 = (wxString *) &wxPyListBoxNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; @@ -5531,11 +5609,12 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje PyObject * _obj3 = 0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "parent","id","pos","size","choices","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOs:new_wxCheckListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOO:new_wxCheckListBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5570,6 +5649,12 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { if (_obj5) { _arg4 = PyList_Size(_obj5); @@ -5580,7 +5665,7 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,_arg8); + _result = (wxCheckListBox *)new_wxCheckListBox(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5593,6 +5678,10 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } { delete [] _arg5; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -5609,7 +5698,7 @@ static PyObject *_wrap_new_wxPreCheckListBox(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCheckListBox *)new_wxPreCheckListBox(); + _result = (wxCheckListBox *)new_wxPreCheckListBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5636,7 +5725,7 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO wxString * _arg6 = (wxString *) NULL; long _arg7 = (long ) 0; wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; - char * _arg9 = (char *) "listBox"; + wxString * _arg9 = (wxString *) &wxPyListBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -5645,10 +5734,11 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO PyObject * _obj4 = 0; PyObject * _obj6 = 0; PyObject * _argo8 = 0; + PyObject * _obj9 = 0; char *_kwnames[] = { "self","parent","id","pos","size","choices","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOs:wxCheckListBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOO:wxCheckListBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj6,&_arg7,&_argo8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5690,6 +5780,12 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -5700,13 +5796,17 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,_arg9); + _result = (bool )wxCheckListBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,*_arg8,*_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); { delete [] _arg6; +} +{ + if (_obj9) + delete _arg9; } return _resultobj; } @@ -5732,7 +5832,7 @@ static PyObject *_wrap_wxCheckListBox_IsChecked(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); + _result = (bool )wxCheckListBox_IsChecked(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5761,7 +5861,7 @@ static PyObject *_wrap_wxCheckListBox_Check(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckListBox_Check(_arg0,_arg1,_arg2); + wxCheckListBox_Check(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5807,7 +5907,7 @@ static PyObject *_wrap_wxCheckListBox_InsertItems(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); + wxCheckListBox_InsertItems(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5839,7 +5939,7 @@ static PyObject *_wrap_wxCheckListBox_GetItemHeight(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCheckListBox_GetItemHeight(_arg0); + _result = (int )wxCheckListBox_GetItemHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5886,7 +5986,7 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5919,7 +6019,7 @@ static PyObject *_wrap_delete_wxTextAttr(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxTextAttr(_arg0); + delete_wxTextAttr(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5955,7 +6055,7 @@ static PyObject *_wrap_wxTextAttr_SetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetTextColour(_arg0,*_arg1); + wxTextAttr_SetTextColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5991,7 +6091,7 @@ static PyObject *_wrap_wxTextAttr_SetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetBackgroundColour(_arg0,*_arg1); + wxTextAttr_SetBackgroundColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6028,7 +6128,7 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetFont(_arg0,*_arg1); + wxTextAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6057,7 +6157,7 @@ static PyObject *_wrap_wxTextAttr_HasTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasTextColour(_arg0); + _result = (bool )wxTextAttr_HasTextColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6085,7 +6185,7 @@ static PyObject *_wrap_wxTextAttr_HasBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); + _result = (bool )wxTextAttr_HasBackgroundColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6113,7 +6213,7 @@ static PyObject *_wrap_wxTextAttr_HasFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_HasFont(_arg0); + _result = (bool )wxTextAttr_HasFont(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6142,7 +6242,7 @@ static PyObject *_wrap_wxTextAttr_GetTextColour(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); + _result = new wxColour (wxTextAttr_GetTextColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6172,7 +6272,7 @@ static PyObject *_wrap_wxTextAttr_GetBackgroundColour(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); + _result = new wxColour (wxTextAttr_GetBackgroundColour(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6202,7 +6302,7 @@ static PyObject *_wrap_wxTextAttr_GetFont(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxFont (wxTextAttr_GetFont(_arg0)); + _result = new wxFont (wxTextAttr_GetFont(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6231,7 +6331,7 @@ static PyObject *_wrap_wxTextAttr_IsDefault(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextAttr_IsDefault(_arg0); + _result = (bool )wxTextAttr_IsDefault(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6277,7 +6377,7 @@ static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); + _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6324,23 +6424,25 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * wxTextCtrl * _result; wxWindow * _arg0; wxWindowID _arg1; - char * _arg2 = (char *) ""; + wxString * _arg2 = (wxString *) &wxPyEmptyString; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "text"; + wxString * _arg7 = (wxString *) &wxPyTextCtrlNameStr; PyObject * _argo0 = 0; + PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","value","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|sOOlOs:new_wxTextCtrl",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOOlOO:new_wxTextCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6349,6 +6451,12 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} if (_obj3) { _arg3 = &temp; @@ -6368,9 +6476,15 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxTextCtrl *)new_wxTextCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6381,6 +6495,14 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -6396,7 +6518,7 @@ static PyObject *_wrap_new_wxPreTextCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)new_wxPreTextCtrl(); + _result = (wxTextCtrl *)new_wxPreTextCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6417,23 +6539,25 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec wxTextCtrl * _arg0; wxWindow * _arg1; wxWindowID _arg2; - char * _arg3 = (char *) ""; + wxString * _arg3 = (wxString *) &wxPyEmptyString; wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "text"; + wxString * _arg8 = (wxString *) &wxPyTextCtrlNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; + PyObject * _obj3 = 0; wxPoint temp; PyObject * _obj4 = 0; wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","value","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|sOOlOs:wxTextCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOOlOO:wxTextCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6449,6 +6573,12 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj3) +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} if (_obj4) { _arg4 = &temp; @@ -6468,13 +6598,27 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxTextCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} +{ + if (_obj8) + delete _arg8; +} return _resultobj; } @@ -6498,12 +6642,16 @@ static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetValue(_arg0)); + _result = new wxString (wxTextCtrl_GetValue(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6531,26 +6679,13 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetValue(_arg0,*_arg1); + wxTextCtrl_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6563,6 +6698,45 @@ static PyObject *_wrap_wxTextCtrl_SetValue(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxTextCtrl_GetRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxTextCtrl * _arg0; + long _arg1; + long _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","from","to", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_GetRange",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetRange. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + #define wxTextCtrl_GetLineLength(_swigobj,_swigarg0) (_swigobj->GetLineLength(_swigarg0)) static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6584,7 +6758,7 @@ static PyObject *_wrap_wxTextCtrl_GetLineLength(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); + _result = (int )wxTextCtrl_GetLineLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6613,12 +6787,16 @@ static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); + _result = new wxString (wxTextCtrl_GetLineText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6646,7 +6824,7 @@ static PyObject *_wrap_wxTextCtrl_GetNumberOfLines(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); + _result = (int )wxTextCtrl_GetNumberOfLines(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6674,7 +6852,7 @@ static PyObject *_wrap_wxTextCtrl_IsModified(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_IsModified(_arg0); + _result = (bool )wxTextCtrl_IsModified(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6702,7 +6880,7 @@ static PyObject *_wrap_wxTextCtrl_IsEditable(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_IsEditable(_arg0); + _result = (bool )wxTextCtrl_IsEditable(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6739,7 +6917,7 @@ static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_GetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6778,12 +6956,16 @@ static PyObject *_wrap_wxTextCtrl_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); + _result = new wxString (wxTextCtrl_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6810,7 +6992,7 @@ static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Clear(_arg0); + wxTextCtrl_Clear(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6840,27 +7022,14 @@ static PyObject *_wrap_wxTextCtrl_Replace(PyObject *self, PyObject *args, PyObje return NULL; } } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); + wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6894,7 +7063,7 @@ static PyObject *_wrap_wxTextCtrl_Remove(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Remove(_arg0,_arg1,_arg2); + wxTextCtrl_Remove(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6924,26 +7093,13 @@ static PyObject *_wrap_wxTextCtrl_LoadFile(PyObject *self, PyObject *args, PyObj } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_LoadFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6960,7 +7116,7 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj PyObject * _resultobj; bool _result; wxTextCtrl * _arg0; - wxString * _arg1 = (wxString *) &wxEmptyString; + wxString * _arg1 = (wxString *) &wxPyEmptyString; PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","file", NULL }; @@ -6977,26 +7133,13 @@ static PyObject *_wrap_wxTextCtrl_SaveFile(PyObject *self, PyObject *args, PyObj } if (_obj1) { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7027,7 +7170,7 @@ static PyObject *_wrap_wxTextCtrl_DiscardEdits(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_DiscardEdits(_arg0); + wxTextCtrl_DiscardEdits(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7056,7 +7199,7 @@ static PyObject *_wrap_wxTextCtrl_SetMaxLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetMaxLength(_arg0,_arg1); + wxTextCtrl_SetMaxLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7085,26 +7228,13 @@ static PyObject *_wrap_wxTextCtrl_WriteText(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_WriteText(_arg0,*_arg1); + wxTextCtrl_WriteText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7137,26 +7267,13 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_AppendText(_arg0,*_arg1); + wxTextCtrl_AppendText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7169,6 +7286,43 @@ static PyObject *_wrap_wxTextCtrl_AppendText(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxTextCtrl_EmulateKeyPress(_swigobj,_swigarg0) (_swigobj->EmulateKeyPress(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_EmulateKeyPress(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxTextCtrl * _arg0; + wxKeyEvent * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","event", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTextCtrl_EmulateKeyPress",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_EmulateKeyPress. Expected _wxTextCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_EmulateKeyPress. Expected _wxKeyEvent_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxTextCtrl_EmulateKeyPress(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxTextCtrl_SetStyle(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetStyle(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7200,7 +7354,7 @@ static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); + _result = (bool )wxTextCtrl_SetStyle(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7237,7 +7391,7 @@ static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7266,7 +7420,7 @@ static PyObject *_wrap_wxTextCtrl_GetDefaultStyle(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); + const wxTextAttr & _result_ref = wxTextCtrl_GetDefaultStyle(_arg0); _result = (wxTextAttr *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -7303,7 +7457,7 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); + _result = (long )wxTextCtrl_XYToPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7314,7 +7468,6 @@ static PyObject *_wrap_wxTextCtrl_XYToPosition(PyObject *self, PyObject *args, P #define wxTextCtrl_PositionToXY(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->PositionToXY(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxTextCtrl * _arg0; long _arg1; long * _arg2; @@ -7342,11 +7495,12 @@ static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; { PyObject *o; o = PyInt_FromLong((long) (*_arg2)); @@ -7380,7 +7534,7 @@ static PyObject *_wrap_wxTextCtrl_ShowPosition(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_ShowPosition(_arg0,_arg1); + wxTextCtrl_ShowPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7408,7 +7562,7 @@ static PyObject *_wrap_wxTextCtrl_Copy(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Copy(_arg0); + wxTextCtrl_Copy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7436,7 +7590,7 @@ static PyObject *_wrap_wxTextCtrl_Cut(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Cut(_arg0); + wxTextCtrl_Cut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7464,7 +7618,7 @@ static PyObject *_wrap_wxTextCtrl_Paste(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Paste(_arg0); + wxTextCtrl_Paste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7493,7 +7647,7 @@ static PyObject *_wrap_wxTextCtrl_CanCopy(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanCopy(_arg0); + _result = (bool )wxTextCtrl_CanCopy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7521,7 +7675,7 @@ static PyObject *_wrap_wxTextCtrl_CanCut(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanCut(_arg0); + _result = (bool )wxTextCtrl_CanCut(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7549,7 +7703,7 @@ static PyObject *_wrap_wxTextCtrl_CanPaste(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanPaste(_arg0); + _result = (bool )wxTextCtrl_CanPaste(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7576,7 +7730,7 @@ static PyObject *_wrap_wxTextCtrl_Undo(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Undo(_arg0); + wxTextCtrl_Undo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7604,7 +7758,7 @@ static PyObject *_wrap_wxTextCtrl_Redo(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Redo(_arg0); + wxTextCtrl_Redo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7633,7 +7787,7 @@ static PyObject *_wrap_wxTextCtrl_CanUndo(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanUndo(_arg0); + _result = (bool )wxTextCtrl_CanUndo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7661,7 +7815,7 @@ static PyObject *_wrap_wxTextCtrl_CanRedo(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_CanRedo(_arg0); + _result = (bool )wxTextCtrl_CanRedo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7689,7 +7843,7 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetInsertionPoint(_arg0,_arg1); + wxTextCtrl_SetInsertionPoint(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7717,7 +7871,7 @@ static PyObject *_wrap_wxTextCtrl_SetInsertionPointEnd(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetInsertionPointEnd(_arg0); + wxTextCtrl_SetInsertionPointEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7746,7 +7900,7 @@ static PyObject *_wrap_wxTextCtrl_GetInsertionPoint(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); + _result = (long )wxTextCtrl_GetInsertionPoint(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7774,7 +7928,7 @@ static PyObject *_wrap_wxTextCtrl_GetLastPosition(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxTextCtrl_GetLastPosition(_arg0); + _result = (long )wxTextCtrl_GetLastPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7803,7 +7957,7 @@ static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7831,7 +7985,7 @@ static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SelectAll(_arg0); + wxTextCtrl_SelectAll(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7862,7 +8016,7 @@ static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetEditable(_arg0,_arg1); + wxTextCtrl_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7893,26 +8047,13 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_write(_arg0,*_arg1); + wxTextCtrl_write(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7949,12 +8090,16 @@ static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); + _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -8004,18 +8149,19 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSB_HORIZONTAL; wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator; - char * _arg6 = (char *) "scrollBar"; + wxString * _arg6 = (wxString *) &wxPyScrollBarNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; PyObject * _argo5 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "parent","id","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOs:new_wxScrollBar",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_argo5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlOO:new_wxScrollBar",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_argo5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -8043,9 +8189,15 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6); + _result = (wxScrollBar *)new_wxScrollBar(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8056,6 +8208,10 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -8071,7 +8227,7 @@ static PyObject *_wrap_new_wxPreScrollBar(PyObject *self, PyObject *args, PyObje return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxScrollBar *)new_wxPreScrollBar(); + _result = (wxScrollBar *)new_wxPreScrollBar(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8096,7 +8252,7 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxSB_HORIZONTAL; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "scrollBar"; + wxString * _arg7 = (wxString *) &wxPyScrollBarNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -8104,10 +8260,11 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOs:wxScrollBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlOO:wxScrollBar_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -8142,13 +8299,23 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (bool )wxScrollBar_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -8172,7 +8339,7 @@ static PyObject *_wrap_wxScrollBar_GetRange(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetRange(_arg0); + _result = (int )wxScrollBar_GetRange(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8200,7 +8367,7 @@ static PyObject *_wrap_wxScrollBar_GetPageSize(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetPageSize(_arg0); + _result = (int )wxScrollBar_GetPageSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8228,7 +8395,7 @@ static PyObject *_wrap_wxScrollBar_GetThumbPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetThumbPosition(_arg0); + _result = (int )wxScrollBar_GetThumbPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8256,7 +8423,7 @@ static PyObject *_wrap_wxScrollBar_GetThumbSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxScrollBar_GetThumbSize(_arg0); + _result = (int )wxScrollBar_GetThumbSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8284,7 +8451,7 @@ static PyObject *_wrap_wxScrollBar_IsVertical(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxScrollBar_IsVertical(_arg0); + _result = (bool )wxScrollBar_IsVertical(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8312,7 +8479,7 @@ static PyObject *_wrap_wxScrollBar_SetThumbPosition(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrollBar_SetThumbPosition(_arg0,_arg1); + wxScrollBar_SetThumbPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8347,7 +8514,7 @@ static PyObject *_wrap_wxScrollBar_SetScrollbar(PyObject *self, PyObject *args, _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); + wxScrollBar_SetScrollbar(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8397,17 +8564,18 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_HORIZONTAL; - char * _arg5 = (char *) "spinButton"; + wxString * _arg5 = (wxString *) &wxPySPIN_BUTTON_NAME; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOls:new_wxSpinButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOlO:new_wxSpinButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -8427,10 +8595,16 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject _arg3 = &temp0; if (! wxSize_helper(_obj3, &_arg3)) return NULL; +} + if (_obj5) +{ + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSpinButton *)new_wxSpinButton(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8441,6 +8615,10 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -8456,7 +8634,7 @@ static PyObject *_wrap_new_wxPreSpinButton(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinButton *)new_wxPreSpinButton(); + _result = (wxSpinButton *)new_wxPreSpinButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8480,17 +8658,18 @@ static PyObject *_wrap_wxSpinButton_Create(PyObject *self, PyObject *args, PyObj wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxSP_HORIZONTAL; - char * _arg6 = (char *) "spinButton"; + wxString * _arg6 = (wxString *) &wxPySPIN_BUTTON_NAME; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOls:wxSpinButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOlO:wxSpinButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -8517,14 +8696,24 @@ static PyObject *_wrap_wxSpinButton_Create(PyObject *self, PyObject *args, PyObj _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSpinButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -8548,7 +8737,7 @@ static PyObject *_wrap_wxSpinButton_GetMax(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetMax(_arg0); + _result = (int )wxSpinButton_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8576,7 +8765,7 @@ static PyObject *_wrap_wxSpinButton_GetMin(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetMin(_arg0); + _result = (int )wxSpinButton_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8604,7 +8793,7 @@ static PyObject *_wrap_wxSpinButton_GetValue(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinButton_GetValue(_arg0); + _result = (int )wxSpinButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8633,7 +8822,7 @@ static PyObject *_wrap_wxSpinButton_SetRange(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinButton_SetRange(_arg0,_arg1,_arg2); + wxSpinButton_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8662,7 +8851,7 @@ static PyObject *_wrap_wxSpinButton_SetValue(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinButton_SetValue(_arg0,_arg1); + wxSpinButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8713,18 +8902,19 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - char * _arg6 = (char *) "staticBitmap"; + wxString * _arg6 = (wxString *) &wxPyStaticBitmapNameStr; PyObject * _argo0 = 0; PyObject * _argo2 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "parent","id","bitmap","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxStaticBitmap",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlO:new_wxStaticBitmap",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -8751,10 +8941,16 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxStaticBitmap *)new_wxStaticBitmap(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8765,6 +8961,10 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -8780,7 +8980,7 @@ static PyObject *_wrap_new_wxPreStaticBitmap(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); + _result = (wxStaticBitmap *)new_wxPreStaticBitmap(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8805,7 +9005,7 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; - char * _arg7 = (char *) "staticBitmap"; + wxString * _arg7 = (wxString *) &wxPyStaticBitmapNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _argo3 = 0; @@ -8813,10 +9013,11 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO PyObject * _obj4 = 0; wxSize temp0; PyObject * _obj5 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "self","parent","id","bitmap","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxStaticBitmap_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlO:wxStaticBitmap_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_argo3,&_obj4,&_obj5,&_arg6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -8850,14 +9051,24 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO _arg5 = &temp0; if (! wxSize_helper(_obj5, &_arg5)) return NULL; +} + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxStaticBitmap_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -8882,7 +9093,7 @@ static PyObject *_wrap_wxStaticBitmap_GetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); + _result = new wxBitmap (wxStaticBitmap_GetBitmap(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8919,7 +9130,7 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetBitmap(_arg0,*_arg1); + wxStaticBitmap_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8956,7 +9167,7 @@ static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetIcon(_arg0,*_arg1); + wxStaticBitmap_SetIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9011,7 +9222,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * int _arg7 = (int ) 0; long _arg8 = (long ) wxRA_HORIZONTAL; wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; - char * _arg10 = (char *) "radioBox"; + wxString * _arg10 = (wxString *) &wxPyRadioBoxNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; @@ -9020,11 +9231,12 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * PyObject * _obj4 = 0; PyObject * _obj6 = 0; PyObject * _argo9 = 0; + PyObject * _obj10 = 0; char *_kwnames[] = { "parent","id","label","point","size","choices","majorDimension","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOOilOs:new_wxRadioBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj6,&_arg7,&_arg8,&_argo9,&_arg10)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOOilOO:new_wxRadioBox",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_obj6,&_arg7,&_arg8,&_argo9,&_obj10)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -9034,22 +9246,9 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -9077,6 +9276,12 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj10) +{ + _arg10 = wxString_in_helper(_obj10); + if (_arg10 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -9087,7 +9292,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,_arg10); + _result = (wxRadioBox *)new_wxRadioBox(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9,*_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9104,6 +9309,10 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } { delete [] _arg6; +} +{ + if (_obj10) + delete _arg10; } return _resultobj; } @@ -9120,7 +9329,7 @@ static PyObject *_wrap_new_wxPreRadioBox(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioBox *)new_wxPreRadioBox(); + _result = (wxRadioBox *)new_wxPreRadioBox(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9149,7 +9358,7 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec int _arg8 = (int ) 0; long _arg9 = (long ) wxRA_HORIZONTAL; wxValidator * _arg10 = (wxValidator *) &wxDefaultValidator; - char * _arg11 = (char *) "radioBox"; + wxString * _arg11 = (wxString *) &wxPyRadioBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -9159,10 +9368,11 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec PyObject * _obj5 = 0; PyObject * _obj7 = 0; PyObject * _argo10 = 0; + PyObject * _obj11 = 0; char *_kwnames[] = { "self","parent","id","label","point","size","choices","majorDimension","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOOilOs:wxRadioBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_obj7,&_arg8,&_arg9,&_argo10,&_arg11)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOOilOO:wxRadioBox_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_obj7,&_arg8,&_arg9,&_argo10,&_obj11)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -9179,22 +9389,9 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -9222,6 +9419,12 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj11) +{ + _arg11 = wxString_in_helper(_obj11); + if (_arg11 == NULL) + return NULL; +} { if (_obj7) { _arg6 = PyList_Size(_obj7); @@ -9232,7 +9435,7 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,_arg11); + _result = (bool )wxRadioBox_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10,*_arg11); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9243,6 +9446,10 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } { delete [] _arg7; +} +{ + if (_obj11) + delete _arg11; } return _resultobj; } @@ -9269,7 +9476,7 @@ static PyObject *_wrap_wxRadioBox_Enable(PyObject *self, PyObject *args, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_Enable(_arg0,_arg1); + wxRadioBox_Enable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9301,7 +9508,7 @@ static PyObject *_wrap_wxRadioBox_EnableItem(PyObject *self, PyObject *args, PyO _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_EnableItem(_arg0,_arg1,_arg2); + wxRadioBox_EnableItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9331,26 +9538,13 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_FindString(_arg0,*_arg1); + _result = (int )wxRadioBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9383,12 +9577,16 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); + _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9417,12 +9615,16 @@ static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetItemLabel(_arg0,_arg1)); + _result = new wxString (wxRadioBox_GetItemLabel(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9451,26 +9653,13 @@ static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetItemLabel(_arg0,_arg1,*_arg2); + wxRadioBox_SetItemLabel(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9503,7 +9692,7 @@ static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetSelection(_arg0); + _result = (int )wxRadioBox_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9531,12 +9720,16 @@ static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); + _result = new wxString (wxRadioBox_GetStringSelection(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9564,7 +9757,7 @@ static PyObject *_wrap_wxRadioBox_GetCount(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRadioBox_GetCount(_arg0); + _result = (int )wxRadioBox_GetCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9592,7 +9785,7 @@ static PyObject *_wrap_wxRadioBox_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetSelection(_arg0,_arg1); + wxRadioBox_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9621,26 +9814,13 @@ static PyObject *_wrap_wxRadioBox_SetStringSelection(PyObject *self, PyObject *a } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetStringSelection(_arg0,*_arg1); + wxRadioBox_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9675,7 +9855,7 @@ static PyObject *_wrap_wxRadioBox_Show(PyObject *self, PyObject *args, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_Show(_arg0,_arg1); + wxRadioBox_Show(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9707,7 +9887,7 @@ static PyObject *_wrap_wxRadioBox_ShowItem(PyObject *self, PyObject *args, PyObj _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_ShowItem(_arg0,_arg1,_arg2); + wxRadioBox_ShowItem(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9759,7 +9939,7 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "radioButton"; + wxString * _arg7 = (wxString *) &wxPyRadioButtonNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; @@ -9767,11 +9947,12 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","label","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOs:new_wxRadioButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOO:new_wxRadioButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -9781,22 +9962,9 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -9817,9 +9985,15 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxRadioButton *)new_wxRadioButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9833,6 +10007,10 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -9849,7 +10027,7 @@ static PyObject *_wrap_new_wxPreRadioButton(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxRadioButton *)new_wxPreRadioButton(); + _result = (wxRadioButton *)new_wxPreRadioButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9875,7 +10053,7 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "radioButton"; + wxString * _arg8 = (wxString *) &wxPyRadioButtonNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -9884,10 +10062,11 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","label","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxRadioButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOO:wxRadioButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -9904,22 +10083,9 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -9940,9 +10106,15 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxRadioButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9950,6 +10122,10 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -9974,7 +10150,7 @@ static PyObject *_wrap_wxRadioButton_GetValue(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRadioButton_GetValue(_arg0); + _result = (bool )wxRadioButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10004,7 +10180,7 @@ static PyObject *_wrap_wxRadioButton_SetValue(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioButton_SetValue(_arg0,_arg1); + wxRadioButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10058,18 +10234,19 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw wxSize * _arg6 = (wxSize *) &wxDefaultSize; long _arg7 = (long ) wxSL_HORIZONTAL; wxValidator * _arg8 = (wxValidator *) &wxDefaultValidator; - char * _arg9 = (char *) "slider"; + wxString * _arg9 = (wxString *) &wxPySliderNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj5 = 0; wxSize temp0; PyObject * _obj6 = 0; PyObject * _argo8 = 0; + PyObject * _obj9 = 0; char *_kwnames[] = { "parent","id","value","minValue","maxValue","point","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|OOlOs:new_wxSlider",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_obj5,&_obj6,&_arg7,&_argo8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|OOlOO:new_wxSlider",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_obj5,&_obj6,&_arg7,&_argo8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10097,9 +10274,15 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,_arg9); + _result = (wxSlider *)new_wxSlider(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5,*_arg6,_arg7,*_arg8,*_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10110,6 +10293,10 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj9) + delete _arg9; +} return _resultobj; } @@ -10125,7 +10312,7 @@ static PyObject *_wrap_new_wxPreSlider(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSlider *)new_wxPreSlider(); + _result = (wxSlider *)new_wxPreSlider(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10153,7 +10340,7 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject wxSize * _arg7 = (wxSize *) &wxDefaultSize; long _arg8 = (long ) wxSL_HORIZONTAL; wxValidator * _arg9 = (wxValidator *) &wxDefaultValidator; - char * _arg10 = (char *) "slider"; + wxString * _arg10 = (wxString *) &wxPySliderNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; @@ -10161,10 +10348,11 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject wxSize temp0; PyObject * _obj7 = 0; PyObject * _argo9 = 0; + PyObject * _obj10 = 0; char *_kwnames[] = { "self","parent","id","value","minValue","maxValue","point","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiiii|OOlOs:wxSlider_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6,&_obj7,&_arg8,&_argo9,&_arg10)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiiii|OOlOO:wxSlider_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6,&_obj7,&_arg8,&_argo9,&_obj10)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10199,13 +10387,23 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj10) +{ + _arg10 = wxString_in_helper(_obj10); + if (_arg10 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,_arg10); + _result = (bool )wxSlider_Create(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6,*_arg7,_arg8,*_arg9,*_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj10) + delete _arg10; +} return _resultobj; } @@ -10228,7 +10426,7 @@ static PyObject *_wrap_wxSlider_ClearSel(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_ClearSel(_arg0); + wxSlider_ClearSel(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10256,7 +10454,7 @@ static PyObject *_wrap_wxSlider_ClearTicks(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_ClearTicks(_arg0); + wxSlider_ClearTicks(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10285,7 +10483,7 @@ static PyObject *_wrap_wxSlider_GetLineSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetLineSize(_arg0); + _result = (int )wxSlider_GetLineSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10313,7 +10511,7 @@ static PyObject *_wrap_wxSlider_GetMax(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetMax(_arg0); + _result = (int )wxSlider_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10341,7 +10539,7 @@ static PyObject *_wrap_wxSlider_GetMin(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetMin(_arg0); + _result = (int )wxSlider_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10369,7 +10567,7 @@ static PyObject *_wrap_wxSlider_GetPageSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetPageSize(_arg0); + _result = (int )wxSlider_GetPageSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10397,7 +10595,7 @@ static PyObject *_wrap_wxSlider_GetSelEnd(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetSelEnd(_arg0); + _result = (int )wxSlider_GetSelEnd(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10425,7 +10623,7 @@ static PyObject *_wrap_wxSlider_GetSelStart(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetSelStart(_arg0); + _result = (int )wxSlider_GetSelStart(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10453,7 +10651,7 @@ static PyObject *_wrap_wxSlider_GetThumbLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetThumbLength(_arg0); + _result = (int )wxSlider_GetThumbLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10481,7 +10679,7 @@ static PyObject *_wrap_wxSlider_GetTickFreq(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetTickFreq(_arg0); + _result = (int )wxSlider_GetTickFreq(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10509,7 +10707,7 @@ static PyObject *_wrap_wxSlider_GetValue(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSlider_GetValue(_arg0); + _result = (int )wxSlider_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10538,7 +10736,7 @@ static PyObject *_wrap_wxSlider_SetRange(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetRange(_arg0,_arg1,_arg2); + wxSlider_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10568,7 +10766,7 @@ static PyObject *_wrap_wxSlider_SetTickFreq(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetTickFreq(_arg0,_arg1,_arg2); + wxSlider_SetTickFreq(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10597,7 +10795,7 @@ static PyObject *_wrap_wxSlider_SetLineSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetLineSize(_arg0,_arg1); + wxSlider_SetLineSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10626,7 +10824,7 @@ static PyObject *_wrap_wxSlider_SetPageSize(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetPageSize(_arg0,_arg1); + wxSlider_SetPageSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10656,7 +10854,7 @@ static PyObject *_wrap_wxSlider_SetSelection(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetSelection(_arg0,_arg1,_arg2); + wxSlider_SetSelection(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10685,7 +10883,7 @@ static PyObject *_wrap_wxSlider_SetThumbLength(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetThumbLength(_arg0,_arg1); + wxSlider_SetThumbLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10714,7 +10912,7 @@ static PyObject *_wrap_wxSlider_SetTick(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetTick(_arg0,_arg1); + wxSlider_SetTick(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10743,7 +10941,7 @@ static PyObject *_wrap_wxSlider_SetValue(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSlider_SetValue(_arg0,_arg1); + wxSlider_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10798,24 +10996,26 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * wxSpinCtrl * _result; wxWindow * _arg0; wxWindowID _arg1 = (wxWindowID ) -1; - char * _arg2 = (char *) ""; + wxString * _arg2 = (wxString *) &wxPyEmptyString; wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxSP_ARROW_KEYS; int _arg6 = (int ) 0; int _arg7 = (int ) 100; int _arg8 = (int ) 0; - char * _arg9 = (char *) "wxSpinCtrl"; + wxString * _arg9 = (wxString *) &wxPySpinCtrlNameStr; PyObject * _argo0 = 0; + PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj9 = 0; char *_kwnames[] = { "parent","id","value","pos","size","style","min","max","initial","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|isOOliiis:new_wxSpinCtrl",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6,&_arg7,&_arg8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iOOOliiiO:new_wxSpinCtrl",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6,&_arg7,&_arg8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10824,6 +11024,12 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * return NULL; } } + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} if (_obj3) { _arg3 = &temp; @@ -10835,10 +11041,16 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,_arg9); + _result = (wxSpinCtrl *)new_wxSpinCtrl(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6,_arg7,_arg8,*_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10849,6 +11061,14 @@ static PyObject *_wrap_new_wxSpinCtrl(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj9) + delete _arg9; +} return _resultobj; } @@ -10864,7 +11084,7 @@ static PyObject *_wrap_new_wxPreSpinCtrl(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); + _result = (wxSpinCtrl *)new_wxPreSpinCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10885,24 +11105,26 @@ static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObjec wxSpinCtrl * _arg0; wxWindow * _arg1; wxWindowID _arg2 = (wxWindowID ) -1; - char * _arg3 = (char *) ""; + wxString * _arg3 = (wxString *) &wxPyEmptyString; wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) wxSP_ARROW_KEYS; int _arg7 = (int ) 0; int _arg8 = (int ) 100; int _arg9 = (int ) 0; - char * _arg10 = (char *) "wxSpinCtrl"; + wxString * _arg10 = (wxString *) &wxPySpinCtrlNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; + PyObject * _obj3 = 0; wxPoint temp; PyObject * _obj4 = 0; wxSize temp0; PyObject * _obj5 = 0; + PyObject * _obj10 = 0; char *_kwnames[] = { "self","parent","id","value","pos","size","style","min","max","initial","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|isOOliiis:wxSpinCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_obj4,&_obj5,&_arg6,&_arg7,&_arg8,&_arg9,&_arg10)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iOOOliiiO:wxSpinCtrl_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7,&_arg8,&_arg9,&_obj10)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10918,6 +11140,12 @@ static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } } + if (_obj3) +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} if (_obj4) { _arg4 = &temp; @@ -10929,14 +11157,28 @@ static PyObject *_wrap_wxSpinCtrl_Create(PyObject *self, PyObject *args, PyObjec _arg5 = &temp0; if (! wxSize_helper(_obj5, &_arg5)) return NULL; +} + if (_obj10) +{ + _arg10 = wxString_in_helper(_obj10); + if (_arg10 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,_arg10); + _result = (bool )wxSpinCtrl_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7,_arg8,_arg9,*_arg10); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} +{ + if (_obj10) + delete _arg10; +} return _resultobj; } @@ -10960,7 +11202,7 @@ static PyObject *_wrap_wxSpinCtrl_GetMax(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetMax(_arg0); + _result = (int )wxSpinCtrl_GetMax(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -10988,7 +11230,7 @@ static PyObject *_wrap_wxSpinCtrl_GetMin(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetMin(_arg0); + _result = (int )wxSpinCtrl_GetMin(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11016,7 +11258,7 @@ static PyObject *_wrap_wxSpinCtrl_GetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSpinCtrl_GetValue(_arg0); + _result = (int )wxSpinCtrl_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11045,7 +11287,7 @@ static PyObject *_wrap_wxSpinCtrl_SetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); + wxSpinCtrl_SetRange(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11074,7 +11316,7 @@ static PyObject *_wrap_wxSpinCtrl_SetValue(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSpinCtrl_SetValue(_arg0,_arg1); + wxSpinCtrl_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11126,7 +11368,7 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; wxValidator * _arg6 = (wxValidator *) &wxDefaultValidator; - char * _arg7 = (char *) "toggle"; + wxString * _arg7 = (wxString *) &wxPyCheckBoxNameStr; PyObject * _argo0 = 0; PyObject * _obj2 = 0; wxPoint temp; @@ -11134,11 +11376,12 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje wxSize temp0; PyObject * _obj4 = 0; PyObject * _argo6 = 0; + PyObject * _obj7 = 0; char *_kwnames[] = { "parent","id","label","pos","size","style","validator","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOs:new_wxToggleButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOlOO:new_wxToggleButton",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_argo6,&_obj7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -11148,22 +11391,9 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } if (_obj3) { @@ -11184,9 +11414,15 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje return NULL; } } + if (_obj7) +{ + _arg7 = wxString_in_helper(_obj7); + if (_arg7 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToggleButton *)new_wxToggleButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,_arg7); + _result = (wxToggleButton *)new_wxToggleButton(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6,*_arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11200,6 +11436,10 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -11216,7 +11456,7 @@ static PyObject *_wrap_new_wxPreToggleButton(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToggleButton *)new_wxPreToggleButton(); + _result = (wxToggleButton *)new_wxPreToggleButton(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11242,7 +11482,7 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO wxSize * _arg5 = (wxSize *) &wxDefaultSize; long _arg6 = (long ) 0; wxValidator * _arg7 = (wxValidator *) &wxDefaultValidator; - char * _arg8 = (char *) "toggle"; + wxString * _arg8 = (wxString *) &wxPyCheckBoxNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj3 = 0; @@ -11251,10 +11491,11 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO wxSize temp0; PyObject * _obj5 = 0; PyObject * _argo7 = 0; + PyObject * _obj8 = 0; char *_kwnames[] = { "self","parent","id","label","pos","size","style","validator","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOs:wxToggleButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_arg8)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOlOO:wxToggleButton_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_argo7,&_obj8)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -11271,22 +11512,9 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif } if (_obj4) { @@ -11307,9 +11535,15 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,_arg8); + _result = (bool )wxToggleButton_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11317,6 +11551,10 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -11343,7 +11581,7 @@ static PyObject *_wrap_wxToggleButton_SetValue(PyObject *self, PyObject *args, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToggleButton_SetValue(_arg0,_arg1); + wxToggleButton_SetValue(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11372,7 +11610,7 @@ static PyObject *_wrap_wxToggleButton_GetValue(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToggleButton_GetValue(_arg0); + _result = (bool )wxToggleButton_GetValue(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11400,26 +11638,13 @@ static PyObject *_wrap_wxToggleButton_SetLabel(PyObject *self, PyObject *args, P } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToggleButton_SetLabel(_arg0,*_arg1); + wxToggleButton_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -11540,6 +11765,7 @@ static PyMethodDef controlscMethods[] = { { "wxTextCtrl_GetDefaultStyle", (PyCFunction) _wrap_wxTextCtrl_GetDefaultStyle, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetDefaultStyle", (PyCFunction) _wrap_wxTextCtrl_SetDefaultStyle, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetStyle", (PyCFunction) _wrap_wxTextCtrl_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_EmulateKeyPress", (PyCFunction) _wrap_wxTextCtrl_EmulateKeyPress, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_AppendText", (PyCFunction) _wrap_wxTextCtrl_AppendText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_WriteText", (PyCFunction) _wrap_wxTextCtrl_WriteText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetMaxLength", (PyCFunction) _wrap_wxTextCtrl_SetMaxLength, METH_VARARGS | METH_KEYWORDS }, @@ -11556,6 +11782,7 @@ static PyMethodDef controlscMethods[] = { { "wxTextCtrl_GetNumberOfLines", (PyCFunction) _wrap_wxTextCtrl_GetNumberOfLines, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineText", (PyCFunction) _wrap_wxTextCtrl_GetLineText, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetLineLength", (PyCFunction) _wrap_wxTextCtrl_GetLineLength, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_GetRange", (PyCFunction) _wrap_wxTextCtrl_GetRange, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetValue", (PyCFunction) _wrap_wxTextCtrl_SetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetValue", (PyCFunction) _wrap_wxTextCtrl_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS }, @@ -11680,6 +11907,7 @@ static PyMethodDef controlscMethods[] = { { "wxButton_Create", (PyCFunction) _wrap_wxButton_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreButton", (PyCFunction) _wrap_new_wxPreButton, METH_VARARGS | METH_KEYWORDS }, { "new_wxButton", (PyCFunction) _wrap_new_wxButton, METH_VARARGS | METH_KEYWORDS }, + { "wxControlWithItems_AppendItems", (PyCFunction) _wrap_wxControlWithItems_AppendItems, METH_VARARGS | METH_KEYWORDS }, { "wxControlWithItems_SetClientData", (PyCFunction) _wrap_wxControlWithItems_SetClientData, METH_VARARGS | METH_KEYWORDS }, { "wxControlWithItems_GetClientData", (PyCFunction) _wrap_wxControlWithItems_GetClientData, METH_VARARGS | METH_KEYWORDS }, { "wxControlWithItems_Append", (PyCFunction) _wrap_wxControlWithItems_Append, METH_VARARGS | METH_KEYWORDS },