X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08e70846d57fcfa1e6cccaf4707b32d4dd773d79..c3bfa1cb2892cad972e12274b36a5dec5fcb76e5:/wxPython/src/mac/windows2.cpp diff --git a/wxPython/src/mac/windows2.cpp b/wxPython/src/mac/windows2.cpp index 348bfaf953..f3df2e0503 100644 --- a/wxPython/src/mac/windows2.cpp +++ b/wxPython/src/mac/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; @@ -312,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; } @@ -342,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; @@ -356,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; } @@ -395,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; } @@ -432,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; } @@ -1381,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; } @@ -1411,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; @@ -1425,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; } @@ -1464,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; } @@ -1501,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; }