wxPrintDialog(3)
β¨ NAME β¨
wxPrintDialog β okay so this is the class that represents the print and print setup common dialogs. That's it, that's the whole name line, bestie. π
πΈ DESCRIPTION πΈ
So here's the tea: you can get yourself a wxPrinterDC device context (which is not implemented in wx, jsyk) out of a print dialog that was successfully dismissed. Slay. π
See also, because you're gonna wanna wander:
- Overview printing
- Overview cmndlg
This class is derived from the following, and can use their functions too β it's giving nepo baby but make it inheritance π:
wxDialogwxTopLevelWindowwxWindowwxEvtHandler
Also, for the record: wxWidgets docs: wxPrintDialog. π
π¦ DATA TYPES π¦
wxPrintDialog() :: wx:wx_object().
π«Ά FUNCTIONS π«Ά
destroy/1
destroy(This :: wxPrintDialog()) -> ok.
Destroys the object. That's the whole vibe. π
getPrintDC/1
getPrintDC(This) -> wxDC:wxDC() when This :: wxPrintDialog().
Returns the device context that the print dialog created, if any β like, it might not exist, so don't come for me. π€·
β οΈ Real talk: once you've called this function, the ownership of that device context is transferred to the application. So you have to delete it explicitly yourself. No takebacks, no cleanup fairy, it's on you. π§
getPrintDialogData/1
getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData()
when This :: wxPrintDialog().
Returns the print dialog data that's associated with the print dialog. Lowkey straightforward. β¨
new/2
Two whole ways to call this one, and the manpage gives you zero prose, so here's the shape of it, exactly as written:
new(Parent, [Option]) -> wxPrintDialog()
when
Parent :: wxWindow:wxWindow(),
Option :: {data, wxPrintDialogData:wxPrintDialogData()};
(Parent, Data) -> wxPrintDialog()
when
Parent :: wxWindow:wxWindow(),
Data :: wxPrintData:wxPrintData().
Note the plot twist: the first clause takes an option tuple tagged data holding a wxPrintDialogData:wxPrintDialogData(), and the second clause takes a Data that is a wxPrintData:wxPrintData(). Two different types, two different clauses, iconic behavior honestly. π
And that's the whole page! Mwah. π
This lil manual page came to you from Ericsson AB, for wx 2.6, and it's the wxPrintDialog(3) page. Go print something, main character. π¨οΈπ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms