]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcprint.h
fix the incoherence pointed out by ifacecheck between wx docs, that documents usage...
[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
888dde65 38 virtual wxRect GetPaperRect();
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,
d71cc120 46 int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
7d09b97f
VZ
47 virtual void DoGetSize(int *w, int *h) const
48 {
49 GetDeviceSize(w, h);
50 }
51
4b7f2165 52
7ba4fbeb
VZ
53 // init the dc
54 void Init();
55
7bcb11d3 56 wxPrintData m_printData;
7ba4fbeb
VZ
57
58private:
888dde65
RR
59 DECLARE_CLASS(wxPrinterDCImpl)
60 DECLARE_NO_COPY_CLASS(wxPrinterDCImpl)
2bda0e17
KB
61};
62
7bcb11d3 63// Gets an HDC for the specified printer configuration
53a2db12 64WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data);
2bda0e17 65
888dde65
RR
66// ------------------------------------------------------------------------
67// wxPrinterDCromHDC
68//
69
53a2db12 70class WXDLLIMPEXP_CORE wxPrinterDCFromHDC: public wxPrinterDC
888dde65
RR
71{
72public:
73 wxPrinterDCFromHDC( WXHDC theDC )
f0875501 74 : wxPrinterDC(new wxPrinterDCImpl(this, theDC))
888dde65 75 {
888dde65
RR
76 }
77};
78
d427503c
VZ
79#endif // wxUSE_PRINTING_ARCHITECTURE
80
7d09b97f 81#endif // _WX_MSW_DCPRINT_H_
2bda0e17 82