#include "helpers.h"
#include <wx/print.h>
#include <wx/printdlg.h>
+#include <wx/dcps.h>
#include "printfw.h"
%}
//---------------------------------------------------------------------------
+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();
// Since this one would be tough and ugly to do with the Macros...
void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
bool hadErr = FALSE;
+ bool found;
- bool doSave = wxPyRestoreThread();
- if (m_myInst.findCallback("GetPageInfo")) {
+ wxPyBeginBlockThreads();
+ if ((found = m_myInst.findCallback("GetPageInfo"))) {
PyObject* result = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
PyObject* val;
}
Py_DECREF(result);
}
- else
+ wxPyEndBlockThreads();
+ if (! found)
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
-
- wxPySaveThread(doSave);
}
void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
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; }
long style = wxDEFAULT_FRAME_STYLE,
char* name = "frame");
- %pragma(python) addtomethod = "__init__:#wx._StdFrameCallbacks(self)"
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
void Initialize();