.TH wxPrinter 3erl "wx 2.4.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxPrinter \- Functions for wxPrinter class .SH DESCRIPTION .LP This class represents the Windows or PostScript printer, and is the vehicle through which printing may be launched by an application\&. .LP 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\&. .LP See: Overview printing, \fIwxPrinterDC\fR\& (not implemented in wx), \fIwxPrintDialog\fR\&, \fIwxPrintout\fR\&, \fIwxPrintPreview\fR\& .LP wxWidgets docs: wxPrinter .SH DATA TYPES .nf \fBwxPrinter()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxPrinter() .br .fi .br .LP .nf .B new(Options :: [Option]) -> wxPrinter() .br .fi .br .RS .LP Types: .RS 3 Option = {data, wxPrintDialogData:wxPrintDialogData()} .br .RE .RE .RS .LP Constructor\&. .LP Pass an optional pointer to a block of print dialog data, which will be copied to the printer object\&'s local data\&. .LP See: \fIwxPrintDialogData\fR\&, \fIwxPrintData\fR\& .RE .LP .nf .B createAbortWindow(This, Parent, Printout) -> wxDialog:wxDialog() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br Parent = wxWindow:wxWindow() .br Printout = wxPrintout:wxPrintout() .br .RE .RE .RS .LP Creates the default printing abort window, with a cancel button\&. .RE .LP .nf .B getAbort(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br .RE .RE .RS .LP Returns true if the user has aborted the print job\&. .RE .LP .nf .B getLastError() -> wx:wx_enum() .br .fi .br .RS .LP Return last error\&. .LP Valid after calling \fIprint/4\fR\&, \fIprintDialog/2\fR\& or \fIwxPrintPreview:print/2\fR\&\&. .LP These functions set last error to \fIwxPRINTER_NO_ERROR\fR\& if no error happened\&. .LP Returned value is one of the following: .RE .LP .nf .B getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br .RE .RE .RS .LP Returns the print data associated with the printer object\&. .RE .LP .nf .B print(This, Parent, Printout) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br Parent = wxWindow:wxWindow() .br Printout = wxPrintout:wxPrintout() .br .RE .RE .LP .nf .B print(This, Parent, Printout, Options :: [Option]) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br Parent = wxWindow:wxWindow() .br Printout = wxPrintout:wxPrintout() .br Option = {prompt, boolean()} .br .RE .RE .RS .LP Starts the printing process\&. .LP Provide a parent window, a user-defined \fIwxPrintout\fR\& object which controls the printing of a document, and whether the print dialog should be invoked first\&. .LP \fIprint/4\fR\& 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 \fIgetLastError/0\fR\& to get detailed information about the kind of the error\&. .RE .LP .nf .B printDialog(This, Parent) -> wxDC:wxDC() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br Parent = wxWindow:wxWindow() .br .RE .RE .RS .LP Invokes the print dialog\&. .LP If successful (the user did not press Cancel and no error occurred), a suitable device context will be returned; otherwise NULL is returned; call \fIgetLastError/0\fR\& to get detailed information about the kind of the error\&. .LP Remark: The application must delete this device context to avoid a memory leak\&. .RE .LP .nf .B reportError(This, Parent, Printout, Message) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br Parent = wxWindow:wxWindow() .br Printout = wxPrintout:wxPrintout() .br Message = unicode:chardata() .br .RE .RE .RS .LP Default error-reporting function\&. .RE .LP .nf .B setup(This, Parent) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxPrinter() .br Parent = wxWindow:wxWindow() .br .RE .RE .RS .LP Invokes the print setup dialog\&. .LP Deprecated: The setup dialog is obsolete, though retained for backward compatibility\&. .RE .LP .nf .B destroy(This :: wxPrinter()) -> ok .br .fi .br .RS .LP Destroys the object\&. .RE