X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/474c48f92ec642facb72551404955c55ac9f3fba..ef12d2e2430d959195e9f5d3dd35a53837b3a21d:/wxPython/src/gtk/windows2.cpp diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 22372ccfe6..2e6c97a6ff 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -66,6 +66,13 @@ extern PyObject *SWIG_newvarlink(void); #include #endif + // Put some wx default wxChar* values into wxStrings. + DECLARE_DEF_STRING(NOTEBOOK_NAME); + + static const wxChar* wxSplitterNameStr = wxT("splitter"); + DECLARE_DEF_STRING(SplitterNameStr); + static const wxString wxPyEmptyString(wxT("")); + static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -92,12 +99,6 @@ 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 #ifdef __cplusplus extern "C" { #endif @@ -149,7 +150,7 @@ static PyObject *_wrap_new_wxNotebookEvent(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); + _result = (wxNotebookEvent *)new_wxNotebookEvent(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -183,7 +184,7 @@ static PyObject *_wrap_wxNotebookEvent_GetSelection(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebookEvent_GetSelection(_arg0); + _result = (int )wxNotebookEvent_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -211,7 +212,7 @@ static PyObject *_wrap_wxNotebookEvent_GetOldSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebookEvent_GetOldSelection(_arg0); + _result = (int )wxNotebookEvent_GetOldSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -239,7 +240,7 @@ static PyObject *_wrap_wxNotebookEvent_SetOldSelection(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookEvent_SetOldSelection(_arg0,_arg1); + wxNotebookEvent_SetOldSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -268,7 +269,7 @@ static PyObject *_wrap_wxNotebookEvent_SetSelection(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebookEvent_SetSelection(_arg0,_arg1); + wxNotebookEvent_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -318,17 +319,18 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) 0; - char * _arg5 = (char *) "notebook"; + wxString * _arg5 = (wxString *) &wxPyNOTEBOOK_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,"Oi|OOls:new_wxNotebook",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxNotebook",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -348,10 +350,16 @@ static PyObject *_wrap_new_wxNotebook(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 = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxNotebook *)new_wxNotebook(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -362,6 +370,10 @@ static PyObject *_wrap_new_wxNotebook(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -377,7 +389,7 @@ static PyObject *_wrap_new_wxPreNotebook(PyObject *self, PyObject *args, PyObjec return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNotebook *)new_wxPreNotebook(); + _result = (wxNotebook *)new_wxPreNotebook(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -401,17 +413,18 @@ static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObjec wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) 0; - char * _arg6 = (char *) "notebook"; + wxString * _arg6 = (wxString *) &wxPyNOTEBOOK_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,"OOi|OOls:wxNotebook_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxNotebook_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -438,14 +451,24 @@ static PyObject *_wrap_wxNotebook_Create(PyObject *self, PyObject *args, PyObjec _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 )wxNotebook_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxNotebook_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; } @@ -469,7 +492,7 @@ static PyObject *_wrap_wxNotebook_GetPageCount(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetPageCount(_arg0); + _result = (int )wxNotebook_GetPageCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -498,7 +521,7 @@ static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_SetSelection(_arg0,_arg1); + _result = (int )wxNotebook_SetSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -528,7 +551,7 @@ static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *arg _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AdvanceSelection(_arg0,_arg1); + wxNotebook_AdvanceSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -557,7 +580,7 @@ static PyObject *_wrap_wxNotebook_GetSelection(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetSelection(_arg0); + _result = (int )wxNotebook_GetSelection(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -587,26 +610,13 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) 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); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); + _result = (bool )wxNotebook_SetPageText(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -639,12 +649,16 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); + _result = new wxString (wxNotebook_GetPageText(_arg0,_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; }{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); +#else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif } { delete _result; @@ -680,7 +694,7 @@ static PyObject *_wrap_wxNotebook_SetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetImageList(_arg0,_arg1); + wxNotebook_SetImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -717,7 +731,7 @@ static PyObject *_wrap_wxNotebook_AssignImageList(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_AssignImageList(_arg0,_arg1); + wxNotebook_AssignImageList(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -746,7 +760,7 @@ static PyObject *_wrap_wxNotebook_GetImageList(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxImageList *)wxNotebook_GetImageList(_arg0); + _result = (wxImageList *)wxNotebook_GetImageList(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -775,7 +789,7 @@ static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); + _result = (int )wxNotebook_GetPageImage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -805,7 +819,7 @@ static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); + _result = (bool )wxNotebook_SetPageImage(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -833,7 +847,7 @@ static PyObject *_wrap_wxNotebook_GetRowCount(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxNotebook_GetRowCount(_arg0); + _result = (int )wxNotebook_GetRowCount(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -868,7 +882,7 @@ static PyObject *_wrap_wxNotebook_SetPageSize(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetPageSize(_arg0,*_arg1); + wxNotebook_SetPageSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -904,7 +918,7 @@ static PyObject *_wrap_wxNotebook_SetPadding(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_SetPadding(_arg0,*_arg1); + wxNotebook_SetPadding(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -934,7 +948,7 @@ static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); + _result = (bool )wxNotebook_DeletePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -963,7 +977,7 @@ static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); + _result = (bool )wxNotebook_RemovePage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -991,7 +1005,7 @@ static PyObject *_wrap_wxNotebook_DeleteAllPages(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_DeleteAllPages(_arg0); + _result = (bool )wxNotebook_DeleteAllPages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1031,26 +1045,13 @@ static PyObject *_wrap_wxNotebook_AddPage(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 } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); + _result = (bool )wxNotebook_AddPage(_arg0,_arg1,*_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1096,27 +1097,14 @@ static PyObject *_wrap_wxNotebook_InsertPage(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); + _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 } _arg4 = (bool ) tempbool4; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); + _result = (bool )wxNotebook_InsertPage(_arg0,_arg1,_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1149,7 +1137,7 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); + _result = (wxWindow *)wxNotebook_GetPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1179,7 +1167,7 @@ static PyObject *_wrap_wxNotebook_ResizeChildren(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNotebook_ResizeChildren(_arg0); + wxNotebook_ResizeChildren(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1234,7 +1222,7 @@ static PyObject *_wrap_new_wxSplitterEvent(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); + _result = (wxSplitterEvent *)new_wxSplitterEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1268,7 +1256,7 @@ static PyObject *_wrap_wxSplitterEvent_GetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetSashPosition(_arg0); + _result = (int )wxSplitterEvent_GetSashPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1296,7 +1284,7 @@ static PyObject *_wrap_wxSplitterEvent_GetX(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetX(_arg0); + _result = (int )wxSplitterEvent_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1324,7 +1312,7 @@ static PyObject *_wrap_wxSplitterEvent_GetY(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterEvent_GetY(_arg0); + _result = (int )wxSplitterEvent_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1340,7 @@ static PyObject *_wrap_wxSplitterEvent_GetWindowBeingRemoved(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); + _result = (wxWindow *)wxSplitterEvent_GetWindowBeingRemoved(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1380,7 +1368,7 @@ static PyObject *_wrap_wxSplitterEvent_SetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterEvent_SetSashPosition(_arg0,_arg1); + wxSplitterEvent_SetSashPosition(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1422,17 +1410,18 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxSP_3D|wxCLIP_CHILDREN; - char * _arg5 = (char *) "splitterWindow"; + wxString * _arg5 = (wxString *) &wxPySplitterNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","point","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSplitterWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxSplitterWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1452,10 +1441,16 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb _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 = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSplitterWindow *)new_wxSplitterWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1466,6 +1461,10 @@ static PyObject *_wrap_new_wxSplitterWindow(PyObject *self, PyObject *args, PyOb Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -1481,7 +1480,7 @@ static PyObject *_wrap_new_wxPreSplitterWindow(PyObject *self, PyObject *args, P return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); + _result = (wxSplitterWindow *)new_wxPreSplitterWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1505,17 +1504,18 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxSP_3D|wxCLIP_CHILDREN; - char * _arg6 = (char *) "splitterWindow"; + wxString * _arg6 = (wxString *) &wxPySplitterNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","point","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSplitterWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxSplitterWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1542,14 +1542,24 @@ static PyObject *_wrap_wxSplitterWindow_Create(PyObject *self, PyObject *args, P _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 )wxSplitterWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSplitterWindow_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; } @@ -1573,7 +1583,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow1(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow1(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1601,7 +1611,7 @@ static PyObject *_wrap_wxSplitterWindow_GetWindow2(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); + _result = (wxWindow *)wxSplitterWindow_GetWindow2(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1629,7 +1639,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSplitMode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSplitMode(_arg0,_arg1); + wxSplitterWindow_SetSplitMode(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1658,7 +1668,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSplitMode(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSplitMode(_arg0); + _result = (int )wxSplitterWindow_GetSplitMode(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1694,7 +1704,7 @@ static PyObject *_wrap_wxSplitterWindow_Initialize(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_Initialize(_arg0,_arg1); + wxSplitterWindow_Initialize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1742,7 +1752,7 @@ static PyObject *_wrap_wxSplitterWindow_SplitVertically(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSplitterWindow_SplitVertically(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1789,7 +1799,7 @@ static PyObject *_wrap_wxSplitterWindow_SplitHorizontally(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSplitterWindow_SplitHorizontally(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1826,7 +1836,7 @@ static PyObject *_wrap_wxSplitterWindow_Unsplit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); + _result = (bool )wxSplitterWindow_Unsplit(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1872,7 +1882,7 @@ static PyObject *_wrap_wxSplitterWindow_ReplaceWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); + _result = (bool )wxSplitterWindow_ReplaceWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1900,7 +1910,7 @@ static PyObject *_wrap_wxSplitterWindow_IsSplit(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSplitterWindow_IsSplit(_arg0); + _result = (bool )wxSplitterWindow_IsSplit(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1928,7 +1938,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSashSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSashSize(_arg0,_arg1); + wxSplitterWindow_SetSashSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1957,7 +1967,7 @@ static PyObject *_wrap_wxSplitterWindow_SetBorderSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetBorderSize(_arg0,_arg1); + wxSplitterWindow_SetBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1986,7 +1996,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSashSize(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSashSize(_arg0); + _result = (int )wxSplitterWindow_GetSashSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2014,7 +2024,7 @@ static PyObject *_wrap_wxSplitterWindow_GetBorderSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetBorderSize(_arg0); + _result = (int )wxSplitterWindow_GetBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2045,7 +2055,7 @@ static PyObject *_wrap_wxSplitterWindow_SetSashPosition(PyObject *self, PyObject _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); + wxSplitterWindow_SetSashPosition(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2074,7 +2084,7 @@ static PyObject *_wrap_wxSplitterWindow_GetSashPosition(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetSashPosition(_arg0); + _result = (int )wxSplitterWindow_GetSashPosition(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2102,7 +2112,7 @@ static PyObject *_wrap_wxSplitterWindow_SetMinimumPaneSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); + wxSplitterWindow_SetMinimumPaneSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2131,7 +2141,94 @@ static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); + _result = (int )wxSplitterWindow_GetMinimumPaneSize(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSplitterWindow_SizeWindows(_swigobj) (_swigobj->SizeWindows()) +static PyObject *_wrap_wxSplitterWindow_SizeWindows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_SizeWindows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SizeWindows. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSplitterWindow_SizeWindows(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SetNeedUpdating(_swigobj,_swigarg0) (_swigobj->SetNeedUpdating(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetNeedUpdating(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","needUpdating", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetNeedUpdating",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetNeedUpdating. Expected _wxSplitterWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSplitterWindow_SetNeedUpdating(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_GetNeedUpdating(_swigobj) (_swigobj->GetNeedUpdating()) +static PyObject *_wrap_wxSplitterWindow_GetNeedUpdating(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetNeedUpdating",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetNeedUpdating. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSplitterWindow_GetNeedUpdating(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2140,6 +2237,9 @@ static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObj } static PyMethodDef windows2cMethods[] = { + { "wxSplitterWindow_GetNeedUpdating", (PyCFunction) _wrap_wxSplitterWindow_GetNeedUpdating, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetNeedUpdating", (PyCFunction) _wrap_wxSplitterWindow_SetNeedUpdating, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SizeWindows", (PyCFunction) _wrap_wxSplitterWindow_SizeWindows, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_SetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS },