]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/msw/printwin.h | |
3 | // Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // Copyright: (c) Julian Smart | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_PRINTWIN_H_ | |
12 | #define _WX_PRINTWIN_H_ | |
13 | ||
14 | #include "wx/prntbase.h" | |
15 | ||
16 | // --------------------------------------------------------------------------- | |
17 | // Represents the printer: manages printing a wxPrintout object | |
18 | // --------------------------------------------------------------------------- | |
19 | ||
20 | class WXDLLIMPEXP_CORE wxWindowsPrinter : public wxPrinterBase | |
21 | { | |
22 | DECLARE_DYNAMIC_CLASS(wxWindowsPrinter) | |
23 | ||
24 | public: | |
25 | wxWindowsPrinter(wxPrintDialogData *data = NULL); | |
26 | ||
27 | virtual bool Print(wxWindow *parent, | |
28 | wxPrintout *printout, | |
29 | bool prompt = true); | |
30 | ||
31 | virtual wxDC *PrintDialog(wxWindow *parent); | |
32 | virtual bool Setup(wxWindow *parent); | |
33 | ||
34 | private: | |
35 | wxDECLARE_NO_COPY_CLASS(wxWindowsPrinter); | |
36 | }; | |
37 | ||
38 | // --------------------------------------------------------------------------- | |
39 | // wxPrintPreview: programmer creates an object of this class to preview a | |
40 | // wxPrintout. | |
41 | // --------------------------------------------------------------------------- | |
42 | ||
43 | class WXDLLIMPEXP_CORE wxWindowsPrintPreview : public wxPrintPreviewBase | |
44 | { | |
45 | public: | |
46 | wxWindowsPrintPreview(wxPrintout *printout, | |
47 | wxPrintout *printoutForPrinting = NULL, | |
48 | wxPrintDialogData *data = NULL); | |
49 | wxWindowsPrintPreview(wxPrintout *printout, | |
50 | wxPrintout *printoutForPrinting, | |
51 | wxPrintData *data); | |
52 | virtual ~wxWindowsPrintPreview(); | |
53 | ||
54 | virtual bool Print(bool interactive); | |
55 | virtual void DetermineScaling(); | |
56 | ||
57 | protected: | |
58 | #if wxUSE_ENH_METAFILE | |
59 | virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum); | |
60 | #endif | |
61 | ||
62 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview) | |
63 | }; | |
64 | ||
65 | #endif | |
66 | // _WX_PRINTWIN_H_ |