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() }
103 //char* GetPrivData() const;
104 //int GetPrivDataLen() const;
105 //void SetPrivData( char *privData, int len );
108 PyObject* GetPrivData() {
110 wxPyBlock_t blocked = wxPyBeginBlockThreads();
111 data = PyString_FromStringAndSize(self->GetPrivData(),
112 self->GetPrivDataLen());
113 wxPyEndBlockThreads(blocked);
117 void SetPrivData(PyObject* data) {
118 if (! PyString_Check(data)) {
119 wxPyBLOCK_THREADS(PyErr_SetString(PyExc_TypeError,
120 "Expected string object"));
124 wxPyBlock_t blocked = wxPyBeginBlockThreads();
125 self->SetPrivData(PyString_AS_STRING(data), PyString_GET_SIZE(data));
126 wxPyEndBlockThreads(blocked);
131 // NOTE: These are now inside of #if WXWIN_COMPATIBILITY_2_4, so be
132 // prepared to remove them...
134 // PostScript-specific data
135 const wxString& GetPrinterCommand();
136 const wxString& GetPrinterOptions();
137 const wxString& GetPreviewCommand();
138 const wxString& GetFontMetricPath();
139 double GetPrinterScaleX();
140 double GetPrinterScaleY();
141 long GetPrinterTranslateX();
142 long GetPrinterTranslateY();
143 void SetPrinterCommand(const wxString& command);
144 void SetPrinterOptions(const wxString& options);
145 void SetPreviewCommand(const wxString& command);
146 void SetFontMetricPath(const wxString& path);
147 void SetPrinterScaleX(double x);
148 void SetPrinterScaleY(double y);
149 void SetPrinterScaling(double x, double y);
150 void SetPrinterTranslateX(long x);
151 void SetPrinterTranslateY(long y);
152 void SetPrinterTranslation(long x, long y);
156 //---------------------------------------------------------------------------
158 class wxPageSetupDialogData : public wxObject {
160 %nokwargs wxPageSetupDialogData;
161 wxPageSetupDialogData();
162 wxPageSetupDialogData(const wxPageSetupDialogData& data); // for making copies
163 wxPageSetupDialogData(const wxPrintData& data);
164 ~wxPageSetupDialogData();
166 void EnableHelp(bool flag);
167 void EnableMargins(bool flag);
168 void EnableOrientation(bool flag);
169 void EnablePaper(bool flag);
170 void EnablePrinter(bool flag);
172 bool GetDefaultMinMargins();
173 bool GetEnableMargins();
174 bool GetEnableOrientation();
175 bool GetEnablePaper();
176 bool GetEnablePrinter();
177 bool GetEnableHelp();
178 bool GetDefaultInfo();
179 wxPoint GetMarginTopLeft();
180 wxPoint GetMarginBottomRight();
181 wxPoint GetMinMarginTopLeft();
182 wxPoint GetMinMarginBottomRight();
183 wxPaperSize GetPaperId();
184 wxSize GetPaperSize();
186 wxPrintData& GetPrintData();
190 void SetDefaultInfo(bool flag);
191 void SetDefaultMinMargins(bool flag);
192 void SetMarginTopLeft(const wxPoint& pt);
193 void SetMarginBottomRight(const wxPoint& pt);
194 void SetMinMarginTopLeft(const wxPoint& pt);
195 void SetMinMarginBottomRight(const wxPoint& pt);
196 void SetPaperId(wxPaperSize id);
197 void SetPaperSize(const wxSize& size);
199 void SetPrintData(const wxPrintData& printData);
201 // Use paper size defined in this object to set the wxPrintData
203 void CalculateIdFromPaperSize();
205 // Use paper id in wxPrintData to set this object's paper size
206 void CalculatePaperSizeFromId();
208 %pythoncode { def __nonzero__(self): return self.Ok() }
213 // NOTE: Contrary to it's name, this class doesn't derive from wxDialog. It
214 // is a facade in front of a platform-specific (native dialog) provided by the
217 MustHaveApp(wxPageSetupDialog);
219 class wxPageSetupDialog : public wxObject
222 wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
224 wxPageSetupDialogData& GetPageSetupData();
225 wxPageSetupDialogData& GetPageSetupDialogData();
229 //---------------------------------------------------------------------------
232 class wxPrintDialogData : public wxObject {
234 %nokwargs wxPrintDialogData;
236 wxPrintDialogData(const wxPrintData& printData);
237 wxPrintDialogData(const wxPrintDialogData& printData); // for making copies
238 ~wxPrintDialogData();
240 int GetFromPage() const;
241 int GetToPage() const;
242 int GetMinPage() const;
243 int GetMaxPage() const;
244 int GetNoCopies() const;
245 bool GetAllPages() const;
246 bool GetSelection() const;
247 bool GetCollate() const;
248 bool GetPrintToFile() const;
250 // WXWIN_COMPATIBILITY_2_4
251 bool GetSetupDialog() const;
252 void SetSetupDialog(bool flag);
254 void SetFromPage(int v);
255 void SetToPage(int v);
256 void SetMinPage(int v);
257 void SetMaxPage(int v);
258 void SetNoCopies(int v);
259 void SetAllPages(bool flag);
260 void SetSelection(bool flag);
261 void SetCollate(bool flag);
262 void SetPrintToFile(bool flag);
264 void EnablePrintToFile(bool flag);
265 void EnableSelection(bool flag);
266 void EnablePageNumbers(bool flag);
267 void EnableHelp(bool flag);
269 bool GetEnablePrintToFile() const;
270 bool GetEnableSelection() const;
271 bool GetEnablePageNumbers() const;
272 bool GetEnableHelp() const;
274 // Is this data OK for showing the print dialog?
278 wxPrintData& GetPrintData();
279 void SetPrintData(const wxPrintData& printData);
281 %pythoncode { def __nonzero__(self): return self.Ok() }
286 MustHaveApp(wxPrintDialog);
289 // NOTE: Contrary to it's name, this class doesn't derive from wxDialog. It
290 // is a facade in front of a platform-specific (native dialog) provided by the
293 class wxPrintDialog : public wxObject {
295 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
297 // TODO?: wxPrintDialog(wxWindow *parent, wxPrintData* data);
299 virtual int ShowModal();
301 virtual wxPrintDialogData& GetPrintDialogData();
302 virtual wxPrintData& GetPrintData();
304 %newobject GetPrintDC;
305 virtual wxDC *GetPrintDC();
310 //---------------------------------------------------------------------------
311 //---------------------------------------------------------------------------
316 wxPRINTER_NO_ERROR = 0,
322 MustHaveApp(wxPrinter);
324 class wxPrinter : public wxObject {
326 wxPrinter(wxPrintDialogData* data = NULL);
329 virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPyPrintout *printout);
330 virtual void ReportError(wxWindow *parent, wxPyPrintout *printout, const wxString& message);
332 virtual bool Setup(wxWindow *parent);
333 virtual bool Print(wxWindow *parent, wxPyPrintout *printout, bool prompt = true);
334 virtual wxDC* PrintDialog(wxWindow *parent);
336 virtual wxPrintDialogData& GetPrintDialogData() const;
339 static wxPrinterError GetLastError();
343 //---------------------------------------------------------------------------
344 // Custom wxPrintout class that knows how to call python, See implementation in
345 // include/sx/wxPython/printfw.h
349 IMPLEMENT_ABSTRACT_CLASS(wxPyPrintout, wxPrintout);
351 // Since this one would be tough and ugly to do with the Macros...
352 void wxPyPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
356 wxPyBlock_t blocked = wxPyBeginBlockThreads();
357 if ((found = wxPyCBH_findCallback(m_myInst, "GetPageInfo"))) {
358 PyObject* result = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("()"));
359 if (result && PyTuple_Check(result) && PyTuple_Size(result) == 4) {
362 val = PyTuple_GetItem(result, 0);
363 if (PyInt_Check(val)) *minPage = PyInt_AsLong(val);
366 val = PyTuple_GetItem(result, 1);
367 if (PyInt_Check(val)) *maxPage = PyInt_AsLong(val);
370 val = PyTuple_GetItem(result, 2);
371 if (PyInt_Check(val)) *pageFrom = PyInt_AsLong(val);
374 val = PyTuple_GetItem(result, 3);
375 if (PyInt_Check(val)) *pageTo = PyInt_AsLong(val);
382 PyErr_SetString(PyExc_TypeError, "GetPageInfo should return a tuple of 4 integers.");
387 wxPyEndBlockThreads(blocked);
389 wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
392 void wxPyPrintout::base_GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) {
393 wxPrintout::GetPageInfo(minPage, maxPage, pageFrom, pageTo);
397 IMP_PYCALLBACK_BOOL_INTINT(wxPyPrintout, wxPrintout, OnBeginDocument);
398 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnEndDocument);
399 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnBeginPrinting);
400 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnEndPrinting);
401 IMP_PYCALLBACK__(wxPyPrintout, wxPrintout, OnPreparePrinting);
402 IMP_PYCALLBACK_BOOL_INT_pure(wxPyPrintout, wxPrintout, OnPrintPage);
403 IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage);
409 MustHaveApp(wxPyPrintout);
411 // Now define the custom class for SWIGging
412 %rename(Printout) wxPyPrintout;
413 class wxPyPrintout : public wxObject {
415 %pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)"
417 wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr);
418 //~wxPyPrintout(); wxPrintPreview object takes ownership...
420 void _setCallbackInfo(PyObject* self, PyObject* _class);
423 wxString GetTitle() const;
425 void SetDC(wxDC *dc);
427 void SetPageSizePixels(int w, int h);
429 void, GetPageSizePixels(int *OUTPUT, int *OUTPUT),
430 "GetPageSizePixels() -> (w, h)");
432 void SetPageSizeMM(int w, int h);
434 void, GetPageSizeMM(int *OUTPUT, int *OUTPUT),
435 "GetPageSizeMM() -> (w, h)");
437 void SetPPIScreen(int x, int y);
439 void, GetPPIScreen(int *OUTPUT, int *OUTPUT),
440 "GetPPIScreen() -> (x,y)");
442 void SetPPIPrinter(int x, int y);
444 void, GetPPIPrinter(int *OUTPUT, int *OUTPUT),
445 "GetPPIPrinter() -> (x,y)");
448 void SetIsPreview(bool p);
451 bool base_OnBeginDocument(int startPage, int endPage);
452 void base_OnEndDocument();
453 void base_OnBeginPrinting();
454 void base_OnEndPrinting();
455 void base_OnPreparePrinting();
456 bool base_HasPage(int page);
458 void, base_GetPageInfo(int *OUTPUT, int *OUTPUT, int *OUTPUT, int *OUTPUT),
459 "base_GetPageInfo() -> (minPage, maxPage, pageFrom, pageTo)");
462 //---------------------------------------------------------------------------
466 MustHaveApp(wxPreviewCanvas);
468 class wxPreviewCanvas: public wxScrolledWindow
471 %pythonAppend wxPreviewCanvas "self._setOORInfo(self)"
473 wxPreviewCanvas(wxPrintPreview *preview,
475 const wxPoint& pos = wxDefaultPosition,
476 const wxSize& size = wxDefaultSize,
478 const wxString& name = wxPyPreviewCanvasNameStr);
482 MustHaveApp(wxPreviewFrame);
484 class wxPreviewFrame : public wxFrame {
486 %pythonAppend wxPreviewFrame "self._setOORInfo(self)"
488 wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title,
489 const wxPoint& pos = wxDefaultPosition,
490 const wxSize& size = wxDefaultSize,
491 long style = wxDEFAULT_FRAME_STYLE,
492 const wxString& name = wxPyFrameNameStr);
495 void CreateControlBar();
498 wxPreviewControlBar* GetControlBar() const;
515 wxID_PREVIEW_PREVIOUS,
523 MustHaveApp(wxPreviewControlBar);
525 class wxPreviewControlBar: public wxPanel
528 %pythonAppend wxPreviewControlBar "self._setOORInfo(self)"
530 wxPreviewControlBar(wxPrintPreview *preview,
533 const wxPoint& pos = wxDefaultPosition,
534 const wxSize& size = wxDefaultSize,
535 long style = wxTAB_TRAVERSAL,
536 const wxString& name = wxPyPanelNameStr);
538 int GetZoomControl();
539 void SetZoomControl(int zoom);
540 wxPrintPreview* GetPrintPreview();
551 //---------------------------------------------------------------------------
553 MustHaveApp(wxPrintPreview);
555 class wxPrintPreview : public wxObject {
557 %nokwargs wxPrintPreview;
558 wxPrintPreview(wxPyPrintout* printout,
559 wxPyPrintout* printoutForPrinting,
560 wxPrintDialogData *data=NULL);
561 wxPrintPreview(wxPyPrintout* printout,
562 wxPyPrintout* printoutForPrinting,
565 virtual bool SetCurrentPage(int pageNum);
566 int GetCurrentPage();
568 void SetPrintout(wxPyPrintout *printout);
569 wxPyPrintout *GetPrintout();
570 wxPyPrintout *GetPrintoutForPrinting();
572 void SetFrame(wxFrame *frame);
573 void SetCanvas(wxPreviewCanvas *canvas);
575 virtual wxFrame *GetFrame();
576 virtual wxPreviewCanvas *GetCanvas();
578 // The preview canvas should call this from OnPaint
579 virtual bool PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
581 // This draws a blank page onto the preview canvas
582 virtual bool DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
584 // This is called by wxPrintPreview to render a page into a wxMemoryDC.
585 virtual bool RenderPage(int pageNum);
587 // Adjusts the scrollbars for the current scale
588 virtual void AdjustScrollbars(wxPreviewCanvas *canvas);
590 wxPrintDialogData& GetPrintDialogData();
592 virtual void SetZoom(int percent);
601 virtual bool Print(bool interactive);
602 virtual void DetermineScaling();
604 %pythoncode { def __nonzero__(self): return self.Ok() }
609 //---------------------------------------------------------------------------
611 // Python-derivable versions of the above preview classes
615 #define DEC_PYCALLBACK_BOOL_PREWINDC(CBNAME) \
616 bool CBNAME(wxPreviewCanvas* a, wxDC& b); \
617 bool base_##CBNAME(wxPreviewCanvas* a, wxDC& b)
620 #define IMP_PYCALLBACK_BOOL_PREWINDC(CLASS, PCLASS, CBNAME) \
621 bool CLASS::CBNAME(wxPreviewCanvas* a, wxDC& b) { \
624 wxPyBlock_t blocked = wxPyBeginBlockThreads(); \
625 if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
626 PyObject* win = wxPyMake_wxObject(a,false); \
627 PyObject* dc = wxPyMake_wxObject(&b,false); \
628 rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc)); \
632 wxPyEndBlockThreads(blocked); \
634 rval = PCLASS::CBNAME(a, b); \
637 bool CLASS::base_##CBNAME(wxPreviewCanvas* a, wxDC& b) { \
638 return PCLASS::CBNAME(a, b); \
644 class wxPyPrintPreview : public wxPrintPreview
646 DECLARE_CLASS(wxPyPrintPreview)
648 wxPyPrintPreview(wxPyPrintout* printout,
649 wxPyPrintout* printoutForPrinting,
650 wxPrintDialogData* data=NULL)
651 : wxPrintPreview(printout, printoutForPrinting, data)
653 wxPyPrintPreview(wxPyPrintout* printout,
654 wxPyPrintout* printoutForPrinting,
655 wxPrintData* data=NULL)
656 : wxPrintPreview(printout, printoutForPrinting, data)
659 DEC_PYCALLBACK_BOOL_INT(SetCurrentPage);
660 DEC_PYCALLBACK_BOOL_PREWINDC(PaintPage);
661 DEC_PYCALLBACK_BOOL_PREWINDC(DrawBlankPage);
662 DEC_PYCALLBACK_BOOL_INT(RenderPage);
663 DEC_PYCALLBACK_VOID_INT(SetZoom);
664 DEC_PYCALLBACK_BOOL_BOOL(Print);
665 DEC_PYCALLBACK_VOID_(DetermineScaling);
670 // Stupid renamed classes... Fix this in 2.5...
671 #if defined(__WXMSW__)
672 IMPLEMENT_CLASS( wxPyPrintPreview, wxWindowsPrintPreview );
673 #elif defined(__WXMAC__)
674 IMPLEMENT_CLASS( wxPyPrintPreview, wxMacPrintPreview );
676 IMPLEMENT_CLASS( wxPyPrintPreview, wxPostScriptPrintPreview );
679 IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, SetCurrentPage);
680 IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, PaintPage);
681 IMP_PYCALLBACK_BOOL_PREWINDC(wxPyPrintPreview, wxPrintPreview, DrawBlankPage);
682 IMP_PYCALLBACK_BOOL_INT (wxPyPrintPreview, wxPrintPreview, RenderPage);
683 IMP_PYCALLBACK_VOID_INT (wxPyPrintPreview, wxPrintPreview, SetZoom);
684 IMP_PYCALLBACK_BOOL_BOOL (wxPyPrintPreview, wxPrintPreview, Print);
685 IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling);
689 MustHaveApp(wxPyPrintPreview);
691 class wxPyPrintPreview : public wxPrintPreview
694 %pythonAppend wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)"
695 %nokwargs wxPyPrintPreview;
696 wxPyPrintPreview(wxPyPrintout* printout,
697 wxPyPrintout* printoutForPrinting,
698 wxPrintDialogData* data=NULL);
699 wxPyPrintPreview(wxPyPrintout* printout,
700 wxPyPrintout* printoutForPrinting,
703 void _setCallbackInfo(PyObject* self, PyObject* _class);
705 bool base_SetCurrentPage(int pageNum);
706 bool base_PaintPage(wxPreviewCanvas *canvas, wxDC& dc);
707 bool base_DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc);
708 bool base_RenderPage(int pageNum);
709 void base_SetZoom(int percent);
710 bool base_Print(bool interactive);
711 void base_DetermineScaling();
718 class wxPyPreviewFrame : public wxPreviewFrame
720 DECLARE_CLASS(wxPyPreviewFrame);
722 wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent,
723 const wxString& title,
724 const wxPoint& pos = wxDefaultPosition,
725 const wxSize& size = wxDefaultSize,
726 long style = wxDEFAULT_FRAME_STYLE,
727 const wxString& name = wxPyFrameNameStr)
728 : wxPreviewFrame(preview, parent, title, pos, size, style, name)
731 void SetPreviewCanvas(wxPreviewCanvas* canvas) { m_previewCanvas = canvas; }
732 void SetControlBar(wxPreviewControlBar* bar) { m_controlBar = bar; }
734 DEC_PYCALLBACK_VOID_(Initialize);
735 DEC_PYCALLBACK_VOID_(CreateCanvas);
736 DEC_PYCALLBACK_VOID_(CreateControlBar);
741 IMPLEMENT_CLASS(wxPyPreviewFrame, wxPreviewFrame);
743 IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, Initialize);
744 IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateCanvas);
745 IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateControlBar);
749 MustHaveApp(wxPyPreviewFrame);
751 class wxPyPreviewFrame : public wxPreviewFrame
754 %pythonAppend wxPyPreviewFrame "self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self)"
756 wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent,
757 const wxString& title,
758 const wxPoint& pos = wxDefaultPosition,
759 const wxSize& size = wxDefaultSize,
760 long style = wxDEFAULT_FRAME_STYLE,
761 const wxString& name = wxPyFrameNameStr);
763 void _setCallbackInfo(PyObject* self, PyObject* _class);
765 void SetPreviewCanvas(wxPreviewCanvas* canvas);
766 void SetControlBar(wxPreviewControlBar* bar);
768 void base_Initialize();
769 void base_CreateCanvas();
770 void base_CreateControlBar();
777 class wxPyPreviewControlBar : public wxPreviewControlBar
779 DECLARE_CLASS(wxPyPreviewControlBar);
781 wxPyPreviewControlBar(wxPrintPreview *preview,
784 const wxPoint& pos = wxDefaultPosition,
785 const wxSize& size = wxDefaultSize,
787 const wxString& name = wxPyPanelNameStr)
788 : wxPreviewControlBar(preview, buttons, parent, pos, size, style, name)
791 void SetPrintPreview(wxPrintPreview* preview) { m_printPreview = preview; }
793 DEC_PYCALLBACK_VOID_(CreateButtons);
794 DEC_PYCALLBACK_VOID_INT(SetZoomControl);
799 IMPLEMENT_CLASS(wxPyPreviewControlBar, wxPreviewControlBar);
800 IMP_PYCALLBACK_VOID_(wxPyPreviewControlBar, wxPreviewControlBar, CreateButtons);
801 IMP_PYCALLBACK_VOID_INT(wxPyPreviewControlBar, wxPreviewControlBar, SetZoomControl);
805 MustHaveApp(wxPyPreviewControlBar);
807 class wxPyPreviewControlBar : public wxPreviewControlBar
810 %pythonAppend wxPyPreviewControlBar "self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self)"
812 wxPyPreviewControlBar(wxPrintPreview *preview,
815 const wxPoint& pos = wxDefaultPosition,
816 const wxSize& size = wxDefaultSize,
818 const wxString& name = wxPyPanelNameStr);
820 void _setCallbackInfo(PyObject* self, PyObject* _class);
822 void SetPrintPreview(wxPrintPreview* preview);
824 void base_CreateButtons();
825 void base_SetZoomControl(int zoom);
828 //---------------------------------------------------------------------------
829 //---------------------------------------------------------------------------
831 wxPyPtrTypeMap_Add("wxPrintout", "wxPyPrintout");
833 //---------------------------------------------------------------------------