]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcprint.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[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
bbcdf8bc 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
7d09b97f
VZ
11#ifndef _WX_MSW_DCPRINT_H_
12#define _WX_MSW_DCPRINT_H_
2bda0e17 13
d427503c
VZ
14#if wxUSE_PRINTING_ARCHITECTURE
15
888dde65 16#include "wx/dcprint.h"
7bcb11d3 17#include "wx/cmndata.h"
888dde65 18#include "wx/msw/dc.h"
2bda0e17 19
888dde65
RR
20// ------------------------------------------------------------------------
21// wxPrinterDCImpl
22//
23
53a2db12 24class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxMSWDCImpl
2bda0e17 25{
7bcb11d3 26public:
7bcb11d3 27 // Create from print data
888dde65
RR
28 wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
29 wxPrinterDCImpl( wxPrinterDC *owner, WXHDC theDC );
7bcb11d3 30
4b7f2165
VZ
31 // override some base class virtuals
32 virtual bool StartDoc(const wxString& message);
33 virtual void EndDoc();
34 virtual void StartPage();
35 virtual void EndPage();
7bcb11d3 36
6d52ca53 37 virtual wxRect GetPaperRect() const;
f415cab9 38
7bcb11d3 39protected:
4b7f2165 40 virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
d71cc120 41 bool useMask = false);
4b7f2165
VZ
42 virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
43 wxCoord width, wxCoord height,
44 wxDC *source, wxCoord xsrc, wxCoord ysrc,
89efaf2b
FM
45 wxRasterOperationMode rop = wxCOPY, bool useMask = false,
46 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 59 DECLARE_CLASS(wxPrinterDCImpl)
c0c133e1 60 wxDECLARE_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