X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8bc7bb84dcca816055d5876e4772551c48acda5..cdc6a041296fb457ac693691c8ce62c99d3acb41:/wxPython/src/gtk/printfw.cpp?ds=inline diff --git a/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index e7b091c40e..c09e325013 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/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; @@ -295,6 +301,34 @@ static PyObject *_wrap_wxPrintData_GetOrientation(PyObject *self, PyObject *args 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; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPrintData_GetPrinterName(_swigobj) (_swigobj->GetPrinterName()) static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1536,55 +1570,6 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define new_wxPostScriptDC2(_swigarg0,_swigarg1,_swigarg2) (new wxPostScriptDC(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_new_wxPostScriptDC2(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxPostScriptDC * _result; - wxString * _arg0; - bool _arg1 = (bool ) TRUE; - wxWindow * _arg2 = (wxWindow *) NULL; - PyObject * _obj0 = 0; - int tempbool1 = (int) TRUE; - PyObject * _argo2 = 0; - char *_kwnames[] = { "output","interactive","parent", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iO:new_wxPostScriptDC2",_kwnames,&_obj0,&tempbool1,&_argo2)) - return NULL; -{ - _arg0 = wxString_in_helper(_obj0); - if (_arg0 == NULL) - return NULL; -} - _arg1 = (bool ) tempbool1; - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxPostScriptDC2. Expected _wxWindow_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPostScriptDC *)new_wxPostScriptDC2(*_arg0,_arg1,_arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPostScriptDC_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj0) - delete _arg0; -} - return _resultobj; -} - #define wxPostScriptDC_GetPrintData(_swigobj) (_swigobj->GetPrintData()) static PyObject *_wrap_wxPostScriptDC_GetPrintData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2323,6 +2308,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; @@ -3226,6 +3239,34 @@ static PyObject *_wrap_wxPrintDialogData_GetToPage(PyObject *self, PyObject *arg 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; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxPrintDialogData_SetCollate(_swigobj,_swigarg0) (_swigobj->SetCollate(_swigarg0)) static PyObject *_wrap_wxPrintDialogData_SetCollate(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3689,16 +3730,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; @@ -3709,6 +3757,10 @@ static PyObject *_wrap_new_wxPrintout(PyObject *self, PyObject *args, PyObject * Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj0) + delete _arg0; +} return _resultobj; } @@ -4508,14 +4560,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; } @@ -4538,14 +4591,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; } @@ -5185,7 +5247,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; @@ -5193,11 +5255,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; } @@ -5229,10 +5292,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; @@ -5246,6 +5315,10 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -5335,6 +5408,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 }, @@ -5362,6 +5436,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 }, @@ -5387,7 +5462,6 @@ static PyMethodDef printfwcMethods[] = { { "wxPostScriptDC_SetResolution", (PyCFunction) _wrap_wxPostScriptDC_SetResolution, METH_VARARGS | METH_KEYWORDS }, { "wxPostScriptDC_SetPrintData", (PyCFunction) _wrap_wxPostScriptDC_SetPrintData, METH_VARARGS | METH_KEYWORDS }, { "wxPostScriptDC_GetPrintData", (PyCFunction) _wrap_wxPostScriptDC_GetPrintData, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPostScriptDC2", (PyCFunction) _wrap_new_wxPostScriptDC2, METH_VARARGS | METH_KEYWORDS }, { "new_wxPostScriptDC", (PyCFunction) _wrap_new_wxPostScriptDC, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPrintMode", (PyCFunction) _wrap_wxPrintData_SetPrintMode, METH_VARARGS | METH_KEYWORDS }, { "wxPrintData_SetPrinterTranslation", (PyCFunction) _wrap_wxPrintData_SetPrinterTranslation, METH_VARARGS | METH_KEYWORDS }, @@ -5426,6 +5500,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 },