1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface for wx????
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
20 #include "wx/wxPython/printfw.h"
24 MAKE_CONST_WXSTRING2(PrintoutTitleStr, wxT("Printout"));
25 MAKE_CONST_WXSTRING2(PreviewCanvasNameStr, wxT("previewcanvas"));
28 //---------------------------------------------------------------------------
32 wxPRINT_MODE_NONE = 0,
33 wxPRINT_MODE_PREVIEW = 1, // Preview in external application
34 wxPRINT_MODE_FILE = 2, // Print to file
35 wxPRINT_MODE_PRINTER = 3, // Send to printer
36 wxPRINT_MODE_STREAM = 4 // Send postscript data into a stream
53 wxPRINTBIN_LARGECAPACITY,
55 wxPRINTBIN_FORMSOURCE,
61 class wxPrintData : public wxObject {
63 %nokwargs wxPrintData;
65 wxPrintData(const wxPrintData& data); // for making copies
75 const wxString& GetPrinterName();
77 wxDuplexMode GetDuplex();
78 wxPaperSize GetPaperId();
79 const wxSize& GetPaperSize();
83 wxPrintMode GetPrintMode() const;
85 void SetNoCopies(int v);
86 void SetCollate(bool flag);
87 void SetOrientation(int orient);
89 void SetPrinterName(const wxString& name);
90 void SetColour(bool colour);
91 void SetDuplex(wxDuplexMode duplex);
92 void SetPaperId(wxPaperSize sizeId);
93 void SetPaperSize(const wxSize& sz);
94 void SetQuality(int quality);
95 void SetBin(wxPrintBin bin);
96 void SetPrintMode(wxPrintMode printMode);
98 wxString GetFilename() const;
99 void SetFilename( const wxString &filename );
101 %pythoncode { def __nonzero__(self): return self.Ok() }
104 // NOTE: These are now inside of #if WXWIN_COMPATIBILITY_2_4, so be
105 // prepared to remove them...
107 // PostScript-specific data
108 const wxString& GetPrinterCommand();
109 const wxString& GetPrinterOptions();
110 const wxString& GetPreviewCommand();
111 const wxString& GetFontMetricPath();
112 double GetPrinterScaleX();
113 double GetPrinterScaleY();
114 long GetPrinterTranslateX();
115 long GetPrinterTranslateY();
116 void SetPrinterCommand(const wxString& command);
117 void SetPrinterOptions(const wxString& options);
118 void SetPreviewCommand(const wxString& command);
119 void SetFontMetricPath(const wxString& path);
120 void SetPrinterScaleX(double x);
121 void SetPrinterScaleY(double y);
122 void SetPrinterScaling(double x, double y);
123 void SetPrinterTranslateX(long x);
124 void SetPrinterTranslateY(long y);
125 void SetPrinterTranslation(long x, long y);
129 //---------------------------------------------------------------------------
131 class wxPageSetupDialogData : public wxObject {
133 %nokwargs wxPageSetupDialogData;
134 wxPageSetupDialogData();
135 wxPageSetupDialogData(const wxPageSetupDialogData& data); // for making copies
136 wxPageSetupDialogData(const wxPrintData& data);
137 ~wxPageSetupDialogData();
139 void EnableHelp(bool flag);
140 void EnableMargins(bool flag);
141 void EnableOrientation(bool flag);
142 void EnablePaper(bool flag);
143 void EnablePrinter(bool flag);
145 bool GetDefaultMinMargins();
146 bool GetEnableMargins();
147 bool GetEnableOrientation();
148 bool GetEnablePaper();
149 bool GetEnablePrinter();
150 bool GetEnableHelp();
151 bool GetDefaultInfo();
152 wxPoint GetMarginTopLeft();
153 wxPoint GetMarginBottomRight();
154 wxPoint GetMinMarginTopLeft();
155 wxPoint GetMinMarginBottomRight();
156 wxPaperSize GetPaperId();
157 wxSize GetPaperSize();
159 wxPrintData& GetPrintData();
163 void SetDefaultInfo(bool flag);
164 void SetDefaultMinMargins(bool flag);
165 void SetMarginTopLeft(const wxPoint& pt);
166 void SetMarginBottomRight(const wxPoint& pt);
167 void SetMinMarginTopLeft(const wxPoint& pt);
168 void SetMinMarginBottomRight(const wxPoint& pt);
169 void SetPaperId(wxPaperSize id);
170 void SetPaperSize(const wxSize& size);
172 void SetPrintData(const wxPrintData& printData);
174 // Use paper size defined in this object to set the wxPrintData
176 void CalculateIdFromPaperSize();
178 // Use paper id in wxPrintData to set this object's paper size
179 void CalculatePaperSizeFromId();
181 %pythoncode { def __nonzero__(self): return self.Ok() }
186 // NOTE: Contrary to it's name, this class doesn't derive from wxDialog. It
187 // is a facade in front of a platform-specific (native dialog) provided by the
190 MustHaveApp(wxPageSetupDialog);
192 class wxPageSetupDialog : public wxObject
195 wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
197 wxPageSetupDialogData& GetPageSetupData();
198 wxPageSetupDialogData& GetPageSetupDialogData();
202 //---------------------------------------------------------------------------
205 class wxPrintDialogData : public wxObject {
207 %nokwargs wxPrintDialogData;
209 wxPrintDialogData(const wxPrintData& printData);
210 wxPrintDialogData(const wxPrintDialogData& printData); // for making copies
211 ~wxPrintDialogData();
213 int GetFromPage() const;
214 int GetToPage() const;
215 int GetMinPage() const;
216 int GetMaxPage() const;
217 int GetNoCopies() const;
218 bool GetAllPages() const;
219 bool GetSelection() const;
220 bool GetCollate() const;
221 bool GetPrintToFile() const;
223 // WXWIN_COMPATIBILITY_2_4
224 bool GetSetupDialog() const;
225 void SetSetupDialog(bool flag);
227 void SetFromPage(int v);
228 void SetToPage(int v);
229 void SetMinPage(int v);
230 void SetMaxPage(int v);
231 void SetNoCopies(int v);
232 void SetAllPages(bool flag);
233 void SetSelection(bool flag);
234 void SetCollate(bool flag);
235 void SetPrintToFile(bool flag);
237 void EnablePrintToFile(bool flag);
238 void EnableSelection(bool flag);
239 void EnablePageNumbers(bool flag);
240 void EnableHelp(bool flag);
242 bool GetEnablePrintToFile() const;
243 bool GetEnableSelection() const;
244 bool GetEnablePageNumbers() const;
245 bool GetEnableHelp() const;
247 // Is this data OK for showing the print dialog?
251 wxPrintData& GetPrintData();
252 void SetPrintData(const wxPrintData& printData);
254 %pythoncode { def __nonzero__(self): return self.Ok() }
259 MustHaveApp(wxPrintDialog);
262 // NOTE: Contrary to it's name, this class doesn't derive from wxDialog. It
263 // is a facade in front of a platform-specific (native dialog) provided by the
266 class wxPrintDialog : public wxObject {
268 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
270 // TODO?: wxPrintDialog(wxWindow *parent, wxPrintData* data);
272 virtual int ShowModal();
274 virtual wxPrintDialogData& GetPrintDialogData();
275 virtual wxPrintData& GetPrintData();
277 %newobject GetPrintDC;
278 virtual wxDC *GetPrintDC();
283 //---------------------------------------------------------------------------
284 //---------------------------------------------------------------------------
289 wxPRINTER_NO_ERROR = 0,
295 MustHaveApp(wxPrinter);
297 class wxPrinter : public wxObject {
299 wxPrinter(wxPrintDialogData* data = NULL);
302 virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPyPrintout *printout);
303 virtual void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
305 virtual bool Setup(wxWindow *parent);
306 virtual bool Print(wxWindow *parent, wxPyPrintout *printout, bool prompt = true);
307 virtual wxDC* PrintDialog(wxWindow *parent);
309 virtual wxPrintDialogData& GetPrintDialogData() const;
312 static wxPrinterError GetLastError();
316 //---------------------------------------------------------------------------
317 // Custom wxPrintout class that knows how to call python, See implementation in
318 // include/sx/wxPython/printfw.h
322 IMPLEMENT_ABSTRACT_CLASS(wxPyPrintout, wxPrintout);
324 // Since this one would be tough and ugly to do with the Macros...
325 void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
329 bool blocked = wxPyBeginBlockThreads();
330 if ((found = wxPyCBH_findCallback(m_myInst, "GetPageInfo"))) {
331 PyObject* result = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
332 if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
335 val = PyTuple_GetItem(result, 0);
336 if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
339 val = PyTuple_GetItem(result, 1);
340 if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
343 val = PyTuple_GetItem(result, 2);
344 if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
347 val = PyTuple_GetItem(result, 3);
348 if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
355 PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
360 wxPyEndBlockThreads(blocked);
362 wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
365 void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
366 wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
370 IMP_PYCALLBACK_BOOL_INTINT(wxPyPrintout, wxPrintout, OnBeginDocument);
371 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnEndDocument);
372 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnBeginPrinting);
373 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnEndPrinting);
374 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnPreparePrinting);
375 IMP_PYCALLBACK_BOOL_INT_pure(wxPyPrintout, wxPrintout, OnPrintPage);
376 IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage);
382 MustHaveApp(wxPyPrintout);
384 // Now define the custom class for SWIGging
385 %rename(Printout) wxPyPrintout;
386 class wxPyPrintout : public wxObject {
388 %pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)"
390 wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr);
391 //~wxPyPrintout(); wxPrintPreview object takes ownership...
393 void _setCallbackInfo(PyObject* self, PyObject* _class);
396 wxString GetTitle() const;
398 void SetDC(wxDC *dc);
400 void SetPageSizePixels(int w, int h);
402 void, GetPageSizePixels(int *OUTPUT, int *OUTPUT),
403 "GetPageSizePixels() -> (w, h)");
405 void SetPageSizeMM(int w, int h);
407 void, GetPageSizeMM(int *OUTPUT, int *OUTPUT),
408 "GetPageSizeMM() -> (w, h)");
410 void SetPPIScreen(int x, int y);
412 void, GetPPIScreen(int *OUTPUT, int *OUTPUT),
413 "GetPPIScreen() -> (x,y)");
415 void SetPPIPrinter(int x, int y);
417 void, GetPPIPrinter(int *OUTPUT, int *OUTPUT),
418 "GetPPIPrinter() -> (x,y)");
421 void SetIsPreview(bool p);
424 bool base_OnBeginDocument(int startPage, int endPage);
425 void base_OnEndDocument();
426 void base_OnBeginPrinting();
427 void base_OnEndPrinting();
428 void base_OnPreparePrinting();
429 bool base_HasPage(int page);
431 void, base_GetPageInfo(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT),
432 "base_GetPageInfo() -> (minPage, maxPage, pageFrom, pageTo)");
435 //---------------------------------------------------------------------------
439 MustHaveApp(wxPreviewCanvas);
441 class wxPreviewCanvas: public wxScrolledWindow
444 %pythonAppend wxPreviewCanvas "self._setOORInfo(self)"
446 wxPreviewCanvas(wxPrintPreview *preview,
448 const wxPoint& pos = wxDefaultPosition,
449 const wxSize& size = wxDefaultSize,
451 const wxString& name = wxPyPreviewCanvasNameStr);
455 MustHaveApp(wxPreviewFrame);
457 class wxPreviewFrame : public wxFrame {
459 %pythonAppend wxPreviewFrame "self._setOORInfo(self)"
461 wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title,
462 const wxPoint& pos = wxDefaultPosition,
463 const wxSize& size = wxDefaultSize,
464 long style = wxDEFAULT_FRAME_STYLE,
465 const wxString& name = wxPyFrameNameStr);
468 void CreateControlBar();
471 wxPreviewControlBar* GetControlBar() const;
488 wxID_PREVIEW_PREVIOUS,
496 MustHaveApp(wxPreviewControlBar);
498 class wxPreviewControlBar: public wxPanel
501 %pythonAppend wxPreviewControlBar "self._setOORInfo(self)"
503 wxPreviewControlBar(wxPrintPreview *preview,
506 const wxPoint& pos = wxDefaultPosition,
507 const wxSize& size = wxDefaultSize,
508 long style = wxTAB_TRAVERSAL,
509 const wxString& name = wxPyPanelNameStr);
511 int GetZoomControl();
512 void SetZoomControl(int zoom);
513 wxPrintPreview* GetPrintPreview();
524 //---------------------------------------------------------------------------
526 MustHaveApp(wxPrintPreview);
528 class wxPrintPreview : public wxObject {
530 %nokwargs wxPrintPreview;
531 wxPrintPreview(wxPyPrintout* printout,
532 wxPyPrintout* printoutForPrinting,
533 wxPrintDialogData *data=NULL);
534 wxPrintPreview(wxPyPrintout* printout,
535 wxPyPrintout* printoutForPrinting,
538 virtual bool SetCurrentPage(int pageNum);
539 int GetCurrentPage();
541 void SetPrintout(wxPyPrintout *printout);
542 wxPyPrintout *GetPrintout();
543 wxPyPrintout *GetPrintoutForPrinting();
545 void SetFrame(wxFrame *frame);
546 void SetCanvas(wxPreviewCanvas *canvas);
548 virtual wxFrame *GetFrame();
549 virtual wxPreviewCanvas *GetCanvas();
551 // The preview canvas should call this from OnPaint
552 virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
554 // This draws a blank page onto the preview canvas
555 virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
557 // This is called by wxPrintPreview to render a page into a wxMemoryDC.
558 virtual bool RenderPage(int pageNum);
560 // Adjusts the scrollbars for the current scale
561 virtual void AdjustScrollbars(wxPreviewCanvas *canvas);
563 wxPrintDialogData& GetPrintDialogData();
565 virtual void SetZoom(int percent);
574 virtual bool Print(bool interactive);
575 virtual void DetermineScaling();
577 %pythoncode { def __nonzero__(self): return self.Ok() }
582 //---------------------------------------------------------------------------
584 // Python-derivable versions of the above preview classes
588 #define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
589 bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
590 bool base_##CBNAME(wxPreviewCanvas* a, wxDC& b)
593 #define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
594 bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
597 bool blocked = wxPyBeginBlockThreads(); \
598 if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
599 PyObject* win = wxPyMake_wxObject(a,false); \
600 PyObject* dc = wxPyMake_wxObject(&b,false); \
601 rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc)); \
605 wxPyEndBlockThreads(blocked); \
607 rval = PCLASS::CBNAME(a, b); \
610 bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
611 return PCLASS::CBNAME(a, b); \
617 class wxPyPrintPreview : public wxPrintPreview
619 DECLARE_CLASS(wxPyPrintPreview)
621 wxPyPrintPreview(wxPyPrintout* printout,
622 wxPyPrintout* printoutForPrinting,
623 wxPrintDialogData* data=NULL)
624 : wxPrintPreview(printout, printoutForPrinting, data)
626 wxPyPrintPreview(wxPyPrintout* printout,
627 wxPyPrintout* printoutForPrinting,
628 wxPrintData* data=NULL)
629 : wxPrintPreview(printout, printoutForPrinting, data)
632 DEC_PYCALLBACK_BOOL_INT(SetCurrentPage);
633 DEC_PYCALLBACK_BOOL_PREWINDC(PaintPage);
634 DEC_PYCALLBACK_BOOL_PREWINDC(DrawBlankPage);
635 DEC_PYCALLBACK_BOOL_INT(RenderPage);
636 DEC_PYCALLBACK_VOID_INT(SetZoom);
637 DEC_PYCALLBACK_BOOL_BOOL(Print);
638 DEC_PYCALLBACK_VOID_(DetermineScaling);
643 // Stupid renamed classes... Fix this in 2.5...
644 #if defined(__WXMSW__)
645 IMPLEMENT_CLASS( wxPyPrintPreview, wxWindowsPrintPreview );
646 #elif defined(__WXMAC__)
647 IMPLEMENT_CLASS( wxPyPrintPreview, wxMacPrintPreview );
649 IMPLEMENT_CLASS( wxPyPrintPreview, wxPostScriptPrintPreview );
652 IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, SetCurrentPage);
653 IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, PaintPage);
654 IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, DrawBlankPage);
655 IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, RenderPage);
656 IMP_PYCALLBACK_VOID_INT (wxPyPrintPreview, wxPrintPreview, SetZoom);
657 IMP_PYCALLBACK_BOOL_BOOL (wxPyPrintPreview, wxPrintPreview, Print);
658 IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling);
662 MustHaveApp(wxPyPrintPreview);
664 class wxPyPrintPreview : public wxPrintPreview
667 %pythonAppend wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)"
668 %nokwargs wxPyPrintPreview;
669 wxPyPrintPreview(wxPyPrintout* printout,
670 wxPyPrintout* printoutForPrinting,
671 wxPrintDialogData* data=NULL);
672 wxPyPrintPreview(wxPyPrintout* printout,
673 wxPyPrintout* printoutForPrinting,
676 void _setCallbackInfo(PyObject* self, PyObject* _class);
678 bool base_SetCurrentPage(int pageNum);
679 bool base_PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
680 bool base_DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
681 bool base_RenderPage(int pageNum);
682 void base_SetZoom(int percent);
683 bool base_Print(bool interactive);
684 void base_DetermineScaling();
691 class wxPyPreviewFrame : public wxPreviewFrame
693 DECLARE_CLASS(wxPyPreviewFrame);
695 wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent,
696 const wxString& title,
697 const wxPoint& pos = wxDefaultPosition,
698 const wxSize& size = wxDefaultSize,
699 long style = wxDEFAULT_FRAME_STYLE,
700 const wxString& name = wxPyFrameNameStr)
701 : wxPreviewFrame(preview, parent, title, pos, size, style, name)
704 void SetPreviewCanvas(wxPreviewCanvas* canvas) { m_previewCanvas = canvas; }
705 void SetControlBar(wxPreviewControlBar* bar) { m_controlBar = bar; }
707 DEC_PYCALLBACK_VOID_(Initialize);
708 DEC_PYCALLBACK_VOID_(CreateCanvas);
709 DEC_PYCALLBACK_VOID_(CreateControlBar);
714 IMPLEMENT_CLASS(wxPyPreviewFrame, wxPreviewFrame);
716 IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, Initialize);
717 IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateCanvas);
718 IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateControlBar);
722 MustHaveApp(wxPyPreviewFrame);
724 class wxPyPreviewFrame : public wxPreviewFrame
727 %pythonAppend wxPyPreviewFrame "self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self)"
729 wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent,
730 const wxString& title,
731 const wxPoint& pos = wxDefaultPosition,
732 const wxSize& size = wxDefaultSize,
733 long style = wxDEFAULT_FRAME_STYLE,
734 const wxString& name = wxPyFrameNameStr);
736 void _setCallbackInfo(PyObject* self, PyObject* _class);
738 void SetPreviewCanvas(wxPreviewCanvas* canvas);
739 void SetControlBar(wxPreviewControlBar* bar);
741 void base_Initialize();
742 void base_CreateCanvas();
743 void base_CreateControlBar();
750 class wxPyPreviewControlBar : public wxPreviewControlBar
752 DECLARE_CLASS(wxPyPreviewControlBar);
754 wxPyPreviewControlBar(wxPrintPreview *preview,
757 const wxPoint& pos = wxDefaultPosition,
758 const wxSize& size = wxDefaultSize,
760 const wxString& name = wxPyPanelNameStr)
761 : wxPreviewControlBar(preview, buttons, parent, pos, size, style, name)
764 void SetPrintPreview(wxPrintPreview* preview) { m_printPreview = preview; }
766 DEC_PYCALLBACK_VOID_(CreateButtons);
767 DEC_PYCALLBACK_VOID_INT(SetZoomControl);
772 IMPLEMENT_CLASS(wxPyPreviewControlBar, wxPreviewControlBar);
773 IMP_PYCALLBACK_VOID_(wxPyPreviewControlBar, wxPreviewControlBar, CreateButtons);
774 IMP_PYCALLBACK_VOID_INT(wxPyPreviewControlBar, wxPreviewControlBar, SetZoomControl);
778 MustHaveApp(wxPyPreviewControlBar);
780 class wxPyPreviewControlBar : public wxPreviewControlBar
783 %pythonAppend wxPyPreviewControlBar "self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self)"
785 wxPyPreviewControlBar(wxPrintPreview *preview,
788 const wxPoint& pos = wxDefaultPosition,
789 const wxSize& size = wxDefaultSize,
791 const wxString& name = wxPyPanelNameStr);
793 void _setCallbackInfo(PyObject* self, PyObject* _class);
795 void SetPrintPreview(wxPrintPreview* preview);
797 void base_CreateButtons();
798 void base_SetZoomControl(int zoom);
801 //---------------------------------------------------------------------------
802 //---------------------------------------------------------------------------
804 wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout");
806 //---------------------------------------------------------------------------