wxPrintData(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxPrintData πŸ’–

okay bestie, so this is the Erlang module def for wxPrintData β€” it's a whole vibe check for your printers and printer device contexts πŸ–¨οΈβœ¨


🌸 NAME 🌸

wxPrintData β€” literally the class that holds a bunch of info about printers and printer device contexts, no cap πŸ’…


✨ DESCRIPTION ✨

so this class is what you use to create a wxPrinterDC (which, btw, is not implemented in wx πŸ™ˆ) and a wxPostScriptDC. it's also a data member of wxPrintDialogData and wxPageSetupDialogData, and it's part of the mechanism that transfers data between the print dialogs and the application. iconic little middleman behavior 🫢

See also, bestie:

  • Overview printing
  • wxPrintDialog
  • wxPageSetupDialog
  • wxPrintDialogData
  • wxPageSetupDialogData
  • Overview cmndlg
  • wxPostScriptDC

wxWidgets docs: wxPrintData πŸ‘‘


πŸ¦‹ DATA TYPES πŸ¦‹

  • wxPrintData() :: wx:wx_object().

πŸ‘‘ FUNCTIONS πŸ‘‘

destroy(This :: wxPrintData()) -> ok.

Destroys the object πŸ’€ (rip, it's gone, periodt)


getBin(This) -> wx:wx_enum() when This :: wxPrintData().

Returns the current bin (papersource) πŸ—‚οΈ

By default, the system is left to select the bin (wxPRINTBIN_DEFAULT is returned).

See setBin/2 for the full list of bin values.


getCollate(This) -> boolean() when This :: wxPrintData().

Returns true if collation is on. collate girlies stay winning 🌈


getColour(This) -> boolean() when This :: wxPrintData().

Returns true if colour printing is on 🎨 (yes we spell it the fancy way here)


getDuplex(This) -> wx:wx_enum() when This :: wxPrintData().

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL. double-sided printer era πŸ”₯


getNoCopies(This) -> integer() when This :: wxPrintData().

Returns the number of copies requested by the user πŸ“š (yes, plural, go off)


getOrientation(This) -> wx:wx_enum() when This :: wxPrintData().

Gets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT β€” pick your main character pose 🧚


getPaperId(This) -> wx:wx_enum() when This :: wxPrintData().

Returns the paper size id πŸ“„

See: setPaperId/2


getPrinterName(This) -> unicode:charlist() when This :: wxPrintData().

Returns the printer name 🏷️

If the printer name is the empty string, that indicates the default printer should be used.


getQuality(This) -> integer() when This :: wxPrintData().

Returns the current print quality ✨

This can be a positive integer, denoting the number of dots per inch, or one of these identifiers:

  • wxPRINT_QUALITY_HIGH
  • wxPRINT_QUALITY_MEDIUM
  • wxPRINT_QUALITY_LOW
  • wxPRINT_QUALITY_DRAFT

On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting. so yeah, it can switch up on you 😭


isOk(This) -> boolean() when This :: wxPrintData().

Returns true if the print data is valid for using in print dialogs.

This can return false on Windows if the current printer is not set, for example. On all other platforms, it returns true. Windows staying chaotic as usual πŸ’€


new() -> wxPrintData().

Default constructor. fresh start, blank slate, new era 🌱


new(Data) -> wxPrintData() when Data :: wxPrintData().

Copy constructor. it's giving "twin where have you been" πŸ‘―


setBin(This, Flag) -> ok when This :: wxPrintData(), Flag :: wx:wx_enum().

Sets the current bin πŸ—‚οΈ

(the code block, verbatim:)

setBin(This, Flag) -> ok
                when This :: wxPrintData(), Flag :: wx:wx_enum().

setCollate(This, Flag) -> ok when This :: wxPrintData(), Flag :: boolean().

Sets collation to on or off πŸ”›

setCollate(This, Flag) -> ok
                    when This :: wxPrintData(), Flag :: boolean().

setColour(This, Flag) -> ok when This :: wxPrintData(), Flag :: boolean().

Sets colour printing on or off 🎨

setColour(This, Flag) -> ok
                   when This :: wxPrintData(), Flag :: boolean().

setDuplex(This, Mode) -> ok when This :: wxPrintData(), Mode :: wx:wx_enum().

Returns the duplex mode. (yes bestie, the doc really says "returns" here even though it's a setter β€” we report, we don't correct πŸ™ˆ)

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

setDuplex(This, Mode) -> ok
                   when This :: wxPrintData(), Mode :: wx:wx_enum().

setNoCopies(This, N) -> ok when This :: wxPrintData(), N :: integer().

Sets the default number of copies to be printed out πŸ“š

setNoCopies(This, N) -> ok
                     when This :: wxPrintData(), N :: integer().

setOrientation(This, Orientation) -> ok when This :: wxPrintData(), Orientation :: wx:wx_enum().

Sets the orientation. ✨

This can be wxLANDSCAPE or wxPORTRAIT.

setOrientation(This, Orientation) -> ok
                        when
                            This :: wxPrintData(),
                            Orientation :: wx:wx_enum().

setPaperId(This, PaperId) -> ok when This :: wxPrintData(), PaperId :: wx:wx_enum().

Sets the paper id πŸ“„

This indicates the type of paper to be used. For a mapping between paper id, paper size and string name, see wxPrintPaperDatabase in "paper.h" (not yet documented). iykyk, the docs are a mystery bestie πŸ•΅οΈ

setPaperId(This, PaperId) -> ok
                    when This :: wxPrintData(), PaperId :: wx:wx_enum().

setPrinterName(This, PrinterName) -> ok when This :: wxPrintData(), PrinterName :: unicode:chardata().

Sets the printer name 🏷️

This can be the empty string to indicate that the default printer should be used.

setPrinterName(This, PrinterName) -> ok
                        when
                            This :: wxPrintData(),
                            PrinterName :: unicode:chardata().

setQuality(This, Quality) -> ok when This :: wxPrintData(), Quality :: integer().

Sets the desired print quality ✨

This can be a positive integer, denoting the number of dots per inch, or one of these identifiers:

  • wxPRINT_QUALITY_HIGH
  • wxPRINT_QUALITY_MEDIUM
  • wxPRINT_QUALITY_LOW
  • wxPRINT_QUALITY_DRAFT

On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.

setQuality(This, Quality) -> ok
                    when This :: wxPrintData(), Quality :: integer().

πŸ’– that's the whole page bestie, nothing skipped, nothing dropped, every flag and value accounted for. slay.

okay and lastly, the lil sign-off energy: this whole thing is brought to you by Ericsson AB, from the wx 2.6 era, filed under the name wxPrintData πŸ’…βœ¨

πŸ“¦ where this page comes from