X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d88d4683f3e85a5a9b63e8bd95686a42e7d1203a..a2a03d7864c96401b99b3fde43ae7cb5ace83814:/wxPython/src/_printfw.i diff --git a/wxPython/src/_printfw.i b/wxPython/src/_printfw.i index fd6a356b94..861fa83a8b 100644 --- a/wxPython/src/_printfw.i +++ b/wxPython/src/_printfw.i @@ -40,7 +40,10 @@ enum wxPrintMode class wxPrintData : public wxObject { public: + %nokwargs wxPrintData; wxPrintData(); + wxPrintData(const wxPrintData& data); // for making copies + ~wxPrintData(); int GetNoCopies(); @@ -103,7 +106,9 @@ public: class wxPageSetupDialogData : public wxObject { public: + %nokwargs wxPageSetupDialogData; wxPageSetupDialogData(); + wxPageSetupDialogData(const wxPageSetupDialogData& data); // for making copies ~wxPageSetupDialogData(); void EnableHelp(bool flag); @@ -149,6 +154,8 @@ public: +MustHaveApp(wxPageSetupDialog); + class wxPageSetupDialog : public wxDialog { public: %pythonAppend wxPageSetupDialog "self._setOORInfo(self)" @@ -166,7 +173,7 @@ class wxPrintDialogData : public wxObject { public: %nokwargs wxPrintDialogData; wxPrintDialogData(); - wxPrintDialogData(const wxPrintData& printData); + wxPrintDialogData(const wxPrintData& printData); // for making copies ~wxPrintDialogData(); int GetFromPage() const; @@ -217,6 +224,8 @@ public: }; +MustHaveApp(wxPrintDialog); + class wxPrintDialog : public wxDialog { public: %pythonAppend wxPrintDialog "self._setOORInfo(self)" @@ -243,6 +252,8 @@ enum wxPrinterError }; +MustHaveApp(wxPrinter); + class wxPrinter : public wxObject { public: wxPrinter(wxPrintDialogData* data = NULL); @@ -270,7 +281,7 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p bool hadErr = False; bool found; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "GetPageInfo"))) { PyObject* result = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()")); if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) { @@ -301,7 +312,7 @@ void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *p } Py_DECREF(result); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); if (! found) wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo); } @@ -323,6 +334,8 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage); %} +MustHaveApp(wxPyPrintout); + // Now define the custom class for SWIGging %name(Printout) class wxPyPrintout : public wxObject { public: @@ -377,6 +390,8 @@ public: +MustHaveApp(wxPreviewCanvas); + class wxPreviewCanvas: public wxScrolledWindow { public: @@ -391,6 +406,8 @@ public: }; +MustHaveApp(wxPreviewFrame); + class wxPreviewFrame : public wxFrame { public: %pythonAppend wxPreviewFrame "self._setOORInfo(self)" @@ -430,6 +447,8 @@ enum { wxID_PREVIEW_GOTO }; +MustHaveApp(wxPreviewControlBar); + class wxPreviewControlBar: public wxPanel { public: @@ -458,6 +477,8 @@ public: //--------------------------------------------------------------------------- +MustHaveApp(wxPrintPreview); + class wxPrintPreview : public wxObject { public: %nokwargs wxPrintPreview; @@ -527,15 +548,15 @@ public: bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \ bool rval=False; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ - PyObject* win = wxPyMake_wxObject(a); \ - PyObject* dc = wxPyMake_wxObject(&b); \ + PyObject* win = wxPyMake_wxObject(a,false); \ + PyObject* dc = wxPyMake_wxObject(&b,false); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\ Py_DECREF(win); \ Py_DECREF(dc); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a, b); \ return rval; \ @@ -592,6 +613,8 @@ IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling) %} +MustHaveApp(wxPyPrintPreview); + class wxPyPrintPreview : public wxPrintPreview { public: @@ -650,6 +673,8 @@ IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateControlBar); %} +MustHaveApp(wxPyPreviewFrame); + class wxPyPreviewFrame : public wxPreviewFrame { public: @@ -704,6 +729,8 @@ IMP_PYCALLBACK_VOID_INT(wxPyPreviewControlBar, wxPreviewControlBar, SetZoomContr %} +MustHaveApp(wxPyPreviewControlBar); + class wxPyPreviewControlBar : public wxPreviewControlBar { public: