1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Base classes for printing framework
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_PRNTBASEH__
13 #define _WX_PRNTBASEH__
17 #if wxUSE_PRINTING_ARCHITECTURE
20 #include "wx/cmndata.h"
22 #include "wx/scrolwin.h"
23 #include "wx/dialog.h"
27 class WXDLLIMPEXP_FWD_CORE wxDC
;
28 class WXDLLIMPEXP_FWD_CORE wxButton
;
29 class WXDLLIMPEXP_FWD_CORE wxChoice
;
30 class WXDLLIMPEXP_FWD_CORE wxPrintout
;
31 class WXDLLIMPEXP_FWD_CORE wxPrinterBase
;
32 class WXDLLIMPEXP_FWD_CORE wxPrintDialogBase
;
33 class WXDLLIMPEXP_FWD_CORE wxPrintDialog
;
34 class WXDLLIMPEXP_FWD_CORE wxPageSetupDialogBase
;
35 class WXDLLIMPEXP_FWD_CORE wxPageSetupDialog
;
36 class WXDLLIMPEXP_FWD_CORE wxPrintPreviewBase
;
37 class WXDLLIMPEXP_FWD_CORE wxPreviewCanvas
;
38 class WXDLLIMPEXP_FWD_CORE wxPreviewControlBar
;
39 class WXDLLIMPEXP_FWD_CORE wxPreviewFrame
;
40 class WXDLLIMPEXP_FWD_CORE wxPrintFactory
;
41 class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase
;
42 class WXDLLIMPEXP_FWD_CORE wxPrintPreview
;
44 //----------------------------------------------------------------------------
46 //----------------------------------------------------------------------------
50 wxPRINTER_NO_ERROR
= 0,
55 //----------------------------------------------------------------------------
57 //----------------------------------------------------------------------------
59 class WXDLLIMPEXP_CORE wxPrintFactory
63 virtual ~wxPrintFactory() {}
65 virtual wxPrinterBase
*CreatePrinter( wxPrintDialogData
* data
) = 0;
67 virtual wxPrintPreviewBase
*CreatePrintPreview( wxPrintout
*preview
,
68 wxPrintout
*printout
= NULL
,
69 wxPrintDialogData
*data
= NULL
) = 0;
70 virtual wxPrintPreviewBase
*CreatePrintPreview( wxPrintout
*preview
,
72 wxPrintData
*data
) = 0;
74 virtual wxPrintDialogBase
*CreatePrintDialog( wxWindow
*parent
,
75 wxPrintDialogData
*data
= NULL
) = 0;
76 virtual wxPrintDialogBase
*CreatePrintDialog( wxWindow
*parent
,
77 wxPrintData
*data
) = 0;
79 virtual wxPageSetupDialogBase
*CreatePageSetupDialog( wxWindow
*parent
,
80 wxPageSetupDialogData
* data
= NULL
) = 0;
82 virtual wxDCImpl
* CreatePrinterDCImpl( wxPrinterDC
*owner
, const wxPrintData
& data
) = 0;
84 // What to do and what to show in the wxPrintDialog
85 // a) Use the generic print setup dialog or a native one?
86 virtual bool HasPrintSetupDialog() = 0;
87 virtual wxDialog
*CreatePrintSetupDialog( wxWindow
*parent
, wxPrintData
*data
) = 0;
88 // b) Provide the "print to file" option ourselves or via print setup?
89 virtual bool HasOwnPrintToFile() = 0;
90 // c) Show current printer
91 virtual bool HasPrinterLine() = 0;
92 virtual wxString
CreatePrinterLine() = 0;
93 // d) Show Status line for current printer?
94 virtual bool HasStatusLine() = 0;
95 virtual wxString
CreateStatusLine() = 0;
98 virtual wxPrintNativeDataBase
*CreatePrintNativeData() = 0;
100 static void SetPrintFactory( wxPrintFactory
*factory
);
101 static wxPrintFactory
*GetFactory();
103 static wxPrintFactory
*m_factory
;
106 class WXDLLIMPEXP_CORE wxNativePrintFactory
: public wxPrintFactory
109 virtual wxPrinterBase
*CreatePrinter( wxPrintDialogData
*data
);
111 virtual wxPrintPreviewBase
*CreatePrintPreview( wxPrintout
*preview
,
112 wxPrintout
*printout
= NULL
,
113 wxPrintDialogData
*data
= NULL
);
114 virtual wxPrintPreviewBase
*CreatePrintPreview( wxPrintout
*preview
,
115 wxPrintout
*printout
,
118 virtual wxPrintDialogBase
*CreatePrintDialog( wxWindow
*parent
,
119 wxPrintDialogData
*data
= NULL
);
120 virtual wxPrintDialogBase
*CreatePrintDialog( wxWindow
*parent
,
123 virtual wxPageSetupDialogBase
*CreatePageSetupDialog( wxWindow
*parent
,
124 wxPageSetupDialogData
* data
= NULL
);
126 virtual wxDCImpl
* CreatePrinterDCImpl( wxPrinterDC
*owner
, const wxPrintData
& data
);
128 virtual bool HasPrintSetupDialog();
129 virtual wxDialog
*CreatePrintSetupDialog( wxWindow
*parent
, wxPrintData
*data
);
130 virtual bool HasOwnPrintToFile();
131 virtual bool HasPrinterLine();
132 virtual wxString
CreatePrinterLine();
133 virtual bool HasStatusLine();
134 virtual wxString
CreateStatusLine();
136 virtual wxPrintNativeDataBase
*CreatePrintNativeData();
139 //----------------------------------------------------------------------------
140 // wxPrintNativeDataBase
141 //----------------------------------------------------------------------------
143 class WXDLLIMPEXP_CORE wxPrintNativeDataBase
: public wxObject
146 wxPrintNativeDataBase();
147 virtual ~wxPrintNativeDataBase() {}
149 virtual bool TransferTo( wxPrintData
&data
) = 0;
150 virtual bool TransferFrom( const wxPrintData
&data
) = 0;
152 virtual bool Ok() const { return IsOk(); }
153 virtual bool IsOk() const = 0;
158 DECLARE_CLASS(wxPrintNativeDataBase
)
159 wxDECLARE_NO_COPY_CLASS(wxPrintNativeDataBase
);
162 //----------------------------------------------------------------------------
164 //----------------------------------------------------------------------------
167 * Represents the printer: manages printing a wxPrintout object
170 class WXDLLIMPEXP_CORE wxPrinterBase
: public wxObject
173 wxPrinterBase(wxPrintDialogData
*data
= NULL
);
174 virtual ~wxPrinterBase();
176 virtual wxWindow
*CreateAbortWindow(wxWindow
*parent
, wxPrintout
*printout
);
177 virtual void ReportError(wxWindow
*parent
, wxPrintout
*printout
, const wxString
& message
);
179 virtual wxPrintDialogData
& GetPrintDialogData() const;
180 bool GetAbort() const { return sm_abortIt
; }
182 static wxPrinterError
GetLastError() { return sm_lastError
; }
184 ///////////////////////////////////////////////////////////////////////////
187 virtual bool Setup(wxWindow
*parent
) = 0;
188 virtual bool Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
= true) = 0;
189 virtual wxDC
* PrintDialog(wxWindow
*parent
) = 0;
192 wxPrintDialogData m_printDialogData
;
193 wxPrintout
* m_currentPrintout
;
195 static wxPrinterError sm_lastError
;
198 static wxWindow
* sm_abortWindow
;
199 static bool sm_abortIt
;
202 DECLARE_CLASS(wxPrinterBase
)
203 wxDECLARE_NO_COPY_CLASS(wxPrinterBase
);
206 //----------------------------------------------------------------------------
208 //----------------------------------------------------------------------------
210 class WXDLLIMPEXP_CORE wxPrinter
: public wxPrinterBase
213 wxPrinter(wxPrintDialogData
*data
= NULL
);
214 virtual ~wxPrinter();
216 virtual wxWindow
*CreateAbortWindow(wxWindow
*parent
, wxPrintout
*printout
);
217 virtual void ReportError(wxWindow
*parent
, wxPrintout
*printout
, const wxString
& message
);
219 virtual bool Setup(wxWindow
*parent
);
220 virtual bool Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
= true);
221 virtual wxDC
* PrintDialog(wxWindow
*parent
);
223 virtual wxPrintDialogData
& GetPrintDialogData() const;
226 wxPrinterBase
*m_pimpl
;
229 DECLARE_CLASS(wxPrinter
)
230 wxDECLARE_NO_COPY_CLASS(wxPrinter
);
233 //----------------------------------------------------------------------------
235 //----------------------------------------------------------------------------
238 * Represents an object via which a document may be printed.
239 * The programmer derives from this, overrides (at least) OnPrintPage,
240 * and passes it to a wxPrinter object for printing, or a wxPrintPreview
241 * object for previewing.
244 class WXDLLIMPEXP_CORE wxPrintout
: public wxObject
247 wxPrintout(const wxString
& title
= _("Printout"));
248 virtual ~wxPrintout();
250 virtual bool OnBeginDocument(int startPage
, int endPage
);
251 virtual void OnEndDocument();
252 virtual void OnBeginPrinting();
253 virtual void OnEndPrinting();
255 // Guaranteed to be before any other functions are called
256 virtual void OnPreparePrinting() { }
258 virtual bool HasPage(int page
);
259 virtual bool OnPrintPage(int page
) = 0;
260 virtual void GetPageInfo(int *minPage
, int *maxPage
, int *pageFrom
, int *pageTo
);
262 virtual wxString
GetTitle() const { return m_printoutTitle
; }
264 wxDC
*GetDC() const { return m_printoutDC
; }
265 void SetDC(wxDC
*dc
) { m_printoutDC
= dc
; }
267 void FitThisSizeToPaper(const wxSize
& imageSize
);
268 void FitThisSizeToPage(const wxSize
& imageSize
);
269 void FitThisSizeToPageMargins(const wxSize
& imageSize
, const wxPageSetupDialogData
& pageSetupData
);
270 void MapScreenSizeToPaper();
271 void MapScreenSizeToPage();
272 void MapScreenSizeToPageMargins(const wxPageSetupDialogData
& pageSetupData
);
273 void MapScreenSizeToDevice();
275 wxRect
GetLogicalPaperRect() const;
276 wxRect
GetLogicalPageRect() const;
277 wxRect
GetLogicalPageMarginsRect(const wxPageSetupDialogData
& pageSetupData
) const;
279 void SetLogicalOrigin(wxCoord x
, wxCoord y
);
280 void OffsetLogicalOrigin(wxCoord xoff
, wxCoord yoff
);
282 void SetPageSizePixels(int w
, int h
) { m_pageWidthPixels
= w
; m_pageHeightPixels
= h
; }
283 void GetPageSizePixels(int *w
, int *h
) const { *w
= m_pageWidthPixels
; *h
= m_pageHeightPixels
; }
284 void SetPageSizeMM(int w
, int h
) { m_pageWidthMM
= w
; m_pageHeightMM
= h
; }
285 void GetPageSizeMM(int *w
, int *h
) const { *w
= m_pageWidthMM
; *h
= m_pageHeightMM
; }
287 void SetPPIScreen(int x
, int y
) { m_PPIScreenX
= x
; m_PPIScreenY
= y
; }
288 void SetPPIScreen(const wxSize
& ppi
) { SetPPIScreen(ppi
.x
, ppi
.y
); }
289 void GetPPIScreen(int *x
, int *y
) const { *x
= m_PPIScreenX
; *y
= m_PPIScreenY
; }
290 void SetPPIPrinter(int x
, int y
) { m_PPIPrinterX
= x
; m_PPIPrinterY
= y
; }
291 void SetPPIPrinter(const wxSize
& ppi
) { SetPPIPrinter(ppi
.x
, ppi
.y
); }
292 void GetPPIPrinter(int *x
, int *y
) const { *x
= m_PPIPrinterX
; *y
= m_PPIPrinterY
; }
294 void SetPaperRectPixels(const wxRect
& paperRectPixels
) { m_paperRectPixels
= paperRectPixels
; }
295 wxRect
GetPaperRectPixels() const { return m_paperRectPixels
; }
297 // This must be called by wxPrintPreview to associate itself with the
299 virtual void SetPreview(wxPrintPreview
*preview
) { m_preview
= preview
; }
301 wxPrintPreview
*GetPreview() const { return m_preview
; }
302 virtual bool IsPreview() const { return GetPreview() != NULL
; }
305 wxString m_printoutTitle
;
307 wxPrintPreview
*m_preview
;
309 int m_pageWidthPixels
;
310 int m_pageHeightPixels
;
320 wxRect m_paperRectPixels
;
323 DECLARE_ABSTRACT_CLASS(wxPrintout
)
324 wxDECLARE_NO_COPY_CLASS(wxPrintout
);
327 //----------------------------------------------------------------------------
329 //----------------------------------------------------------------------------
332 * Canvas upon which a preview is drawn.
335 class WXDLLIMPEXP_CORE wxPreviewCanvas
: public wxScrolledWindow
338 wxPreviewCanvas(wxPrintPreviewBase
*preview
,
340 const wxPoint
& pos
= wxDefaultPosition
,
341 const wxSize
& size
= wxDefaultSize
,
343 const wxString
& name
= wxT("canvas"));
344 virtual ~wxPreviewCanvas();
346 void SetPreview(wxPrintPreviewBase
*preview
) { m_printPreview
= preview
; }
348 void OnPaint(wxPaintEvent
& event
);
349 void OnChar(wxKeyEvent
&event
);
350 // Responds to colour changes
351 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
355 void OnMouseWheel(wxMouseEvent
& event
);
356 #endif // wxUSE_MOUSEWHEEL
357 void OnIdle(wxIdleEvent
& event
);
359 wxPrintPreviewBase
* m_printPreview
;
361 DECLARE_CLASS(wxPreviewCanvas
)
362 DECLARE_EVENT_TABLE()
363 wxDECLARE_NO_COPY_CLASS(wxPreviewCanvas
);
366 //----------------------------------------------------------------------------
368 //----------------------------------------------------------------------------
371 * Default frame for showing preview.
374 class WXDLLIMPEXP_CORE wxPreviewFrame
: public wxFrame
377 wxPreviewFrame(wxPrintPreviewBase
*preview
,
379 const wxString
& title
= _("Print Preview"),
380 const wxPoint
& pos
= wxDefaultPosition
,
381 const wxSize
& size
= wxDefaultSize
,
382 long style
= wxDEFAULT_FRAME_STYLE
| wxFRAME_FLOAT_ON_PARENT
,
383 const wxString
& name
= wxFrameNameStr
);
384 virtual ~wxPreviewFrame();
386 void OnCloseWindow(wxCloseEvent
& event
);
387 virtual void Initialize();
388 virtual void CreateCanvas();
389 virtual void CreateControlBar();
391 inline wxPreviewControlBar
* GetControlBar() const { return m_controlBar
; }
394 wxPreviewCanvas
* m_previewCanvas
;
395 wxPreviewControlBar
* m_controlBar
;
396 wxPrintPreviewBase
* m_printPreview
;
397 wxWindowDisabler
* m_windowDisabler
;
400 void OnChar(wxKeyEvent
& event
);
402 DECLARE_EVENT_TABLE()
403 DECLARE_CLASS(wxPreviewFrame
)
404 wxDECLARE_NO_COPY_CLASS(wxPreviewFrame
);
407 //----------------------------------------------------------------------------
408 // wxPreviewControlBar
409 //----------------------------------------------------------------------------
412 * A panel with buttons for controlling a print preview.
413 * The programmer may wish to use other means for controlling
417 #define wxPREVIEW_PRINT 1
418 #define wxPREVIEW_PREVIOUS 2
419 #define wxPREVIEW_NEXT 4
420 #define wxPREVIEW_ZOOM 8
421 #define wxPREVIEW_FIRST 16
422 #define wxPREVIEW_LAST 32
423 #define wxPREVIEW_GOTO 64
425 #define wxPREVIEW_DEFAULT (wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM\
426 |wxPREVIEW_FIRST|wxPREVIEW_GOTO|wxPREVIEW_LAST)
429 #define wxID_PREVIEW_CLOSE 1
430 #define wxID_PREVIEW_NEXT 2
431 #define wxID_PREVIEW_PREVIOUS 3
432 #define wxID_PREVIEW_PRINT 4
433 #define wxID_PREVIEW_ZOOM 5
434 #define wxID_PREVIEW_FIRST 6
435 #define wxID_PREVIEW_LAST 7
436 #define wxID_PREVIEW_GOTO 8
438 class WXDLLIMPEXP_CORE wxPreviewControlBar
: public wxPanel
440 DECLARE_CLASS(wxPreviewControlBar
)
443 wxPreviewControlBar(wxPrintPreviewBase
*preview
,
446 const wxPoint
& pos
= wxDefaultPosition
,
447 const wxSize
& size
= wxDefaultSize
,
448 long style
= wxTAB_TRAVERSAL
,
449 const wxString
& name
= wxT("panel"));
450 virtual ~wxPreviewControlBar();
452 virtual void CreateButtons();
453 virtual void SetZoomControl(int zoom
);
454 virtual int GetZoomControl();
455 virtual wxPrintPreviewBase
*GetPrintPreview() const
456 { return m_printPreview
; }
458 void OnWindowClose(wxCommandEvent
& event
);
465 void OnPrintButton(wxCommandEvent
& WXUNUSED(event
)) { OnPrint(); }
466 void OnNextButton(wxCommandEvent
& WXUNUSED(event
)) { OnNext(); }
467 void OnPreviousButton(wxCommandEvent
& WXUNUSED(event
)) { OnPrevious(); }
468 void OnFirstButton(wxCommandEvent
& WXUNUSED(event
)) { OnFirst(); }
469 void OnLastButton(wxCommandEvent
& WXUNUSED(event
)) { OnLast(); }
470 void OnGotoButton(wxCommandEvent
& WXUNUSED(event
)) { OnGoto(); }
471 void OnZoom(wxCommandEvent
& event
);
472 void OnPaint(wxPaintEvent
& event
);
475 wxPrintPreviewBase
* m_printPreview
;
476 wxButton
* m_closeButton
;
477 wxButton
* m_nextPageButton
;
478 wxButton
* m_previousPageButton
;
479 wxButton
* m_printButton
;
480 wxChoice
* m_zoomControl
;
481 wxButton
* m_firstPageButton
;
482 wxButton
* m_lastPageButton
;
483 wxButton
* m_gotoPageButton
;
487 DECLARE_EVENT_TABLE()
488 wxDECLARE_NO_COPY_CLASS(wxPreviewControlBar
);
491 //----------------------------------------------------------------------------
492 // wxPrintPreviewBase
493 //----------------------------------------------------------------------------
496 * Programmer creates an object of this class to preview a wxPrintout.
499 class WXDLLIMPEXP_CORE wxPrintPreviewBase
: public wxObject
502 wxPrintPreviewBase(wxPrintout
*printout
,
503 wxPrintout
*printoutForPrinting
= NULL
,
504 wxPrintDialogData
*data
= NULL
);
505 wxPrintPreviewBase(wxPrintout
*printout
,
506 wxPrintout
*printoutForPrinting
,
508 virtual ~wxPrintPreviewBase();
510 virtual bool SetCurrentPage(int pageNum
);
511 virtual int GetCurrentPage() const;
513 virtual void SetPrintout(wxPrintout
*printout
);
514 virtual wxPrintout
*GetPrintout() const;
515 virtual wxPrintout
*GetPrintoutForPrinting() const;
517 virtual void SetFrame(wxFrame
*frame
);
518 virtual void SetCanvas(wxPreviewCanvas
*canvas
);
520 virtual wxFrame
*GetFrame() const;
521 virtual wxPreviewCanvas
*GetCanvas() const;
523 // This is a helper routine, used by the next 4 routines.
525 virtual void CalcRects(wxPreviewCanvas
*canvas
, wxRect
& printableAreaRect
, wxRect
& paperRect
);
527 // The preview canvas should call this from OnPaint
528 virtual bool PaintPage(wxPreviewCanvas
*canvas
, wxDC
& dc
);
530 // Updates rendered page by calling RenderPage() if needed, returns true
531 // if there was some change. Preview canvas should call it at idle time
532 virtual bool UpdatePageRendering();
534 // This draws a blank page onto the preview canvas
535 virtual bool DrawBlankPage(wxPreviewCanvas
*canvas
, wxDC
& dc
);
537 // Adjusts the scrollbars for the current scale
538 virtual void AdjustScrollbars(wxPreviewCanvas
*canvas
);
540 // This is called by wxPrintPreview to render a page into a wxMemoryDC.
541 virtual bool RenderPage(int pageNum
);
544 virtual void SetZoom(int percent
);
545 virtual int GetZoom() const;
547 virtual wxPrintDialogData
& GetPrintDialogData();
549 virtual int GetMaxPage() const;
550 virtual int GetMinPage() const;
552 virtual bool Ok() const { return IsOk(); }
553 virtual bool IsOk() const;
554 virtual void SetOk(bool ok
);
556 ///////////////////////////////////////////////////////////////////////////
559 // If we own a wxPrintout that can be used for printing, this
560 // will invoke the actual printing procedure. Called
561 // by the wxPreviewControlBar.
562 virtual bool Print(bool interactive
) = 0;
564 // Calculate scaling that needs to be done to get roughly
565 // the right scaling for the screen pretending to be
566 // the currently selected printer.
567 virtual void DetermineScaling() = 0;
570 // helpers for RenderPage():
571 virtual bool RenderPageIntoDC(wxDC
& dc
, int pageNum
);
572 // renders preview into m_previewBitmap
573 virtual bool RenderPageIntoBitmap(wxBitmap
& bmp
, int pageNum
);
575 void InvalidatePreviewBitmap();
578 wxPrintDialogData m_printDialogData
;
579 wxPreviewCanvas
* m_previewCanvas
;
580 wxFrame
* m_previewFrame
;
581 wxBitmap
* m_previewBitmap
;
582 bool m_previewFailed
;
583 wxPrintout
* m_previewPrintout
;
584 wxPrintout
* m_printPrintout
;
587 float m_previewScaleX
;
588 float m_previewScaleY
;
597 bool m_printingPrepared
; // Called OnPreparePrinting?
600 void Init(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
);
602 wxDECLARE_NO_COPY_CLASS(wxPrintPreviewBase
);
603 DECLARE_CLASS(wxPrintPreviewBase
)
606 //----------------------------------------------------------------------------
608 //----------------------------------------------------------------------------
610 class WXDLLIMPEXP_CORE wxPrintPreview
: public wxPrintPreviewBase
613 wxPrintPreview(wxPrintout
*printout
,
614 wxPrintout
*printoutForPrinting
= NULL
,
615 wxPrintDialogData
*data
= NULL
);
616 wxPrintPreview(wxPrintout
*printout
,
617 wxPrintout
*printoutForPrinting
,
619 virtual ~wxPrintPreview();
621 virtual bool SetCurrentPage(int pageNum
);
622 virtual int GetCurrentPage() const;
623 virtual void SetPrintout(wxPrintout
*printout
);
624 virtual wxPrintout
*GetPrintout() const;
625 virtual wxPrintout
*GetPrintoutForPrinting() const;
626 virtual void SetFrame(wxFrame
*frame
);
627 virtual void SetCanvas(wxPreviewCanvas
*canvas
);
629 virtual wxFrame
*GetFrame() const;
630 virtual wxPreviewCanvas
*GetCanvas() const;
631 virtual bool PaintPage(wxPreviewCanvas
*canvas
, wxDC
& dc
);
632 virtual bool UpdatePageRendering();
633 virtual bool DrawBlankPage(wxPreviewCanvas
*canvas
, wxDC
& dc
);
634 virtual void AdjustScrollbars(wxPreviewCanvas
*canvas
);
635 virtual bool RenderPage(int pageNum
);
636 virtual void SetZoom(int percent
);
637 virtual int GetZoom() const;
639 virtual bool Print(bool interactive
);
640 virtual void DetermineScaling();
642 virtual wxPrintDialogData
& GetPrintDialogData();
644 virtual int GetMaxPage() const;
645 virtual int GetMinPage() const;
647 virtual bool Ok() const { return IsOk(); }
648 virtual bool IsOk() const;
649 virtual void SetOk(bool ok
);
652 wxPrintPreviewBase
*m_pimpl
;
655 DECLARE_CLASS(wxPrintPreview
)
656 wxDECLARE_NO_COPY_CLASS(wxPrintPreview
);
659 //----------------------------------------------------------------------------
660 // wxPrintAbortDialog
661 //----------------------------------------------------------------------------
663 class WXDLLIMPEXP_CORE wxPrintAbortDialog
: public wxDialog
666 wxPrintAbortDialog(wxWindow
*parent
,
667 const wxString
& title
,
668 const wxPoint
& pos
= wxDefaultPosition
,
669 const wxSize
& size
= wxDefaultSize
,
671 const wxString
& name
= wxT("dialog"))
672 : wxDialog(parent
, wxID_ANY
, title
, pos
, size
, style
, name
)
676 void OnCancel(wxCommandEvent
& event
);
679 DECLARE_EVENT_TABLE()
680 wxDECLARE_NO_COPY_CLASS(wxPrintAbortDialog
);
683 #endif // wxUSE_PRINTING_ARCHITECTURE