-class wxPrintData {
+class wxPrintData : public wxObject {
public:
wxPrintData();
~wxPrintData();
//---------------------------------------------------------------------------
-class wxPageSetupDialogData {
+class wxPageSetupDialogData : public wxObject {
public:
wxPageSetupDialogData();
~wxPageSetupDialogData();
//----------------------------------------------------------------------
-class wxPrintDialogData {
+class wxPrintDialogData : public wxObject {
public:
wxPrintDialogData();
~wxPrintDialogData();
// 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")) {
+ wxPyTState* state = 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(state);
+ if (! found)
wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
-
- wxPySaveThread(doSave);
}
void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
// Now define the custom class for SWIGging
-%name(wxPrintout) class wxPyPrintout {
+%name(wxPrintout) class wxPyPrintout : public wxObject {
public:
wxPyPrintout(const char* title = "Printout");
//----------------------------------------------------------------------
-class wxPrinter {
+class wxPrinter : public wxObject {
public:
wxPrinter(wxPrintDialogData* data = NULL);
~wxPrinter();
//----------------------------------------------------------------------
-class wxPrintPreview {
+class wxPrintPreview : public wxObject {
public:
wxPrintPreview(wxPyPrintout* printout, wxPyPrintout* printoutForPrinting, wxPrintData* data=NULL);
// ~wxPrintPreview(); **** ????
};
//----------------------------------------------------------------------
+
+%init %{
+ wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout");
+%}
+
//----------------------------------------------------------------------
//----------------------------------------------------------------------