]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/dcprint.h
synchronize GTK2 minimum version in docs
[wxWidgets.git] / include / wx / msw / dcprint.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/dcprint.h
3 // Purpose: wxPrinterDC class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_MSW_DCPRINT_H_
13 #define _WX_MSW_DCPRINT_H_
14
15 #if wxUSE_PRINTING_ARCHITECTURE
16
17 #include "wx/dcprint.h"
18 #include "wx/cmndata.h"
19 #include "wx/msw/dc.h"
20
21 // ------------------------------------------------------------------------
22 // wxPrinterDCImpl
23 //
24
25 class WXDLLIMPEXP_CORE wxPrinterDCImpl : public wxMSWDCImpl
26 {
27 public:
28 // Create from print data
29 wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
30 wxPrinterDCImpl( wxPrinterDC *owner, WXHDC theDC );
31
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();
37
38 virtual wxRect GetPaperRect() const;
39
40 protected:
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 wxRasterOperationMode rop = wxCOPY, bool useMask = false,
47 wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
48 virtual void DoGetSize(int *w, int *h) const
49 {
50 GetDeviceSize(w, h);
51 }
52
53
54 // init the dc
55 void Init();
56
57 wxPrintData m_printData;
58
59 private:
60 DECLARE_CLASS(wxPrinterDCImpl)
61 wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl);
62 };
63
64 // Gets an HDC for the specified printer configuration
65 WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& data);
66
67 // ------------------------------------------------------------------------
68 // wxPrinterDCromHDC
69 //
70
71 class WXDLLIMPEXP_CORE wxPrinterDCFromHDC: public wxPrinterDC
72 {
73 public:
74 wxPrinterDCFromHDC( WXHDC theDC )
75 : wxPrinterDC(new wxPrinterDCImpl(this, theDC))
76 {
77 }
78 };
79
80 #endif // wxUSE_PRINTING_ARCHITECTURE
81
82 #endif // _WX_MSW_DCPRINT_H_
83