.\" This is a wxWidgets manpage page generated from the XML docs .TH wxPrinter 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxPrinter \- Class representing the printer .SH DESCRIPTION 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. .SH "PARENTS" wxObject .SH "INCLUDE FILES" wx/print.h .SH MEMBERS .SS wxPrinter (wxPrintDialogData* data = NULL) Constructor. Pass an optional pointer to a block of print dialog data, which will be copied to the printer object's local data. .SS void CreateAbortWindow (wxWindow* parentwxPrintout* printout) Creates the default printing abort window, with a cancel button. .SS bool GetAbort () Returns true if the user has aborted the print job. .SS static wxPrinterError GetLastError () Return last error. Valid after calling Print , PrintDialog or wxPrintPreview::Print . These functions set last error to wxPRINTER_NO_ERROR if no error happened. Returned value is one of the following: wxPRINTER_NO_ERROR No error happened. wxPRINTER_CANCELLED The user cancelled printing. wxPRINTER_ERROR There was an error during printing. .SS wxPrintDialogData& GetPrintDialogData () Returns the print data associated with the printer object. .SS bool Print (wxWindow *parentwxPrintout *printoutbool 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) or the user cancelled printing. Call wxPrinter::GetLastError to get detailed information about the kind of the error. .SS wxDC* PrintDialog (wxWindow *parent) Invokes the print dialog. If successful (the user did not press Cancel and no error occurred), a suitable device context will be returned (otherwise NULL is returned -- call wxPrinter::GetLastError to get detailed information about the kind of the error). The application must delete this device context to avoid a memory leak. .SS void ReportError (wxWindow *parentwxPrintout *printoutconst wxString& message) Default error-reporting function. .SS bool Setup (wxWindow *parent) Invokes the print setup dialog. Note that the setup dialog is obsolete from Windows 95, though retained for backward compatibility. .SH "SEE ALSO" wxObject Printing framework overview wxPrinterDC wxPrintDialog , wxPrintout wxPrintPreview . .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.