1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: printwin.h
|
|
|
|
// Purpose: wxWindowsPrinter, wxWindowsPrintPreview classes
|
|
|
|
// 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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_PRINTWIN_H_
|
|
|
|
#define _WX_PRINTWIN_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#include "wx/prntbase.h"
|
|
|
|
|
1999-04-02 17:30:56 -05:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// Represents the printer: manages printing a wxPrintout object
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxWindowsPrinter : public wxPrinterBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
1999-04-02 17:30:56 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowsPrinter)
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-04-02 17:30:56 -05:00
|
|
|
public:
|
|
|
|
wxWindowsPrinter(wxPrintDialogData *data = NULL);
|
|
|
|
virtual ~wxWindowsPrinter();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-04-02 17:30:56 -05:00
|
|
|
virtual bool Print(wxWindow *parent,
|
|
|
|
wxPrintout *printout,
|
2004-08-31 08:38:46 -04:00
|
|
|
bool prompt = true);
|
2006-10-27 09:07:40 -04:00
|
|
|
|
|
|
|
virtual wxDC *PrintDialog(wxWindow *parent);
|
1999-04-02 17:30:56 -05:00
|
|
|
virtual bool Setup(wxWindow *parent);
|
1998-08-28 07:00:50 -04:00
|
|
|
|
1999-04-02 17:30:56 -05:00
|
|
|
private:
|
|
|
|
WXFARPROC m_lpAbortProc;
|
2003-01-02 18:38:11 -05:00
|
|
|
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxWindowsPrinter);
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
1999-04-02 17:30:56 -05:00
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// wxPrintPreview: programmer creates an object of this class to preview a
|
|
|
|
// wxPrintout.
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxWindowsPrintPreview : public wxPrintPreviewBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
1999-04-02 17:30:56 -05:00
|
|
|
public:
|
|
|
|
wxWindowsPrintPreview(wxPrintout *printout,
|
|
|
|
wxPrintout *printoutForPrinting = NULL,
|
|
|
|
wxPrintDialogData *data = NULL);
|
|
|
|
wxWindowsPrintPreview(wxPrintout *printout,
|
|
|
|
wxPrintout *printoutForPrinting,
|
|
|
|
wxPrintData *data);
|
|
|
|
virtual ~wxWindowsPrintPreview();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-04-02 17:30:56 -05:00
|
|
|
virtual bool Print(bool interactive);
|
|
|
|
virtual void DetermineScaling();
|
2003-07-21 20:24:07 -04:00
|
|
|
|
2008-06-16 04:41:51 -04:00
|
|
|
protected:
|
|
|
|
virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
|
|
|
|
|
2003-07-21 20:24:07 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-04-02 17:30:56 -05:00
|
|
|
// _WX_PRINTWIN_H_
|