wxPrintDialog(3erl)

πŸŽ€ NAME πŸŽ€

wxPrintDialog β€” Functions for wxPrintDialog class

okay so this is the wxPrintDialog(3erl) page from the Erlang Module Definition manual, and it’s literally all about the wxPrintDialog class. bestie, we’re doing this. πŸ’…

πŸ’– DESCRIPTION πŸ’–

This class represents the print and print setup common dialogs. You can get a wxPrinterDC device context from a print dialog that was successfully dismissed β€” and yes, the original says wxPrinterDC is (not implemented in wx), so keep that in mind. πŸ–¨οΈβœ¨

πŸ‘€ See: Overview printing, Overview cmndlg.

This class is derived (and can use functions) from: wxDialog, wxTopLevelWindow, wxWindow, wxEvtHandler. slay, inheritance chain.

The wxWidgets docs reference is: wxPrintDialog.

🌸 DATA TYPES 🌸

  • wxPrintDialog() = wx:wx_object() β€” that’s the type, no cap.

✨ EXPORTS ✨

🫢 new/1

new(Parent) -> wxPrintDialog()

Types:

  • Parent = wxWindow:wxWindow()

🫢 new/2 β€” the Options one

new(Parent, Options :: [Option]) -> wxPrintDialog()

This is the clause where Options is typed as [Option]. The original doesn’t list separate Types for this one, so I’m not gonna invent them. πŸ™ˆ

🫢 new/2 β€” the Data one

new(Parent, Data) -> wxPrintDialog()

Types:

  • Parent = wxWindow:wxWindow()
  • Data = wxPrintData:wxPrintData()

πŸ’€ destroy/1

destroy(This :: wxPrintDialog()) -> ok

Destructor. The tea: if getPrintDC/1 has not been called, the device context obtained by the dialog (if any) will be deleted. So yeah, that’s a whole thing. 🫑

πŸ”₯ getPrintDialogData/1

getPrintDialogData(This) -> wxPrintDialogData:wxPrintDialogData()

Types:

  • This = wxPrintDialog()

Returns the print dialog data associated with the print dialog. It’s giving β€œhand me the data, bestie.” πŸ“‹βœ¨

πŸ‘‘ getPrintDC/1

getPrintDC(This) -> wxDC:wxDC()

Types:

  • This = wxPrintDialog()

Returns the device context created by the print dialog, if any.

⚠️ important caveat: when this function has been called, the ownership of the device context is transferred to the application, so it must then be deleted explicitly. no take-backs, bestie. 😭

okay final sign-off: this was the wxPrintDialog(3erl) page, sourced from the wxWidgets team. at version wx 2.2.2.1. The original footer line doesn’t actually give a date, so I’m not making one up β€” periodt. bye bestie πŸ«ΆπŸ’–πŸŽ€

πŸ“¦ where this page comes from