1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-01-21 16:38:51 -05:00
|
|
|
// Name: wx/msw/dcprint.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxPrinterDC class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2005-12-24 21:34:42 -05:00
|
|
|
#ifndef _WX_MSW_DCPRINT_H_
|
|
|
|
#define _WX_MSW_DCPRINT_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-06-13 18:54:04 -04:00
|
|
|
#if wxUSE_PRINTING_ARCHITECTURE
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
#include "wx/dc.h"
|
1999-03-25 18:06:01 -05:00
|
|
|
#include "wx/cmndata.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2001-04-08 21:22:48 -04:00
|
|
|
class WXDLLEXPORT wxPrinterDC : public wxDC
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
1999-03-25 18:06:01 -05:00
|
|
|
public:
|
|
|
|
// Create a printer DC (obsolete function: use wxPrintData version now)
|
2004-08-24 06:31:41 -04:00
|
|
|
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = true, int orientation = wxPORTRAIT);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
// Create from print data
|
|
|
|
wxPrinterDC(const wxPrintData& data);
|
|
|
|
|
|
|
|
wxPrinterDC(WXHDC theDC);
|
|
|
|
|
2000-01-21 16:38:51 -05:00
|
|
|
// override some base class virtuals
|
|
|
|
virtual bool StartDoc(const wxString& message);
|
|
|
|
virtual void EndDoc();
|
|
|
|
virtual void StartPage();
|
|
|
|
virtual void EndPage();
|
1999-03-25 18:06:01 -05:00
|
|
|
|
|
|
|
protected:
|
2000-01-21 16:38:51 -05:00
|
|
|
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
2004-08-24 06:31:41 -04:00
|
|
|
bool useMask = false);
|
2000-01-21 16:38:51 -05:00
|
|
|
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
|
|
|
|
wxCoord width, wxCoord height,
|
|
|
|
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
2004-08-24 06:31:41 -04:00
|
|
|
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
2005-12-24 21:34:42 -05:00
|
|
|
virtual void DoGetSize(int *w, int *h) const
|
|
|
|
{
|
|
|
|
GetDeviceSize(w, h);
|
|
|
|
}
|
|
|
|
|
2000-01-21 16:38:51 -05:00
|
|
|
|
2001-04-08 21:22:48 -04:00
|
|
|
// init the dc
|
|
|
|
void Init();
|
|
|
|
|
1999-03-25 18:06:01 -05:00
|
|
|
wxPrintData m_printData;
|
2001-04-08 21:22:48 -04:00
|
|
|
|
|
|
|
private:
|
2003-07-21 20:24:07 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPrinterDC)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// Gets an HDC for the default printer configuration
|
1999-03-25 18:06:01 -05:00
|
|
|
// WXHDC WXDLLEXPORT wxGetPrinterDC(int orientation);
|
|
|
|
|
|
|
|
// Gets an HDC for the specified printer configuration
|
|
|
|
WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& data);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-06-13 18:54:04 -04:00
|
|
|
#endif // wxUSE_PRINTING_ARCHITECTURE
|
|
|
|
|
2005-12-24 21:34:42 -05:00
|
|
|
#endif // _WX_MSW_DCPRINT_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|