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