X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6824d4f9e0f6e7d97124a47ab2d75a551ed209ac..71aba8333cc915afff9e740c944f7fa7247abacb:/wxPython/src/mac/cmndlgs.cpp diff --git a/wxPython/src/mac/cmndlgs.cpp b/wxPython/src/mac/cmndlgs.cpp index a1f9c2fed5..a5571749b4 100644 --- a/wxPython/src/mac/cmndlgs.cpp +++ b/wxPython/src/mac/cmndlgs.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 *); @@ -88,6 +87,16 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { } return target; } + + // Put some wx default wxChar* values into wxStrings. + DECLARE_DEF_STRING(FileSelectorPromptStr); + DECLARE_DEF_STRING(DirSelectorPromptStr); + DECLARE_DEF_STRING(DirDialogNameStr); + DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr); + DECLARE_DEF_STRING(GetTextFromUserPromptStr); + DECLARE_DEF_STRING(MessageBoxCaptionStr); + static const wxString wxPyEmptyString(wxT("")); + #ifdef __cplusplus extern "C" { #endif @@ -532,23 +541,30 @@ static void *SwigwxDirDialogTowxObject(void *ptr) { return (void *) dest; } -#define new_wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +#define new_wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDirDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDirDialog * _result; wxWindow * _arg0; - char * _arg1 = (char *) "Choose a directory"; - char * _arg2 = (char *) ""; + wxString * _arg1 = (wxString *) &wxPyDirSelectorPromptStr; + wxString * _arg2 = (wxString *) &wxPyEmptyString; long _arg3 = (long ) 0; wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + wxString * _arg6 = (wxString *) &wxPyDirDialogNameStr; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj4 = 0; - char *_kwnames[] = { "parent","message","defaultPath","style","pos", NULL }; + wxSize temp0; + PyObject * _obj5 = 0; + PyObject * _obj6 = 0; + char *_kwnames[] = { "parent","message","defaultPath","style","pos","size","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|sslO:new_wxDirDialog",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_obj4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOlOOO:new_wxDirDialog",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3,&_obj4,&_obj5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -557,15 +573,39 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj1) +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} if (_obj4) { _arg4 = &temp; if (! wxPoint_helper(_obj4, &_arg4)) return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDirDialog *)new_wxDirDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); + _result = (wxDirDialog *)new_wxDirDialog(_arg0,*_arg1,*_arg2,_arg3,*_arg4,*_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -576,6 +616,18 @@ static PyObject *_wrap_new_wxDirDialog(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -605,7 +657,7 @@ static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args, PyObj if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -642,7 +694,7 @@ static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args, Py if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -832,20 +884,24 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject PyObject * _resultobj; wxFileDialog * _result; wxWindow * _arg0; - char * _arg1 = (char *) "Choose a file"; - char * _arg2 = (char *) ""; - char * _arg3 = (char *) ""; - char * _arg4 = (char *) "*.*"; + wxString * _arg1 = (wxString *) &wxPyFileSelectorPromptStr; + wxString * _arg2 = (wxString *) &wxPyEmptyString; + wxString * _arg3 = (wxString *) &wxPyEmptyString; + wxString * _arg4 = (wxString *) &wxPyFileSelectorDefaultWildcardStr; long _arg5 = (long ) 0; wxPoint * _arg6 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + PyObject * _obj4 = 0; wxPoint temp; PyObject * _obj6 = 0; char *_kwnames[] = { "parent","message","defaultDir","defaultFile","wildcard","style","pos", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|sssslO:new_wxFileDialog",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OOOOlO:new_wxFileDialog",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -854,6 +910,30 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject return NULL; } } + if (_obj1) +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} + if (_obj3) +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} + if (_obj4) +{ + _arg4 = wxString_in_helper(_obj4); + if (_arg4 == NULL) + return NULL; +} if (_obj6) { _arg6 = &temp; @@ -862,7 +942,7 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileDialog *)new_wxFileDialog(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,*_arg6); + _result = (wxFileDialog *)new_wxFileDialog(_arg0,*_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -873,505 +953,493 @@ static PyObject *_wrap_new_wxFileDialog(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } - return _resultobj; +{ + if (_obj1) + delete _arg1; } - -#define wxFileDialog_GetDirectory(_swigobj) (_swigobj->GetDirectory()) -static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxFileDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetDirectory",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetDirectory. Expected _wxFileDialog_p."); - return NULL; - } - } { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetDirectory(_arg0)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif + if (_obj2) + delete _arg2; } { - delete _result; + if (_obj3) + delete _arg3; +} +{ + if (_obj4) + delete _arg4; } return _resultobj; } -#define wxFileDialog_GetFilename(_swigobj) (_swigobj->GetFilename()) -static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","message", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilename",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetMessage",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilename. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetMessage. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetFilename(_arg0)); + wxFileDialog_SetMessage(_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 -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) -static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","path", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilterIndex",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetPath",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilterIndex. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetPath. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_GetFilterIndex(_arg0); + wxFileDialog_SetPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxFileDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) -static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetDirectory(_swigobj,_swigarg0) (_swigobj->SetDirectory(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","dir", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetMessage",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetDirectory",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetMessage. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetDirectory. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetMessage(_arg0)); + wxFileDialog_SetDirectory(_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 -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetPath(_swigobj) (_swigobj->GetPath()) -static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetFilename(_swigobj,_swigarg0) (_swigobj->SetFilename(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetPath",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetFilename",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetPath. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilename. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetPath(_arg0)); + wxFileDialog_SetFilename(_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 -} +} Py_INCREF(Py_None); + _resultobj = Py_None; { - delete _result; + if (_obj1) + delete _arg1; } return _resultobj; } -#define wxFileDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) -static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetWildcard(_swigobj,_swigarg0) (_swigobj->SetWildcard(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; wxFileDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","wildCard", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetStyle",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetWildcard",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetStyle. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetWildcard. Expected _wxFileDialog_p."); return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxFileDialog_GetStyle(_arg0); + wxFileDialog_SetWildcard(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxFileDialog_GetWildcard(_swigobj) (_swigobj->GetWildcard()) -static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; wxFileDialog * _arg0; + long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetWildcard",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxFileDialog_SetStyle",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetWildcard. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetStyle. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxFileDialog_GetWildcard(_arg0)); + wxFileDialog_SetStyle(_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; -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFileDialog_SetDirectory(_swigobj,_swigarg0) (_swigobj->SetDirectory(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) +static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFileDialog * _arg0; - wxString * _arg1; + int _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","directory", NULL }; + char *_kwnames[] = { "self","filterIndex", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetDirectory",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFileDialog_SetFilterIndex",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetDirectory. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilterIndex. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetDirectory(_arg0,*_arg1); + wxFileDialog_SetFilterIndex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} return _resultobj; } -#define wxFileDialog_SetFilename(_swigobj,_swigarg0) (_swigobj->SetFilename(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetMessage(_swigobj) (_swigobj->GetMessage()) +static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","setfilename", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetFilename",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetMessage",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilename. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetMessage. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilename(_arg0,*_arg1); + _result = new wxString (wxFileDialog_GetMessage(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} { - if (_obj1) - delete _arg1; + delete _result; } return _resultobj; } -#define wxFileDialog_SetFilterIndex(_swigobj,_swigarg0) (_swigobj->SetFilterIndex(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetPath(_swigobj) (_swigobj->GetPath()) +static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","filterIndex", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFileDialog_SetFilterIndex",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetPath",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetFilterIndex. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetPath. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetFilterIndex(_arg0,_arg1); + _result = new wxString (wxFileDialog_GetPath(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } -#define wxFileDialog_SetMessage(_swigobj,_swigarg0) (_swigobj->SetMessage(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetMessage(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetDirectory(_swigobj) (_swigobj->GetDirectory()) +static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","message", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetMessage",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetDirectory",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetMessage. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetDirectory. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetMessage(_arg0,*_arg1); + _result = new wxString (wxFileDialog_GetDirectory(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} { - if (_obj1) - delete _arg1; + delete _result; } return _resultobj; } -#define wxFileDialog_SetPath(_swigobj,_swigarg0) (_swigobj->SetPath(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetPath(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetFilename(_swigobj) (_swigobj->GetFilename()) +static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","path", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetPath",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilename",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetPath. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilename. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetPath(_arg0,*_arg1); + _result = new wxString (wxFileDialog_GetFilename(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} { - if (_obj1) - delete _arg1; + delete _result; } return _resultobj; } -#define wxFileDialog_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetWildcard(_swigobj) (_swigobj->GetWildcard()) +static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxString * _result; wxFileDialog * _arg0; - long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","style", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxFileDialog_SetStyle",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetWildcard",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetStyle. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetWildcard. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetStyle(_arg0,_arg1); + _result = new wxString (wxFileDialog_GetWildcard(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} return _resultobj; } -#define wxFileDialog_SetWildcard(_swigobj,_swigarg0) (_swigobj->SetWildcard(_swigarg0)) -static PyObject *_wrap_wxFileDialog_SetWildcard(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxFileDialog_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + long _result; wxFileDialog * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","wildCard", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDialog_SetWildcard",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetStyle",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_SetWildcard. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetStyle. Expected _wxFileDialog_p."); return NULL; } } -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFileDialog_SetWildcard(_arg0,*_arg1); + _result = (long )wxFileDialog_GetStyle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} +} _resultobj = Py_BuildValue("l",_result); return _resultobj; } -#define wxFileDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFileDialog_GetFilterIndex(_swigobj) (_swigobj->GetFilterIndex()) +static PyObject *_wrap_wxFileDialog_GetFilterIndex(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; wxFileDialog * _arg0; @@ -1379,18 +1447,18 @@ static PyObject *_wrap_wxFileDialog_ShowModal(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_ShowModal",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFileDialog_GetFilterIndex",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_ShowModal. Expected _wxFileDialog_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDialog_GetFilterIndex. Expected _wxFileDialog_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxFileDialog_ShowModal(_arg0); + _result = (int )wxFileDialog_GetFilterIndex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1861,7 +1929,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, P if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -1974,19 +2042,22 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO PyObject * _resultobj; wxTextEntryDialog * _result; wxWindow * _arg0; - char * _arg1; - char * _arg2 = (char *) "Input Text"; - char * _arg3 = (char *) ""; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyGetTextFromUserPromptStr; + wxString * _arg3 = (wxString *) &wxPyEmptyString; long _arg4 = (long ) wxOK|wxCANCEL|wxCENTRE; wxPoint * _arg5 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; wxPoint temp; PyObject * _obj5 = 0; char *_kwnames[] = { "parent","message","caption","defaultValue","style","pos", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|sslO:new_wxTextEntryDialog",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_obj5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OOlO:new_wxTextEntryDialog",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1995,6 +2066,23 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} + if (_obj3) +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} if (_obj5) { _arg5 = &temp; @@ -2003,7 +2091,7 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,_arg1,_arg2,_arg3,_arg4,*_arg5); + _result = (wxTextEntryDialog *)new_wxTextEntryDialog(_arg0,*_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2014,6 +2102,18 @@ static PyObject *_wrap_new_wxTextEntryDialog(PyObject *self, PyObject *args, PyO Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} return _resultobj; } @@ -2043,7 +2143,7 @@ static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -2439,8 +2539,7 @@ static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args, } } 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 wxFontData_SetChosenFont. Expected _wxFont_p."); return NULL; } @@ -2512,8 +2611,7 @@ static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args, } } 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 wxFontData_SetInitialFont. Expected _wxFont_p."); return NULL; } @@ -2652,15 +2750,14 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFontData_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFontData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxFontDialog. Expected _wxFontData_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFontDialog *)new_wxFontDialog(_arg0,_arg1); + _result = (wxFontDialog *)new_wxFontDialog(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2783,18 +2880,20 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj PyObject * _resultobj; wxMessageDialog * _result; wxWindow * _arg0; - char * _arg1; - char * _arg2 = (char *) "Message box"; + wxString * _arg1; + wxString * _arg2 = (wxString *) &wxPyMessageBoxCaptionStr; long _arg3 = (long ) wxOK|wxCANCEL|wxCENTRE; wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; wxPoint temp; PyObject * _obj4 = 0; char *_kwnames[] = { "parent","message","caption","style","pos", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os|slO:new_wxMessageDialog",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_obj4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OlO:new_wxMessageDialog",_kwnames,&_argo0,&_obj1,&_obj2,&_arg3,&_obj4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2803,6 +2902,17 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} if (_obj4) { _arg4 = &temp; @@ -2811,7 +2921,7 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,_arg1,_arg2,_arg3,*_arg4); + _result = (wxMessageDialog *)new_wxMessageDialog(_arg0,*_arg1,*_arg2,_arg3,*_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2822,6 +2932,14 @@ static PyObject *_wrap_new_wxMessageDialog(PyObject *self, PyObject *args, PyObj Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} return _resultobj; } @@ -2957,13 +3075,14 @@ static PyObject *_wrap_wxProgressDialog_Update(PyObject *self, PyObject *args, P PyObject * _resultobj; bool _result; wxProgressDialog * _arg0; - int _arg1 = (int ) -1; - char * _arg2 = (char *) NULL; + int _arg1; + wxString * _arg2 = (wxString *) &wxPyEmptyString; PyObject * _argo0 = 0; + PyObject * _obj2 = 0; char *_kwnames[] = { "self","value","newmsg", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|is:wxProgressDialog_Update",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|O:wxProgressDialog_Update",_kwnames,&_argo0,&_arg1,&_obj2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2972,13 +3091,23 @@ static PyObject *_wrap_wxProgressDialog_Update(PyObject *self, PyObject *args, P return NULL; } } + if (_obj2) +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxProgressDialog_Update(_arg0,_arg1,_arg2); + _result = (bool )wxProgressDialog_Update(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj2) + delete _arg2; +} return _resultobj; } @@ -3116,7 +3245,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetFindString(PyObject *self, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3154,7 +3283,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetReplaceString(PyObject *self, PyObje if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3394,7 +3523,7 @@ static PyObject *_wrap_wxFindReplaceData_GetFindString(PyObject *self, PyObject if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3429,7 +3558,7 @@ static PyObject *_wrap_wxFindReplaceData_GetReplaceString(PyObject *self, PyObje if (PyErr_Occurred()) return NULL; }{ #if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -3883,21 +4012,20 @@ static PyMethodDef cmndlgscMethods[] = { { "new_wxMultiChoiceDialog", (PyCFunction) _wrap_new_wxMultiChoiceDialog, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetPaths", (PyCFunction) _wrap_wxFileDialog_GetPaths, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetFilenames", (PyCFunction) _wrap_wxFileDialog_GetFilenames, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_ShowModal", (PyCFunction) _wrap_wxFileDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetWildcard", (PyCFunction) _wrap_wxFileDialog_SetWildcard, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetStyle", (PyCFunction) _wrap_wxFileDialog_SetStyle, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetPath", (PyCFunction) _wrap_wxFileDialog_SetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetMessage", (PyCFunction) _wrap_wxFileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetFilterIndex", (PyCFunction) _wrap_wxFileDialog_SetFilterIndex, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetFilename", (PyCFunction) _wrap_wxFileDialog_SetFilename, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_SetDirectory", (PyCFunction) _wrap_wxFileDialog_SetDirectory, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetWildcard", (PyCFunction) _wrap_wxFileDialog_GetWildcard, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetStyle", (PyCFunction) _wrap_wxFileDialog_GetStyle, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetPath", (PyCFunction) _wrap_wxFileDialog_GetPath, METH_VARARGS | METH_KEYWORDS }, - { "wxFileDialog_GetMessage", (PyCFunction) _wrap_wxFileDialog_GetMessage, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetFilterIndex", (PyCFunction) _wrap_wxFileDialog_GetFilterIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetStyle", (PyCFunction) _wrap_wxFileDialog_GetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetWildcard", (PyCFunction) _wrap_wxFileDialog_GetWildcard, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetFilename", (PyCFunction) _wrap_wxFileDialog_GetFilename, METH_VARARGS | METH_KEYWORDS }, { "wxFileDialog_GetDirectory", (PyCFunction) _wrap_wxFileDialog_GetDirectory, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetPath", (PyCFunction) _wrap_wxFileDialog_GetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_GetMessage", (PyCFunction) _wrap_wxFileDialog_GetMessage, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetFilterIndex", (PyCFunction) _wrap_wxFileDialog_SetFilterIndex, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetStyle", (PyCFunction) _wrap_wxFileDialog_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetWildcard", (PyCFunction) _wrap_wxFileDialog_SetWildcard, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetFilename", (PyCFunction) _wrap_wxFileDialog_SetFilename, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetDirectory", (PyCFunction) _wrap_wxFileDialog_SetDirectory, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetPath", (PyCFunction) _wrap_wxFileDialog_SetPath, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDialog_SetMessage", (PyCFunction) _wrap_wxFileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileDialog", (PyCFunction) _wrap_new_wxFileDialog, METH_VARARGS | METH_KEYWORDS }, { "wxDirDialog_ShowModal", (PyCFunction) _wrap_wxDirDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, { "wxDirDialog_SetPath", (PyCFunction) _wrap_wxDirDialog_SetPath, METH_VARARGS | METH_KEYWORDS },