X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e2ff151afc472efd2814c74add5ad4498709d33..c81fd4b937cedd7c53715996200b9126e2756cbc:/wxPython/src/mac/printfw.cpp diff --git a/wxPython/src/mac/printfw.cpp b/wxPython/src/mac/printfw.cpp index 141291b36d..3b22b669b2 100644 --- a/wxPython/src/mac/printfw.cpp +++ b/wxPython/src/mac/printfw.cpp @@ -62,6 +62,12 @@ extern PyObject *SWIG_newvarlink(void); #include "printfw.h" + // Put some wx default wxChar* values into wxStrings. + static const wxChar* wxPrintoutTitleStr = wxT("Printout"); + DECLARE_DEF_STRING(PrintoutTitleStr); + + DECLARE_DEF_STRING(FrameNameStr); + static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -89,12 +95,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 - // Since this one would be tough and ugly to do with the Macros... @@ -175,7 +175,7 @@ static PyObject *_wrap_new_wxPrintData(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)new_wxPrintData(); + _result = (wxPrintData *)new_wxPrintData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -208,7 +208,7 @@ static PyObject *_wrap_delete_wxPrintData(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrintData(_arg0); + delete_wxPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -237,7 +237,7 @@ static PyObject *_wrap_wxPrintData_GetNoCopies(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintData_GetNoCopies(_arg0); + _result = (int )wxPrintData_GetNoCopies(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -265,7 +265,7 @@ static PyObject *_wrap_wxPrintData_GetCollate(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintData_GetCollate(_arg0); + _result = (bool )wxPrintData_GetCollate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -293,7 +293,35 @@ static PyObject *_wrap_wxPrintData_GetOrientation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintData_GetOrientation(_arg0); + _result = (int )wxPrintData_GetOrientation(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPrintData_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxPrintData_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPrintData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintData_Ok",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintData_Ok. Expected _wxPrintData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPrintData_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -321,13 +349,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterName(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterName(_arg0); _result = (wxString *) &_result_ref; 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 } return _resultobj; } @@ -352,7 +384,7 @@ static PyObject *_wrap_wxPrintData_GetColour(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintData_GetColour(_arg0); + _result = (bool )wxPrintData_GetColour(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -380,7 +412,7 @@ static PyObject *_wrap_wxPrintData_GetDuplex(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDuplexMode )wxPrintData_GetDuplex(_arg0); + _result = (wxDuplexMode )wxPrintData_GetDuplex(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -408,7 +440,7 @@ static PyObject *_wrap_wxPrintData_GetPaperId(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaperSize )wxPrintData_GetPaperId(_arg0); + _result = (wxPaperSize )wxPrintData_GetPaperId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -437,7 +469,7 @@ static PyObject *_wrap_wxPrintData_GetPaperSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxSize & _result_ref = wxPrintData_GetPaperSize(_arg0); + const wxSize & _result_ref = wxPrintData_GetPaperSize(_arg0); _result = (wxSize *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -472,7 +504,7 @@ static PyObject *_wrap_wxPrintData_GetQuality(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintQuality )wxPrintData_GetQuality(_arg0); + _result = (wxPrintQuality )wxPrintData_GetQuality(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -500,7 +532,7 @@ static PyObject *_wrap_wxPrintData_SetNoCopies(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetNoCopies(_arg0,_arg1); + wxPrintData_SetNoCopies(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -531,7 +563,7 @@ static PyObject *_wrap_wxPrintData_SetCollate(PyObject *self, PyObject *args, Py _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetCollate(_arg0,_arg1); + wxPrintData_SetCollate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -560,7 +592,7 @@ static PyObject *_wrap_wxPrintData_SetOrientation(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetOrientation(_arg0,_arg1); + wxPrintData_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -589,26 +621,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterName(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(); - wxPrintData_SetPrinterName(_arg0,*_arg1); + wxPrintData_SetPrinterName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -643,7 +662,7 @@ static PyObject *_wrap_wxPrintData_SetColour(PyObject *self, PyObject *args, PyO _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetColour(_arg0,_arg1); + wxPrintData_SetColour(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -672,7 +691,7 @@ static PyObject *_wrap_wxPrintData_SetDuplex(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetDuplex(_arg0,_arg1); + wxPrintData_SetDuplex(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -701,7 +720,7 @@ static PyObject *_wrap_wxPrintData_SetPaperId(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPaperId(_arg0,_arg1); + wxPrintData_SetPaperId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -737,7 +756,7 @@ static PyObject *_wrap_wxPrintData_SetPaperSize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPaperSize(_arg0,*_arg1); + wxPrintData_SetPaperSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -766,7 +785,7 @@ static PyObject *_wrap_wxPrintData_SetQuality(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetQuality(_arg0,_arg1); + wxPrintData_SetQuality(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -795,13 +814,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterCommand(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterCommand(_arg0); _result = (wxString *) &_result_ref; 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 } return _resultobj; } @@ -826,13 +849,17 @@ static PyObject *_wrap_wxPrintData_GetPrinterOptions(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPrinterOptions(_arg0); + const wxString & _result_ref = wxPrintData_GetPrinterOptions(_arg0); _result = (wxString *) &_result_ref; 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 } return _resultobj; } @@ -857,13 +884,17 @@ static PyObject *_wrap_wxPrintData_GetPreviewCommand(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetPreviewCommand(_arg0); + const wxString & _result_ref = wxPrintData_GetPreviewCommand(_arg0); _result = (wxString *) &_result_ref; 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 } return _resultobj; } @@ -888,13 +919,17 @@ static PyObject *_wrap_wxPrintData_GetFilename(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetFilename(_arg0); + const wxString & _result_ref = wxPrintData_GetFilename(_arg0); _result = (wxString *) &_result_ref; 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 } return _resultobj; } @@ -919,13 +954,17 @@ static PyObject *_wrap_wxPrintData_GetFontMetricPath(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - const wxString & _result_ref = wxPrintData_GetFontMetricPath(_arg0); + const wxString & _result_ref = wxPrintData_GetFontMetricPath(_arg0); _result = (wxString *) &_result_ref; 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 } return _resultobj; } @@ -950,7 +989,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterScaleX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPrintData_GetPrinterScaleX(_arg0); + _result = (double )wxPrintData_GetPrinterScaleX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -978,7 +1017,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterScaleY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (double )wxPrintData_GetPrinterScaleY(_arg0); + _result = (double )wxPrintData_GetPrinterScaleY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1006,7 +1045,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterTranslateX(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPrintData_GetPrinterTranslateX(_arg0); + _result = (long )wxPrintData_GetPrinterTranslateX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1034,7 +1073,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterTranslateY(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxPrintData_GetPrinterTranslateY(_arg0); + _result = (long )wxPrintData_GetPrinterTranslateY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1063,7 +1102,7 @@ static PyObject *_wrap_wxPrintData_GetPrintMode(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPrintMode (wxPrintData_GetPrintMode(_arg0)); + _result = new wxPrintMode (wxPrintData_GetPrintMode(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1092,26 +1131,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterCommand(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(); - wxPrintData_SetPrinterCommand(_arg0,*_arg1); + wxPrintData_SetPrinterCommand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1144,26 +1170,13 @@ static PyObject *_wrap_wxPrintData_SetPrinterOptions(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) + _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(); - wxPrintData_SetPrinterOptions(_arg0,*_arg1); + wxPrintData_SetPrinterOptions(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1196,26 +1209,13 @@ static PyObject *_wrap_wxPrintData_SetPreviewCommand(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(); - wxPrintData_SetPreviewCommand(_arg0,*_arg1); + wxPrintData_SetPreviewCommand(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1248,26 +1248,13 @@ static PyObject *_wrap_wxPrintData_SetFilename(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); + _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(); - wxPrintData_SetFilename(_arg0,*_arg1); + wxPrintData_SetFilename(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1300,26 +1287,13 @@ static PyObject *_wrap_wxPrintData_SetFontMetricPath(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(); - wxPrintData_SetFontMetricPath(_arg0,*_arg1); + wxPrintData_SetFontMetricPath(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1352,7 +1326,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaleX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaleX(_arg0,_arg1); + wxPrintData_SetPrinterScaleX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1381,7 +1355,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaleY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaleY(_arg0,_arg1); + wxPrintData_SetPrinterScaleY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1411,7 +1385,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterScaling(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterScaling(_arg0,_arg1,_arg2); + wxPrintData_SetPrinterScaling(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1440,7 +1414,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslateX(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslateX(_arg0,_arg1); + wxPrintData_SetPrinterTranslateX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1469,7 +1443,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslateY(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslateY(_arg0,_arg1); + wxPrintData_SetPrinterTranslateY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1499,7 +1473,7 @@ static PyObject *_wrap_wxPrintData_SetPrinterTranslation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrinterTranslation(_arg0,_arg1,_arg2); + wxPrintData_SetPrinterTranslation(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1536,7 +1510,7 @@ static PyObject *_wrap_wxPrintData_SetPrintMode(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData_SetPrintMode(_arg0,*_arg1); + wxPrintData_SetPrintMode(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1582,7 +1556,7 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); + _result = (wxPostScriptDC *)new_wxPostScriptDC(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1613,22 +1587,9 @@ static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObj if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC2",_kwnames,&_obj0,&tempbool1,&_argo2)) return NULL; { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) return NULL; - _arg0 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0)); -#endif } _arg1 = (bool ) tempbool1; if (_argo2) { @@ -1640,7 +1601,7 @@ static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); + _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1679,7 +1640,7 @@ static PyObject *_wrap_wxPostScriptDC_GetPrintData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); + wxPrintData & _result_ref = wxPostScriptDC_GetPrintData(_arg0); _result = (wxPrintData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -1722,7 +1683,7 @@ static PyObject *_wrap_wxPostScriptDC_SetPrintData(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostScriptDC_SetPrintData(_arg0,*_arg1); + wxPostScriptDC_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1741,7 +1702,7 @@ static PyObject *_wrap_wxPostScriptDC_SetResolution(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPostScriptDC::SetResolution(_arg0); + wxPostScriptDC::SetResolution(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1760,7 +1721,7 @@ static PyObject *_wrap_wxPostScriptDC_GetResolution(PyObject *self, PyObject *ar return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPostScriptDC::GetResolution(); + _result = (int )wxPostScriptDC::GetResolution(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1788,7 +1749,7 @@ static PyObject *_wrap_new_wxPageSetupDialogData(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialogData *)new_wxPageSetupDialogData(); + _result = (wxPageSetupDialogData *)new_wxPageSetupDialogData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1821,7 +1782,7 @@ static PyObject *_wrap_delete_wxPageSetupDialogData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPageSetupDialogData(_arg0); + delete_wxPageSetupDialogData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1852,7 +1813,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableHelp(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableHelp(_arg0,_arg1); + wxPageSetupDialogData_EnableHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1883,7 +1844,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableMargins(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableMargins(_arg0,_arg1); + wxPageSetupDialogData_EnableMargins(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1914,7 +1875,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnableOrientation(PyObject *self, P _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnableOrientation(_arg0,_arg1); + wxPageSetupDialogData_EnableOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1945,7 +1906,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnablePaper(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnablePaper(_arg0,_arg1); + wxPageSetupDialogData_EnablePaper(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1976,7 +1937,7 @@ static PyObject *_wrap_wxPageSetupDialogData_EnablePrinter(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_EnablePrinter(_arg0,_arg1); + wxPageSetupDialogData_EnablePrinter(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2005,7 +1966,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetDefaultMinMargins(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetDefaultMinMargins(_arg0); + _result = (bool )wxPageSetupDialogData_GetDefaultMinMargins(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2033,7 +1994,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableMargins(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableMargins(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableMargins(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2061,7 +2022,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableOrientation(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableOrientation(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2089,7 +2050,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnablePaper(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnablePaper(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnablePaper(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2117,7 +2078,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnablePrinter(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnablePrinter(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnablePrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2145,7 +2106,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetEnableHelp(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetEnableHelp(_arg0); + _result = (bool )wxPageSetupDialogData_GetEnableHelp(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2173,7 +2134,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetDefaultInfo(PyObject *self, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPageSetupDialogData_GetDefaultInfo(_arg0); + _result = (bool )wxPageSetupDialogData_GetDefaultInfo(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2202,7 +2163,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMarginTopLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMarginTopLeft(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMarginTopLeft(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2232,7 +2193,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMarginBottomRight(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMarginBottomRight(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMarginBottomRight(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2262,7 +2223,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMinMarginTopLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMinMarginTopLeft(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMinMarginTopLeft(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2292,7 +2253,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetMinMarginBottomRight(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPageSetupDialogData_GetMinMarginBottomRight(_arg0)); + _result = new wxPoint (wxPageSetupDialogData_GetMinMarginBottomRight(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2321,7 +2282,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPaperId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPaperSize )wxPageSetupDialogData_GetPaperId(_arg0); + _result = (wxPaperSize )wxPageSetupDialogData_GetPaperId(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2350,7 +2311,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPaperSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxPageSetupDialogData_GetPaperSize(_arg0)); + _result = new wxSize (wxPageSetupDialogData_GetPaperSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2382,7 +2343,7 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPrintData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxPageSetupDialogData_GetPrintData(_arg0); + _result = (wxPrintData *)wxPageSetupDialogData_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2396,6 +2357,34 @@ static PyObject *_wrap_wxPageSetupDialogData_GetPrintData(PyObject *self, PyObje return _resultobj; } +#define wxPageSetupDialogData_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxPageSetupDialogData_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPageSetupDialogData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPageSetupDialogData_Ok",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPageSetupDialogData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPageSetupDialogData_Ok. Expected _wxPageSetupDialogData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPageSetupDialogData_Ok(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPageSetupDialogData_SetDefaultInfo(_swigobj,_swigarg0) (_swigobj->SetDefaultInfo(_swigarg0)) static PyObject *_wrap_wxPageSetupDialogData_SetDefaultInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2418,7 +2407,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetDefaultInfo(PyObject *self, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetDefaultInfo(_arg0,_arg1); + wxPageSetupDialogData_SetDefaultInfo(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2449,7 +2438,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetDefaultMinMargins(PyObject *self _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetDefaultMinMargins(_arg0,_arg1); + wxPageSetupDialogData_SetDefaultMinMargins(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2485,7 +2474,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMarginTopLeft(PyObject *self, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMarginTopLeft(_arg0,*_arg1); + wxPageSetupDialogData_SetMarginTopLeft(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2521,7 +2510,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMarginBottomRight(PyObject *self } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMarginBottomRight(_arg0,*_arg1); + wxPageSetupDialogData_SetMarginBottomRight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2557,7 +2546,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginTopLeft(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMinMarginTopLeft(_arg0,*_arg1); + wxPageSetupDialogData_SetMinMarginTopLeft(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2593,7 +2582,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetMinMarginBottomRight(_arg0,*_arg1); + wxPageSetupDialogData_SetMinMarginBottomRight(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2622,7 +2611,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPaperId(_arg0,_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2658,7 +2647,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperSize(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPaperSize(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2695,7 +2684,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPrintData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData_SetPrintData(_arg0,*_arg1); + wxPageSetupDialogData_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2774,7 +2763,7 @@ static PyObject *_wrap_new_wxPageSetupDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); + _result = (wxPageSetupDialog *)new_wxPageSetupDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2809,7 +2798,7 @@ static PyObject *_wrap_wxPageSetupDialog_GetPageSetupData(PyObject *self, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPageSetupDialogData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); + wxPageSetupDialogData & _result_ref = wxPageSetupDialog_GetPageSetupData(_arg0); _result = (wxPageSetupDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -2844,7 +2833,7 @@ static PyObject *_wrap_wxPageSetupDialog_ShowModal(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPageSetupDialog_ShowModal(_arg0); + _result = (int )wxPageSetupDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2872,7 +2861,7 @@ static PyObject *_wrap_new_wxPrintDialogData(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintDialogData *)new_wxPrintDialogData(); + _result = (wxPrintDialogData *)new_wxPrintDialogData(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2905,7 +2894,7 @@ static PyObject *_wrap_delete_wxPrintDialogData(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrintDialogData(_arg0); + delete_wxPrintDialogData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2936,7 +2925,7 @@ static PyObject *_wrap_wxPrintDialogData_EnableHelp(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnableHelp(_arg0,_arg1); + wxPrintDialogData_EnableHelp(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2967,7 +2956,7 @@ static PyObject *_wrap_wxPrintDialogData_EnablePageNumbers(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnablePageNumbers(_arg0,_arg1); + wxPrintDialogData_EnablePageNumbers(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2998,7 +2987,7 @@ static PyObject *_wrap_wxPrintDialogData_EnablePrintToFile(PyObject *self, PyObj _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnablePrintToFile(_arg0,_arg1); + wxPrintDialogData_EnablePrintToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3029,7 +3018,7 @@ static PyObject *_wrap_wxPrintDialogData_EnableSelection(PyObject *self, PyObjec _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_EnableSelection(_arg0,_arg1); + wxPrintDialogData_EnableSelection(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3058,7 +3047,7 @@ static PyObject *_wrap_wxPrintDialogData_GetAllPages(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetAllPages(_arg0); + _result = (bool )wxPrintDialogData_GetAllPages(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3086,7 +3075,7 @@ static PyObject *_wrap_wxPrintDialogData_GetCollate(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetCollate(_arg0); + _result = (bool )wxPrintDialogData_GetCollate(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3114,7 +3103,7 @@ static PyObject *_wrap_wxPrintDialogData_GetFromPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetFromPage(_arg0); + _result = (int )wxPrintDialogData_GetFromPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3142,7 +3131,7 @@ static PyObject *_wrap_wxPrintDialogData_GetMaxPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetMaxPage(_arg0); + _result = (int )wxPrintDialogData_GetMaxPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3170,7 +3159,7 @@ static PyObject *_wrap_wxPrintDialogData_GetMinPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetMinPage(_arg0); + _result = (int )wxPrintDialogData_GetMinPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3198,7 +3187,7 @@ static PyObject *_wrap_wxPrintDialogData_GetNoCopies(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetNoCopies(_arg0); + _result = (int )wxPrintDialogData_GetNoCopies(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3229,7 +3218,7 @@ static PyObject *_wrap_wxPrintDialogData_GetPrintData(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintData *)wxPrintDialogData_GetPrintData(_arg0); + _result = (wxPrintData *)wxPrintDialogData_GetPrintData(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3263,7 +3252,7 @@ static PyObject *_wrap_wxPrintDialogData_GetPrintToFile(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintDialogData_GetPrintToFile(_arg0); + _result = (bool )wxPrintDialogData_GetPrintToFile(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3291,7 +3280,35 @@ static PyObject *_wrap_wxPrintDialogData_GetToPage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialogData_GetToPage(_arg0); + _result = (int )wxPrintDialogData_GetToPage(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPrintDialogData_Ok(_swigobj) (_swigobj->Ok()) +static PyObject *_wrap_wxPrintDialogData_Ok(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPrintDialogData * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPrintDialogData_Ok",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintDialogData_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPrintDialogData_Ok. Expected _wxPrintDialogData_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPrintDialogData_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3321,7 +3338,7 @@ static PyObject *_wrap_wxPrintDialogData_SetCollate(PyObject *self, PyObject *ar _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetCollate(_arg0,_arg1); + wxPrintDialogData_SetCollate(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3350,7 +3367,7 @@ static PyObject *_wrap_wxPrintDialogData_SetFromPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetFromPage(_arg0,_arg1); + wxPrintDialogData_SetFromPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3379,7 +3396,7 @@ static PyObject *_wrap_wxPrintDialogData_SetMaxPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetMaxPage(_arg0,_arg1); + wxPrintDialogData_SetMaxPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3408,7 +3425,7 @@ static PyObject *_wrap_wxPrintDialogData_SetMinPage(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetMinPage(_arg0,_arg1); + wxPrintDialogData_SetMinPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3437,7 +3454,7 @@ static PyObject *_wrap_wxPrintDialogData_SetNoCopies(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetNoCopies(_arg0,_arg1); + wxPrintDialogData_SetNoCopies(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3474,7 +3491,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintData(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetPrintData(_arg0,*_arg1); + wxPrintDialogData_SetPrintData(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3505,7 +3522,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintToFile(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetPrintToFile(_arg0,_arg1); + wxPrintDialogData_SetPrintToFile(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3536,7 +3553,7 @@ static PyObject *_wrap_wxPrintDialogData_SetSetupDialog(PyObject *self, PyObject _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetSetupDialog(_arg0,_arg1); + wxPrintDialogData_SetSetupDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3565,7 +3582,7 @@ static PyObject *_wrap_wxPrintDialogData_SetToPage(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData_SetToPage(_arg0,_arg1); + wxPrintDialogData_SetToPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3644,7 +3661,7 @@ static PyObject *_wrap_new_wxPrintDialog(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); + _result = (wxPrintDialog *)new_wxPrintDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3679,7 +3696,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDialogData(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrintDialog_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrintDialog_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3714,7 +3731,7 @@ static PyObject *_wrap_wxPrintDialog_GetPrintDC(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); + _result = (wxDC *)wxPrintDialog_GetPrintDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3742,7 +3759,7 @@ static PyObject *_wrap_wxPrintDialog_ShowModal(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintDialog_ShowModal(_arg0); + _result = (int )wxPrintDialog_ShowModal(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3762,16 +3779,23 @@ static void *SwigwxPyPrintoutTowxObject(void *ptr) { static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyPrintout * _result; - char * _arg0 = (char *) "Printout"; + wxString * _arg0 = (wxString *) &wxPyPrintoutTitleStr; + PyObject * _obj0 = 0; char *_kwnames[] = { "title", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:new_wxPrintout",_kwnames,&_arg0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPrintout",_kwnames,&_obj0)) return NULL; + if (_obj0) +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)new_wxPrintout(_arg0); + _result = (wxPyPrintout *)new_wxPrintout(*_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3782,6 +3806,10 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj0) + delete _arg0; +} return _resultobj; } @@ -3814,7 +3842,7 @@ static PyObject *_wrap_wxPrintout__setCallbackInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); + wxPrintout__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3842,7 +3870,7 @@ static PyObject *_wrap_wxPrintout_Destroy(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyPrintout_Destroy(_arg0); + wxPyPrintout_Destroy(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3871,7 +3899,7 @@ static PyObject *_wrap_wxPrintout_GetDC(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrintout_GetDC(_arg0); + _result = (wxDC *)wxPrintout_GetDC(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3908,7 +3936,7 @@ static PyObject *_wrap_wxPrintout_GetPageSizeMM(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPageSizeMM(_arg0,_arg1,_arg2); + wxPrintout_GetPageSizeMM(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3956,7 +3984,7 @@ static PyObject *_wrap_wxPrintout_GetPageSizePixels(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPageSizePixels(_arg0,_arg1,_arg2); + wxPrintout_GetPageSizePixels(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4004,7 +4032,7 @@ static PyObject *_wrap_wxPrintout_GetPPIPrinter(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPPIPrinter(_arg0,_arg1,_arg2); + wxPrintout_GetPPIPrinter(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4052,7 +4080,7 @@ static PyObject *_wrap_wxPrintout_GetPPIScreen(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_GetPPIScreen(_arg0,_arg1,_arg2); + wxPrintout_GetPPIScreen(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4091,7 +4119,7 @@ static PyObject *_wrap_wxPrintout_IsPreview(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_IsPreview(_arg0); + _result = (bool )wxPrintout_IsPreview(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4121,7 +4149,7 @@ static PyObject *_wrap_wxPrintout_base_OnBeginDocument(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_base_OnBeginDocument(_arg0,_arg1,_arg2); + _result = (bool )wxPrintout_base_OnBeginDocument(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4148,7 +4176,7 @@ static PyObject *_wrap_wxPrintout_base_OnEndDocument(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnEndDocument(_arg0); + wxPrintout_base_OnEndDocument(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4176,7 +4204,7 @@ static PyObject *_wrap_wxPrintout_base_OnBeginPrinting(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnBeginPrinting(_arg0); + wxPrintout_base_OnBeginPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4204,7 +4232,7 @@ static PyObject *_wrap_wxPrintout_base_OnEndPrinting(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnEndPrinting(_arg0); + wxPrintout_base_OnEndPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4232,7 +4260,7 @@ static PyObject *_wrap_wxPrintout_base_OnPreparePrinting(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_OnPreparePrinting(_arg0); + wxPrintout_base_OnPreparePrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4280,7 +4308,7 @@ static PyObject *_wrap_wxPrintout_base_GetPageInfo(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintout_base_GetPageInfo(_arg0,_arg1,_arg2,_arg3,_arg4); + wxPrintout_base_GetPageInfo(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4330,7 +4358,7 @@ static PyObject *_wrap_wxPrintout_base_HasPage(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintout_base_HasPage(_arg0,_arg1); + _result = (bool )wxPrintout_base_HasPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4367,7 +4395,7 @@ static PyObject *_wrap_new_wxPrinter(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrinter *)new_wxPrinter(_arg0); + _result = (wxPrinter *)new_wxPrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4400,7 +4428,7 @@ static PyObject *_wrap_delete_wxPrinter(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxPrinter(_arg0); + delete_wxPrinter(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4446,7 +4474,7 @@ static PyObject *_wrap_wxPrinter_CreateAbortWindow(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrinter_CreateAbortWindow(_arg0,_arg1,_arg2); + wxPrinter_CreateAbortWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4476,7 +4504,7 @@ static PyObject *_wrap_wxPrinter_GetPrintDialogData(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrinter_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrinter_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4530,7 +4558,7 @@ static PyObject *_wrap_wxPrinter_Print(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrinter_Print(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxPrinter_Print(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4567,7 +4595,7 @@ static PyObject *_wrap_wxPrinter_PrintDialog(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); + _result = (wxDC *)wxPrinter_PrintDialog(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4581,14 +4609,15 @@ static PyObject *_wrap_wxPrinter_ReportError(PyObject *self, PyObject *args, PyO wxPrinter * _arg0; wxWindow * _arg1; wxPyPrintout * _arg2; - char * _arg3; + wxString * _arg3; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _argo2 = 0; + PyObject * _obj3 = 0; char *_kwnames[] = { "self","parent","printout","message", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOs:wxPrinter_ReportError",_kwnames,&_argo0,&_argo1,&_argo2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxPrinter_ReportError",_kwnames,&_argo0,&_argo1,&_argo2,&_obj3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4611,14 +4640,23 @@ static PyObject *_wrap_wxPrinter_ReportError(PyObject *self, PyObject *args, PyO return NULL; } } +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrinter_ReportError(_arg0,_arg1,_arg2,_arg3); + wxPrinter_ReportError(_arg0,_arg1,_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj3) + delete _arg3; +} return _resultobj; } @@ -4651,7 +4689,7 @@ static PyObject *_wrap_wxPrinter_Setup(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrinter_Setup(_arg0,_arg1); + _result = (bool )wxPrinter_Setup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4706,7 +4744,7 @@ static PyObject *_wrap_new_wxPrintPreview(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPrintPreview *)new_wxPrintPreview(_arg0,_arg1,_arg2); + _result = (wxPrintPreview *)new_wxPrintPreview(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4740,7 +4778,7 @@ static PyObject *_wrap_wxPrintPreview_GetCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); + _result = (wxWindow *)wxPrintPreview_GetCanvas(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4768,7 +4806,7 @@ static PyObject *_wrap_wxPrintPreview_GetCurrentPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetCurrentPage(_arg0); + _result = (int )wxPrintPreview_GetCurrentPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4796,7 +4834,7 @@ static PyObject *_wrap_wxPrintPreview_GetFrame(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); + _result = (wxFrame *)wxPrintPreview_GetFrame(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4824,7 +4862,7 @@ static PyObject *_wrap_wxPrintPreview_GetMaxPage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetMaxPage(_arg0); + _result = (int )wxPrintPreview_GetMaxPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4852,7 +4890,7 @@ static PyObject *_wrap_wxPrintPreview_GetMinPage(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetMinPage(_arg0); + _result = (int )wxPrintPreview_GetMinPage(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4881,7 +4919,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintDialogData(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintDialogData & _result_ref = wxPrintPreview_GetPrintDialogData(_arg0); + wxPrintDialogData & _result_ref = wxPrintPreview_GetPrintDialogData(_arg0); _result = (wxPrintDialogData *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -4916,7 +4954,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintout(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); + _result = (wxPyPrintout *)wxPrintPreview_GetPrintout(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4944,7 +4982,7 @@ static PyObject *_wrap_wxPrintPreview_GetPrintoutForPrinting(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); + _result = (wxPyPrintout *)wxPrintPreview_GetPrintoutForPrinting(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4972,7 +5010,7 @@ static PyObject *_wrap_wxPrintPreview_GetZoom(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPrintPreview_GetZoom(_arg0); + _result = (int )wxPrintPreview_GetZoom(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5000,7 +5038,7 @@ static PyObject *_wrap_wxPrintPreview_Ok(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintPreview_Ok(_arg0); + _result = (bool )wxPrintPreview_Ok(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5031,7 +5069,7 @@ static PyObject *_wrap_wxPrintPreview_Print(PyObject *self, PyObject *args, PyOb _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPrintPreview_Print(_arg0,_arg1); + _result = (bool )wxPrintPreview_Print(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5067,7 +5105,7 @@ static PyObject *_wrap_wxPrintPreview_SetCanvas(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetCanvas(_arg0,_arg1); + wxPrintPreview_SetCanvas(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5096,7 +5134,7 @@ static PyObject *_wrap_wxPrintPreview_SetCurrentPage(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetCurrentPage(_arg0,_arg1); + wxPrintPreview_SetCurrentPage(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5133,7 +5171,7 @@ static PyObject *_wrap_wxPrintPreview_SetFrame(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetFrame(_arg0,_arg1); + wxPrintPreview_SetFrame(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5170,7 +5208,7 @@ static PyObject *_wrap_wxPrintPreview_SetPrintout(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetPrintout(_arg0,_arg1); + wxPrintPreview_SetPrintout(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5199,7 +5237,7 @@ static PyObject *_wrap_wxPrintPreview_SetZoom(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPrintPreview_SetZoom(_arg0,_arg1); + wxPrintPreview_SetZoom(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5258,7 +5296,7 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; - char * _arg6 = (char *) "frame"; + wxString * _arg6 = (wxString *) &wxPyFrameNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj2 = 0; @@ -5266,11 +5304,12 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "preview","parent","title","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|OOls:new_wxPreviewFrame",_kwnames,&_argo0,&_argo1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|OOlO:new_wxPreviewFrame",_kwnames,&_argo0,&_argo1,&_obj2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5287,22 +5326,9 @@ static PyObject *_wrap_new_wxPreviewFrame(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) { @@ -5315,10 +5341,16 @@ static PyObject *_wrap_new_wxPreviewFrame(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 = (wxPreviewFrame *)new_wxPreviewFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxPreviewFrame *)new_wxPreviewFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5332,6 +5364,10 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -5355,7 +5391,7 @@ static PyObject *_wrap_wxPreviewFrame_Initialize(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPreviewFrame_Initialize(_arg0); + wxPreviewFrame_Initialize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5421,6 +5457,7 @@ static PyMethodDef printfwcMethods[] = { { "wxPrintDialogData_SetMaxPage", (PyCFunction) _wrap_wxPrintDialogData_SetMaxPage, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialogData_SetFromPage", (PyCFunction) _wrap_wxPrintDialogData_SetFromPage, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialogData_SetCollate", (PyCFunction) _wrap_wxPrintDialogData_SetCollate, METH_VARARGS | METH_KEYWORDS }, + { "wxPrintDialogData_Ok", (PyCFunction) _wrap_wxPrintDialogData_Ok, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialogData_GetToPage", (PyCFunction) _wrap_wxPrintDialogData_GetToPage, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialogData_GetPrintToFile", (PyCFunction) _wrap_wxPrintDialogData_GetPrintToFile, METH_VARARGS | METH_KEYWORDS }, { "wxPrintDialogData_GetPrintData", (PyCFunction) _wrap_wxPrintDialogData_GetPrintData, METH_VARARGS | METH_KEYWORDS }, @@ -5448,6 +5485,7 @@ static PyMethodDef printfwcMethods[] = { { "wxPageSetupDialogData_SetMarginTopLeft", (PyCFunction) _wrap_wxPageSetupDialogData_SetMarginTopLeft, METH_VARARGS | METH_KEYWORDS }, { "wxPageSetupDialogData_SetDefaultMinMargins", (PyCFunction) _wrap_wxPageSetupDialogData_SetDefaultMinMargins, METH_VARARGS | METH_KEYWORDS }, { "wxPageSetupDialogData_SetDefaultInfo", (PyCFunction) _wrap_wxPageSetupDialogData_SetDefaultInfo, METH_VARARGS | METH_KEYWORDS }, + { "wxPageSetupDialogData_Ok", (PyCFunction) _wrap_wxPageSetupDialogData_Ok, METH_VARARGS | METH_KEYWORDS }, { "wxPageSetupDialogData_GetPrintData", (PyCFunction) _wrap_wxPageSetupDialogData_GetPrintData, METH_VARARGS | METH_KEYWORDS }, { "wxPageSetupDialogData_GetPaperSize", (PyCFunction) _wrap_wxPageSetupDialogData_GetPaperSize, METH_VARARGS | METH_KEYWORDS }, { "wxPageSetupDialogData_GetPaperId", (PyCFunction) _wrap_wxPageSetupDialogData_GetPaperId, METH_VARARGS | METH_KEYWORDS }, @@ -5512,6 +5550,7 @@ static PyMethodDef printfwcMethods[] = { { "wxPrintData_GetDuplex", (PyCFunction) _wrap_wxPrintData_GetDuplex, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_GetColour", (PyCFunction) _wrap_wxPrintData_GetColour, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_GetPrinterName", (PyCFunction) _wrap_wxPrintData_GetPrinterName, METH_VARARGS | METH_KEYWORDS }, + { "wxPrintData_Ok", (PyCFunction) _wrap_wxPrintData_Ok, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_GetOrientation", (PyCFunction) _wrap_wxPrintData_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_GetCollate", (PyCFunction) _wrap_wxPrintData_GetCollate, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_GetNoCopies", (PyCFunction) _wrap_wxPrintData_GetNoCopies, METH_VARARGS | METH_KEYWORDS },