]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/printwin.h
remove the recently added MSWFindMenuBarItem() as we already had FindItemInMenuBar...
[wxWidgets.git] / include / wx / msw / printwin.h
CommitLineData
2bda0e17
KB
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$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_PRINTWIN_H_
13#define _WX_PRINTWIN_H_
2bda0e17 14
2bda0e17
KB
15#include "wx/prntbase.h"
16
103aec29
VZ
17// ---------------------------------------------------------------------------
18// Represents the printer: manages printing a wxPrintout object
19// ---------------------------------------------------------------------------
20
53a2db12 21class WXDLLIMPEXP_CORE wxWindowsPrinter : public wxPrinterBase
2bda0e17 22{
103aec29 23 DECLARE_DYNAMIC_CLASS(wxWindowsPrinter)
2bda0e17 24
103aec29
VZ
25public:
26 wxWindowsPrinter(wxPrintDialogData *data = NULL);
27 virtual ~wxWindowsPrinter();
2bda0e17 28
103aec29
VZ
29 virtual bool Print(wxWindow *parent,
30 wxPrintout *printout,
078cf5cb 31 bool prompt = true);
f415cab9
JS
32
33 virtual wxDC *PrintDialog(wxWindow *parent);
103aec29 34 virtual bool Setup(wxWindow *parent);
34da0970 35
103aec29
VZ
36private:
37 WXFARPROC m_lpAbortProc;
22f3361e
VZ
38
39 DECLARE_NO_COPY_CLASS(wxWindowsPrinter)
2bda0e17
KB
40};
41
103aec29
VZ
42// ---------------------------------------------------------------------------
43// wxPrintPreview: programmer creates an object of this class to preview a
44// wxPrintout.
45// ---------------------------------------------------------------------------
46
25a3fca2
VS
47#define wxUSE_HIGH_QUALITY_PREVIEW (wxUSE_IMAGE && wxUSE_WXDIB)
48
53a2db12 49class WXDLLIMPEXP_CORE wxWindowsPrintPreview : public wxPrintPreviewBase
2bda0e17 50{
103aec29
VZ
51public:
52 wxWindowsPrintPreview(wxPrintout *printout,
53 wxPrintout *printoutForPrinting = NULL,
54 wxPrintDialogData *data = NULL);
55 wxWindowsPrintPreview(wxPrintout *printout,
56 wxPrintout *printoutForPrinting,
57 wxPrintData *data);
58 virtual ~wxWindowsPrintPreview();
2bda0e17 59
103aec29
VZ
60 virtual bool Print(bool interactive);
61 virtual void DetermineScaling();
fc7a2a60 62
25a3fca2
VS
63#if wxUSE_HIGH_QUALITY_PREVIEW
64protected:
65 bool RenderPageIntoBitmapHQ(wxBitmap& bmp, int pageNum);
66 virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
67
fc7a2a60 68private:
25a3fca2
VS
69 bool RenderPageFragment(float scaleX, float scaleY,
70 int *nextFinalLine,
71 wxPrinterDC& printer,
72 wxMemoryDC& finalDC,
73 const wxRect& rect,
74 int pageNum);
75
76 bool m_hqPreviewFailed;
77#endif // wxUSE_HIGH_QUALITY_PREVIEW
78
fc7a2a60 79 DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview)
2bda0e17
KB
80};
81
82#endif
103aec29 83// _WX_PRINTWIN_H_