1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/dcprint.h
3 // Purpose: wxPrinterDC class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_DCPRINT_H_
13 #define _WX_MSW_DCPRINT_H_
15 #if wxUSE_PRINTING_ARCHITECTURE
17 #include "wx/dcprint.h"
18 #include "wx/cmndata.h"
19 #include "wx/msw/dc.h"
21 // ------------------------------------------------------------------------
25 class WXDLLIMPEXP_CORE wxPrinterDCImpl
: public wxMSWDCImpl
28 // Create from print data
29 wxPrinterDCImpl( wxPrinterDC
*owner
, const wxPrintData
& data
);
30 wxPrinterDCImpl( wxPrinterDC
*owner
, WXHDC theDC
);
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();
38 virtual wxRect
GetPaperRect() const;
41 virtual void DoDrawBitmap(const wxBitmap
&bmp
, wxCoord x
, wxCoord y
,
42 bool useMask
= false);
43 virtual bool DoBlit(wxCoord xdest
, wxCoord ydest
,
44 wxCoord width
, wxCoord height
,
45 wxDC
*source
, wxCoord xsrc
, wxCoord ysrc
,
46 int rop
= wxCOPY
, bool useMask
= false, wxCoord xsrcMask
= wxDefaultCoord
, wxCoord ysrcMask
= wxDefaultCoord
);
47 virtual void DoGetSize(int *w
, int *h
) const
56 wxPrintData m_printData
;
59 DECLARE_CLASS(wxPrinterDCImpl
)
60 DECLARE_NO_COPY_CLASS(wxPrinterDCImpl
)
63 // Gets an HDC for the specified printer configuration
64 WXHDC WXDLLIMPEXP_CORE
wxGetPrinterDC(const wxPrintData
& data
);
66 // ------------------------------------------------------------------------
70 class WXDLLIMPEXP_CORE wxPrinterDCFromHDC
: public wxPrinterDC
73 wxPrinterDCFromHDC( WXHDC theDC
)
74 : wxPrinterDC(new wxPrinterDCImpl(this, theDC
))
79 #endif // wxUSE_PRINTING_ARCHITECTURE
81 #endif // _WX_MSW_DCPRINT_H_