+// Stupid renamed classes... Fix this in 2.5...
+#if defined(__WXMSW__)
+IMPLEMENT_CLASS( wxPyPrintPreview, wxWindowsPrintPreview );
+#elif defined(__WXMAC__)
+IMPLEMENT_CLASS( wxPyPrintPreview, wxMacPrintPreview );
+#else
+IMPLEMENT_CLASS( wxPyPrintPreview, wxPostScriptPrintPreview );
+#endif
+
+IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, SetCurrentPage);
+IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, PaintPage);
+IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, DrawBlankPage);
+IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, RenderPage);
+IMP_PYCALLBACK_VOID_INT (wxPyPrintPreview, wxPrintPreview, SetZoom);
+IMP_PYCALLBACK_BOOL_BOOL (wxPyPrintPreview, wxPrintPreview, Print);
+IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling);
+%}
+
+
+class wxPyPrintPreview : public wxPrintPreview
+{
+public:
+ wxPyPrintPreview(wxPyPrintout* printout,
+ wxPyPrintout* printoutForPrinting,
+ wxPrintData* data=NULL);
+
+ void _setCallbackInfo(PyObject* self, PyObject* _class);
+ %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPrintPreview)"
+
+ bool base_SetCurrentPage(int pageNum);
+ bool base_PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
+ bool base_DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
+ bool base_RenderPage(int pageNum);
+ void base_SetZoom(int percent);
+ bool base_Print(bool interactive);
+ void base_DetermineScaling();
+};
+
+
+
+
+%{
+class wxPyPreviewFrame : public wxPreviewFrame
+{
+ DECLARE_CLASS(wxPyPreviewFrame);
+public:
+ wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxPyFrameNameStr)
+ : wxPreviewFrame(preview, parent, title, pos, size, style, name)
+ {}
+
+ void SetPreviewCanvas(wxPreviewCanvas* canvas) { m_previewCanvas = canvas; }
+ void SetControlBar(wxPreviewControlBar* bar) { m_controlBar = bar; }
+
+ DEC_PYCALLBACK_VOID_(Initialize);
+ DEC_PYCALLBACK_VOID_(CreateCanvas);
+ DEC_PYCALLBACK_VOID_(CreateControlBar);
+
+ PYPRIVATE;
+};
+
+IMPLEMENT_CLASS(wxPyPreviewFrame, wxPreviewFrame);
+
+IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, Initialize);
+IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateCanvas);
+IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateControlBar);
+%}