This class represents the Windows or PostScript printer, and is the vehicle through which printing may be launched by an application. Printing can also be achieved through using of lower functions and classes, but this and associated classes provide a more convenient and general method of printing.
Derived from
Include files
<wx/print.h>
See also
Printing framework overview, wxPrinterDC, wxPrintDialog, wxPrintout, wxPrintPreview.
Members
wxPrinter::wxPrinter
wxPrinter::~wxPrinter
wxPrinter::Abort
wxPrinter::CreateAbortWindow
wxPrinter::GetPrintData
wxPrinter::Print
wxPrinter::PrintDialog
wxPrinter::ReportError
wxPrinter::Setup
wxPrinter(wxPrintData* data = NULL)
Constructor. Pass an optional pointer to a block of print data, which will be copied to the printer object's print data.
See also
~wxPrinter()
Destructor.
bool Abort()
Returns TRUE if the user has aborted the print job.
void CreateAbortWindow(wxWindow* parent, wxPrintout* printout)
Creates the default printing abort window, with a cancel button.
wxPrintData& GetPrintData()
Returns the print data associated with the printer object.
bool Print(wxWindow *parent, wxPrintout *printout, bool prompt=TRUE)
Starts the printing process. Provide a parent window, a user-defined wxPrintout object which controls the printing of a document, and whether the print dialog should be invoked first.
Print could return FALSE if there was a problem initializing the printer device context (current printer not set, for example).
bool PrintDialog(wxWindow *parent)
Invokes the print dialog.
void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message)
Default error-reporting function.
void Setup(wxWindow *parent)
Invokes the print setup dialog. Note that the setup dialog is obsolete from Windows 95, though retained for backward compatibility.