]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcprint.h
Applied rowspan patch #15276 (dghart)
[wxWidgets.git] / include / wx / msw / dcprint.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
4b7f2165 2// Name: wx/msw/dcprint.h
2bda0e17
KB
3// Purpose: wxPrinterDC class
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
7d09b97f
VZ
12#ifndef _WX_MSW_DCPRINT_H_
13#define _WX_MSW_DCPRINT_H_
2bda0e17 14
d427503c
VZ
15#if wxUSE_PRINTING_ARCHITECTURE
16
888dde65 17#include "wx/dcprint.h"
7bcb11d3 18#include "wx/cmndata.h"
888dde65 19#include "wx/msw/dc.h"
2bda0e17 20
888dde65
RR
21// ------------------------------------------------------------------------
22// wxPrinterDCImpl
23//
24
53a2db12 25class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxMSWDCImpl
2bda0e17 26{
7bcb11d3 27public:
7bcb11d3 28 // Create from print data
888dde65
RR
29 wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
30 wxPrinterDCImpl( wxPrinterDC *owner, WXHDC theDC );
7bcb11d3 31
4b7f2165
VZ
32 // override some base class virtuals
33 virtual bool StartDoc(const wxString& message);
34 virtual void EndDoc();
35 virtual void StartPage();
36 virtual void EndPage();
7bcb11d3 37
6d52ca53 38 virtual wxRect GetPaperRect() const;
f415cab9 39
7bcb11d3 40protected:
4b7f2165 41 virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
d71cc120 42 bool useMask = false);
4b7f2165
VZ
43 virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
44 wxCoord width, wxCoord height,
45 wxDC *source, wxCoord xsrc, wxCoord ysrc,
89efaf2b
FM
46 wxRasterOperationMode rop = wxCOPY, bool useMask = false,
47 wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
7d09b97f
VZ
48 virtual void DoGetSize(int *w, int *h) const
49 {
50 GetDeviceSize(w, h);
51 }
52
4b7f2165 53
7ba4fbeb
VZ
54 // init the dc
55 void Init();
56
7bcb11d3 57 wxPrintData m_printData;
7ba4fbeb
VZ
58
59private:
888dde65 60 DECLARE_CLASS(wxPrinterDCImpl)
c0c133e1 61 wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl);
2bda0e17
KB
62};
63
7bcb11d3 64// Gets an HDC for the specified printer configuration
53a2db12 65WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data);
2bda0e17 66
888dde65
RR
67// ------------------------------------------------------------------------
68// wxPrinterDCromHDC
69//
70
53a2db12 71class WXDLLIMPEXP_CORE wxPrinterDCFromHDC: public wxPrinterDC
888dde65
RR
72{
73public:
74 wxPrinterDCFromHDC( WXHDC theDC )
f0875501 75 : wxPrinterDC(new wxPrinterDCImpl(this, theDC))
888dde65 76 {
888dde65
RR
77 }
78};
79
d427503c
VZ
80#endif // wxUSE_PRINTING_ARCHITECTURE
81
7d09b97f 82#endif // _WX_MSW_DCPRINT_H_
2bda0e17 83