wxPrinter(3erl)
okay bestie, this is the wxPrinter page from the Erlang Module Definition docs, and we're gonna make printing in wxWidgets make sense together. π
β¨
π NAME π
wxPrinter β functions for the wxPrinter class
π DESCRIPTION π
This class represents the Windows or PostScript printer, and it's literally the vehicle through which printing may be launched by an application. π¨οΈβ¨
Printing can also be achieved through using lower functions and classes, but this class and its associated classes provide a more convenient and general method of printing.
See: Overview printing, wxPrinterDC (not implemented in wx), wxPrintDialog, wxPrintout, wxPrintPreview
wxWidgets docs: wxPrinter
β¨ DATA TYPES β¨
wxPrinter() = wx:wx_object()
π₯ EXPORTS π₯
new() -> wxPrinter()
Constructor.
new(Options :: [Option]) -> wxPrinter()
Types:
Option = {data, wxPrintDialogData:wxPrintDialogData()}
Constructor.
Pass an optional pointer to a block of print dialog data, which will be copied to the printer object's local data.
See: wxPrintDialogData, wxPrintData
createAbortWindow(This, Parent, Printout) -> wxDialog:wxDialog()
Types:
This = wxPrinter()
Parent = wxWindow:wxWindow()
Printout = wxPrintout:wxPrintout()
Creates the default printing abort window, with a cancel button. ππͺ
getAbort(This) -> boolean()
Types:
This = wxPrinter()
Returns true if the user has aborted the print job.
getLastError() -> wx:wx_enum()
Return last error. β οΈ
Valid after calling print/4, printDialog/2 or wxPrintPreview:print/2.
These functions set last error to wxPRINTER_NO_ERROR if no error happened.
Returned value is one of the following:
getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData()
Types:
This = wxPrinter()
Returns the print data associated with the printer object.
print(This, Parent, Printout) -> boolean()
Types:
This = wxPrinter()
Parent = wxWindow:wxWindow()
Printout = wxPrintout:wxPrintout()
print(This, Parent, Printout, Options :: [Option]) -> boolean()
Types:
This = wxPrinter()
Parent = wxWindow:wxWindow()
Printout = wxPrintout:wxPrintout()
Option = {prompt, boolean()}
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/4 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 getLastError/0 to get detailed information about the kind of the error.
printDialog(This, Parent) -> wxDC:wxDC()
Types:
This = wxPrinter()
Parent = wxWindow:wxWindow()
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 getLastError/0 to get detailed information about the kind of the error.
Remark: The application must delete this device context to avoid a memory leak. π«Άβ οΈ
reportError(This, Parent, Printout, Message) -> ok
Types:
This = wxPrinter()
Parent = wxWindow:wxWindow()
Printout = wxPrintout:wxPrintout()
Message = unicode:chardata()
Default error-reporting function.
setup(This, Parent) -> boolean()
Types:
This = wxPrinter()
Parent = wxWindow:wxWindow()
Invokes the print setup dialog.
Deprecated: The setup dialog is obsolete, though retained for backward compatibility. π
destroy(This :: wxPrinter()) -> ok
Destroys the object.
made with π by the wxWidgets team β source/version: wx 2.2.2.1, manual: wxPrinter(3erl). Date: not printed on the original footer, so I'm not inventing one, bestie ππ. Bye and go print something iconic π¨οΈβ¨π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms