X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19a97bd6f98edc899ee0c3b2f2c4fe4ee8a0082b..f9ee64b1356530b7f5c957d250d2a1dcbef60f60:/wxPython/src/printfw.i diff --git a/wxPython/src/printfw.i b/wxPython/src/printfw.i index 4ab596d72e..bd02f63860 100644 --- a/wxPython/src/printfw.i +++ b/wxPython/src/printfw.i @@ -16,6 +16,7 @@ #include "helpers.h" #include #include +#include #include "printfw.h" %} @@ -112,6 +113,22 @@ public: //--------------------------------------------------------------------------- +class wxPostScriptDC : public wxDC { +public: + wxPostScriptDC(const wxPrintData& printData); + %name(wxPostScriptDC2)wxPostScriptDC(const wxString& output, + bool interactive = TRUE, + wxWindow* parent = NULL); + + wxPrintData& GetPrintData(); + void SetPrintData(const wxPrintData& data); + + static void SetResolution(int ppi); + static int GetResolution(); +}; + +//--------------------------------------------------------------------------- + class wxPageSetupDialogData : public wxObject { public: wxPageSetupDialogData(); @@ -221,7 +238,7 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p bool hadErr = FALSE; bool found; - wxPyTState* state = wxPyBeginBlockThreads(); + wxPyBeginBlockThreads(); if ((found = m_myInst.findCallback("GetPageInfo"))) { PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()")); if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) { @@ -252,7 +269,7 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p } Py_DECREF(result); } - wxPyEndBlockThreads(state); + wxPyEndBlockThreads(); if (! found) wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo); } @@ -279,8 +296,8 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage); public: wxPyPrintout(const char* title = "Printout"); - void _setSelf(PyObject* self, PyObject* _class); - %pragma(python) addtomethod = "__init__:self._setSelf(self, wxPrintout)" + void _setCallbackInfo(PyObject* self, PyObject* _class); + %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPrintout)" %addmethods { void Destroy() { delete self; } @@ -353,7 +370,7 @@ public: long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)" + %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" void Initialize();