dcprint.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/dcprint.h
  3. // Purpose: wxPrinterDC class
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 09/12/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_DCPRINT_H_
  11. #define _WX_DCPRINT_H_
  12. #if wxUSE_PRINTING_ARCHITECTURE
  13. #include "wx/dc.h"
  14. #include "wx/cmndata.h"
  15. #include "wx/os2/dc.h"
  16. class WXDLLIMPEXP_CORE wxPrinterDCImpl: public wxPMDCImpl
  17. {
  18. public:
  19. // Create a printer DC
  20. // Create from print data
  21. wxPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& rData );
  22. wxPrinterDCImpl( wxPrinterDC *owner, WXHDC hTheDC);
  23. // override some base class virtuals
  24. virtual bool StartDoc(const wxString& rsMessage);
  25. virtual void EndDoc(void);
  26. virtual void StartPage(void);
  27. virtual void EndPage(void);
  28. virtual wxRect GetPaperRect() const;
  29. protected:
  30. virtual void DoDrawBitmap( const wxBitmap& rBmp
  31. ,wxCoord vX
  32. ,wxCoord vY
  33. ,bool bUseMask = FALSE
  34. );
  35. virtual bool DoBlit( wxCoord vXdest
  36. ,wxCoord vYdest
  37. ,wxCoord vWidth
  38. ,wxCoord vHeight
  39. ,wxDC* pSource
  40. ,wxCoord vXsrc
  41. ,wxCoord vYsrc
  42. ,wxRasterOperationMode nRop = wxCOPY
  43. ,bool bUseMask = FALSE
  44. ,wxCoord vXsrcMask = -1
  45. ,wxCoord vYsrcMask = -1
  46. );
  47. // init the dc
  48. void Init(void);
  49. wxPrintData m_printData;
  50. private:
  51. DECLARE_CLASS(wxPrinterDCImpl)
  52. wxDECLARE_NO_COPY_CLASS(wxPrinterDCImpl);
  53. }; // end of CLASS wxPrinterDC
  54. // Gets an HDC for the specified printer configuration
  55. WXHDC WXDLLIMPEXP_CORE wxGetPrinterDC(const wxPrintData& rData);
  56. #endif // wxUSE_PRINTING_ARCHITECTURE
  57. #endif
  58. // _WX_DCPRINT_H_