X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/85247b36714d520cf2ebb92fe6b4fc039f2db9d0..2187eef5bb7a81ee3b2738a312f4ecfceb49bded:/wxPython/src/gtk/controls.cpp diff --git a/wxPython/src/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index 5895421a60..336a7ddb98 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/controls.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -100,11 +99,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 @@ -157,18 +175,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; } @@ -190,15 +209,20 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k return NULL; } if (_argo5) { - if (_argo5 == Py_None) { _arg5 = NULL; } - else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxControl. Expected _wxValidator_p."); 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; @@ -209,6 +233,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; } @@ -224,7 +252,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; @@ -249,7 +277,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; @@ -257,10 +285,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; } @@ -289,19 +318,28 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxControl_Create. Expected _wxValidator_p."); 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; } @@ -325,15 +363,14 @@ static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControl_Command(_arg0,*_arg1); + wxControl_Command(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -362,12 +399,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -395,26 +436,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); - 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(); - wxControl_SetLabel(_arg0,*_arg1); + wxControl_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -479,7 +507,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; @@ -508,7 +536,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; @@ -537,12 +565,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -571,26 +603,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; @@ -624,26 +643,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; @@ -675,7 +681,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; @@ -704,7 +710,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; @@ -732,12 +738,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -773,22 +783,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); + _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) { @@ -796,7 +793,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; @@ -839,7 +836,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; @@ -877,7 +874,7 @@ 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; @@ -914,15 +911,19 @@ static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject * int i, len=PySequence_Length(_obj1); for (i=0; iAdd(PyString_AsString(str)); +#endif + _arg1->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxControlWithItems_AppendItems(_arg0,*_arg1); + wxControlWithItems_AppendItems(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -978,7 +979,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; @@ -986,11 +987,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; } @@ -1000,22 +1002,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) - 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) { @@ -1030,15 +1019,20 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxButton. Expected _wxValidator_p."); 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; @@ -1052,6 +1046,10 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -1068,7 +1066,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; @@ -1094,7 +1092,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; @@ -1103,10 +1101,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; } @@ -1123,22 +1122,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); - 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) { @@ -1153,15 +1139,20 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxButton_Create. Expected _wxValidator_p."); 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; @@ -1169,6 +1160,10 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -1192,7 +1187,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; @@ -1228,7 +1223,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; @@ -1264,7 +1259,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; @@ -1284,7 +1279,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; @@ -1344,7 +1339,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; @@ -1352,11 +1347,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; } @@ -1366,8 +1362,7 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxBitmapButton. Expected _wxBitmap_p."); return NULL; } @@ -1385,15 +1380,20 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxBitmapButton. Expected _wxValidator_p."); 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; @@ -1404,6 +1404,10 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj7) + delete _arg7; +} return _resultobj; } @@ -1419,7 +1423,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; @@ -1445,7 +1449,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; @@ -1454,10 +1458,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; } @@ -1474,8 +1479,7 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxBitmapButton_Create. Expected _wxBitmap_p."); return NULL; } @@ -1493,19 +1497,28 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxBitmapButton_Create. Expected _wxValidator_p."); 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; } @@ -1530,7 +1543,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; @@ -1560,7 +1573,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; @@ -1590,7 +1603,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; @@ -1620,7 +1633,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; @@ -1649,15 +1662,14 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapDisabled. Expected _wxBitmap_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); + wxBitmapButton_SetBitmapDisabled(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1686,15 +1698,14 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapFocus. Expected _wxBitmap_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); + wxBitmapButton_SetBitmapFocus(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1723,15 +1734,14 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapSelected. Expected _wxBitmap_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); + wxBitmapButton_SetBitmapSelected(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,15 +1770,14 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapLabel. Expected _wxBitmap_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); + wxBitmapButton_SetBitmapLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1798,7 +1807,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; @@ -1827,7 +1836,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; @@ -1855,7 +1864,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; @@ -1906,7 +1915,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; @@ -1914,11 +1923,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; } @@ -1928,22 +1938,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) - 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) { @@ -1958,15 +1955,20 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxCheckBox. Expected _wxValidator_p."); 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; @@ -1980,6 +1982,10 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -1996,7 +2002,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; @@ -2022,7 +2028,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; @@ -2031,10 +2037,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; } @@ -2051,22 +2058,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); - 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) { @@ -2081,15 +2075,20 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxCheckBox_Create. Expected _wxValidator_p."); 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; @@ -2097,6 +2096,10 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -2121,7 +2124,35 @@ 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; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCheckBox_IsChecked(_swigobj) (_swigobj->IsChecked()) +static PyObject *_wrap_wxCheckBox_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCheckBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCheckBox_IsChecked",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_IsChecked. Expected _wxCheckBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCheckBox_IsChecked(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2151,7 +2182,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; @@ -2212,7 +2243,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; @@ -2220,11 +2251,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; } @@ -2253,12 +2285,17 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxChoice. Expected _wxValidator_p."); return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { if (_obj5) { _arg4 = PyList_Size(_obj5); @@ -2269,7 +2306,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; @@ -2282,6 +2319,10 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } { delete [] _arg5; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -2298,7 +2339,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; @@ -2325,7 +2366,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; @@ -2334,10 +2375,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; } @@ -2373,12 +2415,17 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxChoice_Create. Expected _wxValidator_p."); return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -2389,13 +2436,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; } @@ -2419,7 +2470,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; @@ -2448,7 +2499,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; @@ -2476,7 +2527,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; @@ -2505,7 +2556,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; @@ -2534,26 +2585,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); - 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(); - wxChoice_SetStringSelection(_arg0,*_arg1); + wxChoice_SetStringSelection(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2587,26 +2625,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; @@ -2657,26 +2682,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; } @@ -2685,6 +2712,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; @@ -2705,12 +2738,17 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxComboBox. Expected _wxValidator_p."); return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -2721,7 +2759,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; @@ -2732,8 +2770,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; } @@ -2750,7 +2796,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; @@ -2771,26 +2817,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; } @@ -2806,6 +2854,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; @@ -2826,12 +2880,17 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec } } if (_argo9) { - if (_argo9 == Py_None) { _arg9 = NULL; } - else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of wxComboBox_Create. Expected _wxValidator_p."); return NULL; } } + if (_obj10) +{ + _arg10 = wxString_in_helper(_obj10); + if (_arg10 == NULL) + return NULL; +} { if (_obj7) { _arg6 = PyList_Size(_obj7); @@ -2842,13 +2901,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; } @@ -2872,7 +2939,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; @@ -2900,7 +2967,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; @@ -2929,7 +2996,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; @@ -2957,7 +3024,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; @@ -2985,12 +3052,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3017,7 +3088,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; @@ -3048,26 +3119,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) - 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 } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); + wxComboBox_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3101,7 +3159,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; @@ -3130,7 +3188,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; @@ -3158,7 +3216,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; @@ -3187,7 +3245,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; @@ -3217,7 +3275,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; @@ -3246,26 +3304,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); - 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(); - wxComboBox_SetValue(_arg0,*_arg1); + wxComboBox_SetValue(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3300,7 +3345,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; @@ -3328,7 +3373,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; @@ -3357,7 +3402,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; @@ -3386,7 +3431,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; @@ -3415,12 +3460,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3449,26 +3498,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) - 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 = (int )wxComboBox_FindString(_arg0,*_arg1); + _result = (int )wxComboBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3500,7 +3536,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; @@ -3528,12 +3564,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -3569,22 +3609,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); - 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 } if (_obj2) { @@ -3592,7 +3619,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; @@ -3635,7 +3662,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; @@ -3673,7 +3700,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; @@ -3725,18 +3752,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; } @@ -3758,15 +3786,20 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGauge. Expected _wxValidator_p."); 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; @@ -3777,6 +3810,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; } @@ -3792,7 +3829,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; @@ -3818,7 +3855,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; @@ -3826,10 +3863,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; } @@ -3858,19 +3896,28 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGauge_Create. Expected _wxValidator_p."); 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; } @@ -3894,7 +3941,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; @@ -3922,7 +3969,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; @@ -3950,7 +3997,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; @@ -3978,7 +4025,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; @@ -4006,7 +4053,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; @@ -4035,7 +4082,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; @@ -4064,7 +4111,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; @@ -4093,7 +4140,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; @@ -4144,18 +4191,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; } @@ -4165,22 +4213,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) { @@ -4193,10 +4228,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; @@ -4210,6 +4251,10 @@ static PyObject *_wrap_new_wxStaticBox(PyObject *self, PyObject *args, PyObject { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -4226,7 +4271,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; @@ -4251,7 +4296,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; @@ -4259,10 +4304,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; } @@ -4279,22 +4325,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); + _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) { @@ -4307,10 +4340,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; @@ -4318,6 +4357,10 @@ static PyObject *_wrap_wxStaticBox_Create(PyObject *self, PyObject *args, PyObje { if (_obj3) delete _arg3; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -4363,17 +4406,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; } @@ -4393,10 +4437,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; @@ -4407,6 +4457,10 @@ static PyObject *_wrap_new_wxStaticLine(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -4422,7 +4476,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; @@ -4446,17 +4500,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; } @@ -4483,14 +4538,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; } @@ -4536,18 +4601,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; } @@ -4557,22 +4623,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) - 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) { @@ -4585,10 +4638,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; @@ -4602,6 +4661,10 @@ static PyObject *_wrap_new_wxStaticText(PyObject *self, PyObject *args, PyObject { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -4618,7 +4681,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; @@ -4643,7 +4706,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; @@ -4651,10 +4714,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; } @@ -4671,22 +4735,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) { @@ -4699,10 +4750,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; @@ -4710,6 +4767,10 @@ static PyObject *_wrap_wxStaticText_Create(PyObject *self, PyObject *args, PyObj { if (_obj3) delete _arg3; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -4734,12 +4795,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -4767,26 +4832,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) + _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(); - wxStaticText_SetLabel(_arg0,*_arg1); + wxStaticText_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4851,7 +4903,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; @@ -4859,11 +4911,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; } @@ -4892,12 +4945,17 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxListBox. Expected _wxValidator_p."); return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { if (_obj5) { _arg4 = PyList_Size(_obj5); @@ -4908,7 +4966,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; @@ -4921,6 +4979,10 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } { delete [] _arg5; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -4937,7 +4999,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; @@ -4964,7 +5026,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; @@ -4973,10 +5035,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; } @@ -5012,12 +5075,17 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxListBox_Create. Expected _wxValidator_p."); return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -5028,13 +5096,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; } @@ -5058,7 +5130,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; @@ -5087,7 +5159,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; @@ -5124,7 +5196,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; @@ -5171,7 +5243,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; @@ -5204,7 +5276,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; @@ -5233,7 +5305,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; @@ -5278,7 +5350,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; @@ -5310,7 +5382,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; @@ -5339,26 +5411,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; @@ -5394,7 +5453,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; @@ -5424,26 +5483,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) - 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(); - wxListBox_SetString(_arg0,_arg1,*_arg2); + wxListBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5478,27 +5524,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; @@ -5571,7 +5604,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; @@ -5579,11 +5612,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; } @@ -5612,12 +5646,17 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxCheckListBox. Expected _wxValidator_p."); return NULL; } } + if (_obj8) +{ + _arg8 = wxString_in_helper(_obj8); + if (_arg8 == NULL) + return NULL; +} { if (_obj5) { _arg4 = PyList_Size(_obj5); @@ -5628,7 +5667,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; @@ -5641,6 +5680,10 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } { delete [] _arg5; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -5657,7 +5700,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; @@ -5684,7 +5727,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; @@ -5693,10 +5736,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; } @@ -5732,12 +5776,17 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxCheckListBox_Create. Expected _wxValidator_p."); return NULL; } } + if (_obj9) +{ + _arg9 = wxString_in_helper(_obj9); + if (_arg9 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -5748,13 +5797,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; } @@ -5780,7 +5833,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; @@ -5809,7 +5862,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; @@ -5855,7 +5908,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; @@ -5887,7 +5940,73 @@ 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; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCheckListBox_HitTest(_swigobj,_swigarg0) (_swigobj->HitTest(_swigarg0)) +static PyObject *_wrap_wxCheckListBox_HitTest(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxCheckListBox * _arg0; + wxPoint * _arg1; + PyObject * _argo0 = 0; + wxPoint temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCheckListBox_HitTest",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckListBox_HitTest. Expected _wxCheckListBox_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxCheckListBox_HitTest(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCheckListBox_HitTestXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->HitTest(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCheckListBox_HitTestXY(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxCheckListBox * _arg0; + wxCoord _arg1; + wxCoord _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCheckListBox_HitTestXY",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckListBox_HitTestXY. Expected _wxCheckListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxCheckListBox_HitTestXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5926,15 +6045,14 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxTextAttr. Expected _wxFont_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); + _result = (wxTextAttr *)new_wxTextAttr(*_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5967,7 +6085,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; @@ -6003,7 +6121,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; @@ -6039,7 +6157,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; @@ -6068,15 +6186,14 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_SetFont. Expected _wxFont_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextAttr_SetFont(_arg0,*_arg1); + wxTextAttr_SetFont(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6105,7 +6222,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; @@ -6133,7 +6250,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; @@ -6161,7 +6278,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; @@ -6190,7 +6307,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; @@ -6220,7 +6337,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; @@ -6250,7 +6367,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; @@ -6279,7 +6396,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; @@ -6303,15 +6420,13 @@ static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextAttr_Combine",_kwnames,&_argo0,&_argo1,&_argo2)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_Combine. Expected _wxTextAttr_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_Combine. Expected _wxTextAttr_p."); return NULL; } @@ -6325,7 +6440,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; @@ -6372,23 +6487,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; } @@ -6397,6 +6514,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; @@ -6410,15 +6533,20 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxTextCtrl. Expected _wxValidator_p."); 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; @@ -6429,6 +6557,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; } @@ -6444,7 +6580,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; @@ -6465,23 +6601,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; } @@ -6497,6 +6635,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; @@ -6510,19 +6654,32 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxTextCtrl_Create. Expected _wxValidator_p."); 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; } @@ -6546,12 +6703,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6579,26 +6740,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; @@ -6633,12 +6781,16 @@ static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); + _result = new wxString (wxTextCtrl_GetRange(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6667,7 +6819,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; @@ -6696,12 +6848,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6729,7 +6885,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; @@ -6757,7 +6913,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; @@ -6785,7 +6941,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; @@ -6822,7 +6978,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; @@ -6861,12 +7017,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -6893,7 +7053,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; @@ -6924,26 +7084,13 @@ static PyObject *_wrap_wxTextCtrl_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); + _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 } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); + wxTextCtrl_Replace(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6977,7 +7124,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; @@ -7007,26 +7154,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; @@ -7043,7 +7177,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 }; @@ -7060,26 +7194,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); + _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 = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SaveFile(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7110,7 +7231,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; @@ -7139,7 +7260,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; @@ -7168,26 +7289,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) + _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_WriteText(_arg0,*_arg1); + wxTextCtrl_WriteText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7220,26 +7328,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); + _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(); - wxTextCtrl_AppendText(_arg0,*_arg1); + wxTextCtrl_AppendText(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7252,6 +7347,42 @@ 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 (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; @@ -7275,15 +7406,14 @@ static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObj } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxTextCtrl_SetStyle. Expected _wxTextAttr_p."); return NULL; } } { 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; @@ -7312,15 +7442,14 @@ static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_SetDefaultStyle. Expected _wxTextAttr_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); + _result = (bool )wxTextCtrl_SetDefaultStyle(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7349,7 +7478,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); @@ -7386,7 +7515,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; @@ -7424,7 +7553,7 @@ static PyObject *_wrap_wxTextCtrl_PositionToXY(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); + wxTextCtrl_PositionToXY(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7463,7 +7592,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; @@ -7491,7 +7620,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; @@ -7519,7 +7648,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; @@ -7547,7 +7676,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; @@ -7576,7 +7705,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; @@ -7604,7 +7733,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; @@ -7632,7 +7761,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; @@ -7659,7 +7788,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; @@ -7687,7 +7816,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; @@ -7716,7 +7845,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; @@ -7744,7 +7873,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; @@ -7772,7 +7901,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; @@ -7800,7 +7929,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; @@ -7829,7 +7958,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; @@ -7857,7 +7986,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; @@ -7872,21 +8001,80 @@ static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, P long _arg1; long _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","from","to", NULL }; + char *_kwnames[] = { "self","from","to", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_SetSelection",_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_SetSelection. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTextCtrl_SelectAll(_swigobj) (_swigobj->SelectAll()) +static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_SelectAll",_kwnames,&_argo0)) + 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_SelectAll. Expected _wxTextCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTextCtrl_SelectAll(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTextCtrl_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) +static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","editable", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_SetSelection",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextCtrl_SetEditable",_kwnames,&_argo0,&tempbool1)) 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_SetSelection. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_SetEditable. Expected _wxTextCtrl_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetSelection(_arg0,_arg1,_arg2); + wxTextCtrl_SetEditable(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -7895,62 +8083,59 @@ static PyObject *_wrap_wxTextCtrl_SetSelection(PyObject *self, PyObject *args, P return _resultobj; } -#define wxTextCtrl_SelectAll(_swigobj) (_swigobj->SelectAll()) -static PyObject *_wrap_wxTextCtrl_SelectAll(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_IsSingleLine(_swigobj) (_swigobj->IsSingleLine()) +static PyObject *_wrap_wxTextCtrl_IsSingleLine(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_SelectAll",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_IsSingleLine",_kwnames,&_argo0)) 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_SelectAll. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsSingleLine. Expected _wxTextCtrl_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SelectAll(_arg0); + _result = (bool )wxTextCtrl_IsSingleLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxTextCtrl_SetEditable(_swigobj,_swigarg0) (_swigobj->SetEditable(_swigarg0)) -static PyObject *_wrap_wxTextCtrl_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTextCtrl_IsMultiLine(_swigobj) (_swigobj->IsMultiLine()) +static PyObject *_wrap_wxTextCtrl_IsMultiLine(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxTextCtrl * _arg0; - bool _arg1; PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","editable", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxTextCtrl_SetEditable",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_IsMultiLine",_kwnames,&_argo0)) 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_SetEditable. Expected _wxTextCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_IsMultiLine. Expected _wxTextCtrl_p."); return NULL; } } - _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxTextCtrl_SetEditable(_arg0,_arg1); + _result = (bool )wxTextCtrl_IsMultiLine(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -7976,26 +8161,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; @@ -8009,7 +8181,7 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject } static wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to) { - return self->GetValue().Mid(from, to-from); + return self->GetValue().Mid(from, to - from); } static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8032,12 +8204,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -8087,18 +8263,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; } @@ -8120,15 +8297,20 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo5) { - if (_argo5 == Py_None) { _arg5 = NULL; } - else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxScrollBar. Expected _wxValidator_p."); 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; @@ -8139,6 +8321,10 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -8154,7 +8340,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; @@ -8179,7 +8365,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; @@ -8187,10 +8373,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; } @@ -8219,19 +8406,28 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxScrollBar_Create. Expected _wxValidator_p."); 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; } @@ -8255,7 +8451,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; @@ -8283,7 +8479,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; @@ -8311,7 +8507,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; @@ -8339,7 +8535,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; @@ -8367,7 +8563,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; @@ -8395,7 +8591,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; @@ -8430,7 +8626,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; @@ -8480,17 +8676,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; } @@ -8510,10 +8707,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; @@ -8524,6 +8727,10 @@ static PyObject *_wrap_new_wxSpinButton(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -8539,7 +8746,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; @@ -8563,17 +8770,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; } @@ -8600,14 +8808,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; } @@ -8631,7 +8849,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; @@ -8659,7 +8877,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; @@ -8687,7 +8905,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; @@ -8716,7 +8934,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; @@ -8745,7 +8963,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; @@ -8796,18 +9014,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; } @@ -8817,8 +9036,7 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticBitmap. Expected _wxBitmap_p."); return NULL; } @@ -8834,10 +9052,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; @@ -8848,6 +9072,10 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -8863,7 +9091,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; @@ -8888,7 +9116,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; @@ -8896,10 +9124,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; } @@ -8916,8 +9145,7 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxStaticBitmap_Create. Expected _wxBitmap_p."); return NULL; } @@ -8933,14 +9161,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; } @@ -8965,7 +9203,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; @@ -8994,15 +9232,14 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetBitmap. Expected _wxBitmap_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetBitmap(_arg0,*_arg1); + wxStaticBitmap_SetBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9031,15 +9268,14 @@ static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetIcon. Expected _wxIcon_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxStaticBitmap_SetIcon(_arg0,*_arg1); + wxStaticBitmap_SetIcon(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9094,7 +9330,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; @@ -9103,11 +9339,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; } @@ -9117,22 +9354,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) + _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) { @@ -9154,12 +9378,17 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } if (_argo9) { - if (_argo9 == Py_None) { _arg9 = NULL; } - else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of new_wxRadioBox. Expected _wxValidator_p."); return NULL; } } + if (_obj10) +{ + _arg10 = wxString_in_helper(_obj10); + if (_arg10 == NULL) + return NULL; +} { if (_obj6) { _arg5 = PyList_Size(_obj6); @@ -9170,7 +9399,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; @@ -9187,6 +9416,10 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } { delete [] _arg6; +} +{ + if (_obj10) + delete _arg10; } return _resultobj; } @@ -9203,7 +9436,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; @@ -9232,7 +9465,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; @@ -9242,10 +9475,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; } @@ -9262,22 +9496,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) { @@ -9299,12 +9520,17 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } if (_argo10) { - if (_argo10 == Py_None) { _arg10 = NULL; } - else if (SWIG_GetPtrObj(_argo10,(void **) &_arg10,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo10,(void **) &_arg10,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 11 of wxRadioBox_Create. Expected _wxValidator_p."); return NULL; } } + if (_obj11) +{ + _arg11 = wxString_in_helper(_obj11); + if (_arg11 == NULL) + return NULL; +} { if (_obj7) { _arg6 = PyList_Size(_obj7); @@ -9315,7 +9541,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; @@ -9326,6 +9552,10 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } { delete [] _arg7; +} +{ + if (_obj11) + delete _arg11; } return _resultobj; } @@ -9352,7 +9582,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; @@ -9384,7 +9614,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; @@ -9414,26 +9644,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); + _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 )wxRadioBox_FindString(_arg0,*_arg1); + _result = (int )wxRadioBox_FindString(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9466,46 +9683,16 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetItemLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","item", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRadioBox_GetItemLabel",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetItemLabel. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetItemLabel(_arg0,_arg1)); + _result = new wxString (wxRadioBox_GetString(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9513,47 +9700,34 @@ static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, P return _resultobj; } -#define wxRadioBox_SetItemLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRadioBox_SetString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetString(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRadioBox_SetString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRadioBox * _arg0; int _arg1; wxString * _arg2; PyObject * _argo0 = 0; PyObject * _obj2 = 0; - char *_kwnames[] = { "self","item","label", NULL }; + char *_kwnames[] = { "self","n","label", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxRadioBox_SetItemLabel",_kwnames,&_argo0,&_arg1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxRadioBox_SetString",_kwnames,&_argo0,&_arg1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRadioBox_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetItemLabel. Expected _wxRadioBox_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetString. Expected _wxRadioBox_p."); return NULL; } } { -#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_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9586,7 +9760,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; @@ -9614,12 +9788,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_FromWideChar(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -9647,7 +9825,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; @@ -9675,7 +9853,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; @@ -9704,26 +9882,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; @@ -9758,7 +9923,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; @@ -9790,7 +9955,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; @@ -9842,7 +10007,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; @@ -9850,11 +10015,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; } @@ -9864,22 +10030,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) { @@ -9894,15 +10047,20 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxRadioButton. Expected _wxValidator_p."); 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; @@ -9916,6 +10074,10 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -9932,7 +10094,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; @@ -9958,7 +10120,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; @@ -9967,10 +10129,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; } @@ -9987,22 +10150,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) { @@ -10017,15 +10167,20 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxRadioButton_Create. Expected _wxValidator_p."); 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; @@ -10033,6 +10188,10 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -10057,7 +10216,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; @@ -10087,7 +10246,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; @@ -10141,18 +10300,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; } @@ -10174,15 +10334,20 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw return NULL; } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxSlider. Expected _wxValidator_p."); 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; @@ -10193,6 +10358,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; } @@ -10208,7 +10377,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; @@ -10236,7 +10405,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; @@ -10244,10 +10413,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; } @@ -10276,19 +10446,28 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo9) { - if (_argo9 == Py_None) { _arg9 = NULL; } - else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of wxSlider_Create. Expected _wxValidator_p."); 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; } @@ -10311,7 +10490,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; @@ -10339,7 +10518,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; @@ -10368,7 +10547,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; @@ -10396,7 +10575,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; @@ -10424,7 +10603,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; @@ -10452,7 +10631,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; @@ -10480,7 +10659,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; @@ -10508,7 +10687,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; @@ -10536,7 +10715,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; @@ -10564,7 +10743,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; @@ -10592,7 +10771,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; @@ -10621,7 +10800,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; @@ -10651,7 +10830,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; @@ -10680,7 +10859,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; @@ -10709,7 +10888,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; @@ -10739,7 +10918,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; @@ -10768,7 +10947,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; @@ -10797,7 +10976,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; @@ -10826,7 +11005,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; @@ -10881,24 +11060,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; } @@ -10907,6 +11088,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; @@ -10918,10 +11105,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; @@ -10932,6 +11125,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; } @@ -10947,7 +11148,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; @@ -10968,24 +11169,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; } @@ -11001,6 +11204,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; @@ -11012,14 +11221,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; } @@ -11043,7 +11266,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; @@ -11071,7 +11294,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; @@ -11099,7 +11322,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; @@ -11128,7 +11351,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; @@ -11157,7 +11380,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; @@ -11209,7 +11432,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; @@ -11217,11 +11440,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; } @@ -11231,22 +11455,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) { @@ -11261,15 +11472,20 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxToggleButton. Expected _wxValidator_p."); 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; @@ -11283,6 +11499,10 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje { if (_obj2) delete _arg2; +} +{ + if (_obj7) + delete _arg7; } return _resultobj; } @@ -11299,7 +11519,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; @@ -11325,7 +11545,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; @@ -11334,10 +11554,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; } @@ -11354,22 +11575,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) { @@ -11384,15 +11592,20 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxToggleButton_Create. Expected _wxValidator_p."); 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; @@ -11400,6 +11613,10 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO { if (_obj3) delete _arg3; +} +{ + if (_obj8) + delete _arg8; } return _resultobj; } @@ -11426,7 +11643,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; @@ -11455,7 +11672,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; @@ -11483,26 +11700,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; @@ -11564,8 +11768,7 @@ static PyMethodDef controlscMethods[] = { { "wxRadioBox_GetCount", (PyCFunction) _wrap_wxRadioBox_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetStringSelection", (PyCFunction) _wrap_wxRadioBox_GetStringSelection, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetSelection", (PyCFunction) _wrap_wxRadioBox_GetSelection, METH_VARARGS | METH_KEYWORDS }, - { "wxRadioBox_SetItemLabel", (PyCFunction) _wrap_wxRadioBox_SetItemLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxRadioBox_GetItemLabel", (PyCFunction) _wrap_wxRadioBox_GetItemLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxRadioBox_SetString", (PyCFunction) _wrap_wxRadioBox_SetString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetString", (PyCFunction) _wrap_wxRadioBox_GetString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_FindString", (PyCFunction) _wrap_wxRadioBox_FindString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_EnableItem", (PyCFunction) _wrap_wxRadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS }, @@ -11600,6 +11803,8 @@ static PyMethodDef controlscMethods[] = { { "new_wxScrollBar", (PyCFunction) _wrap_new_wxScrollBar, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_GetString", (PyCFunction) _wrap_wxTextCtrl_GetString, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_write", (PyCFunction) _wrap_wxTextCtrl_write, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_IsMultiLine", (PyCFunction) _wrap_wxTextCtrl_IsMultiLine, METH_VARARGS | METH_KEYWORDS }, + { "wxTextCtrl_IsSingleLine", (PyCFunction) _wrap_wxTextCtrl_IsSingleLine, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetEditable", (PyCFunction) _wrap_wxTextCtrl_SetEditable, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SelectAll", (PyCFunction) _wrap_wxTextCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS }, { "wxTextCtrl_SetSelection", (PyCFunction) _wrap_wxTextCtrl_SetSelection, METH_VARARGS | METH_KEYWORDS }, @@ -11623,6 +11828,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 }, @@ -11658,6 +11864,8 @@ static PyMethodDef controlscMethods[] = { { "wxTextAttr_SetTextColour", (PyCFunction) _wrap_wxTextAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTextAttr", (PyCFunction) _wrap_delete_wxTextAttr, METH_VARARGS | METH_KEYWORDS }, { "new_wxTextAttr", (PyCFunction) _wrap_new_wxTextAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckListBox_HitTestXY", (PyCFunction) _wrap_wxCheckListBox_HitTestXY, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckListBox_HitTest", (PyCFunction) _wrap_wxCheckListBox_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_GetItemHeight", (PyCFunction) _wrap_wxCheckListBox_GetItemHeight, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_InsertItems", (PyCFunction) _wrap_wxCheckListBox_InsertItems, METH_VARARGS | METH_KEYWORDS }, { "wxCheckListBox_Check", (PyCFunction) _wrap_wxCheckListBox_Check, METH_VARARGS | METH_KEYWORDS }, @@ -11739,6 +11947,7 @@ static PyMethodDef controlscMethods[] = { { "new_wxPreChoice", (PyCFunction) _wrap_new_wxPreChoice, METH_VARARGS | METH_KEYWORDS }, { "new_wxChoice", (PyCFunction) _wrap_new_wxChoice, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_SetValue", (PyCFunction) _wrap_wxCheckBox_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckBox_IsChecked", (PyCFunction) _wrap_wxCheckBox_IsChecked, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_GetValue", (PyCFunction) _wrap_wxCheckBox_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_Create", (PyCFunction) _wrap_wxCheckBox_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreCheckBox", (PyCFunction) _wrap_new_wxPreCheckBox, METH_VARARGS | METH_KEYWORDS },