X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6824d4f9e0f6e7d97124a47ab2d75a551ed209ac..c81fd4b937cedd7c53715996200b9126e2756cbc:/wxPython/src/mac/printfw.cpp diff --git a/wxPython/src/mac/printfw.cpp b/wxPython/src/mac/printfw.cpp index 2b67ddf8b7..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; @@ -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; @@ -2323,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; @@ -3226,6 +3288,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 +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; @@ -3709,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; } @@ -4508,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; } @@ -4538,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; } @@ -5185,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; @@ -5193,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; } @@ -5229,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; @@ -5246,6 +5364,10 @@ static PyObject *_wrap_new_wxPreviewFrame(PyObject *self, PyObject *args, PyObje { if (_obj2) delete _arg2; +} +{ + if (_obj6) + delete _arg6; } return _resultobj; } @@ -5335,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 }, @@ -5362,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 }, @@ -5426,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 },