wxPrintData (wx v2.5.4)

Copy Markdown View Source

This class holds a variety of information related to printers and printer device contexts.

This class is used to create a wxPrinterDC (not implemented in wx) and a wxPostScriptDC. It is also used as a data member of wxPrintDialogData and wxPageSetupDialogData, as part of the mechanism for transferring data between the print dialogs and the application.

See:

wxWidgets docs: wxPrintData

Summary

Functions

Destroys the object

Returns the current bin (papersource).

Returns true if collation is on.

Returns true if colour printing is on.

Returns the duplex mode.

Returns the number of copies requested by the user.

Gets the orientation.

Returns the paper size id.

Returns the printer name.

Returns the current print quality.

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

Default constructor.

Copy constructor.

Sets the current bin.

Sets collation to on or off.

Sets colour printing on or off.

Returns the duplex mode.

Sets the default number of copies to be printed out.

Sets the orientation.

Sets the paper id.

Sets the printer name.

Sets the desired print quality.

Types

wxPrintData()

-type wxPrintData() :: wx:wx_object().

Functions

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

Destroys the object

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

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 :: wxPrintData()) -> boolean()

Returns true if collation is on.

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

Returns true if colour printing is on.

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

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

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

Returns the number of copies requested by the user.

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

Gets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT.

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

Returns the paper size id.

See: setPaperId/2

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

Returns the printer name.

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

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

Returns the current print quality.

This can be a positive integer, denoting the number of dots per inch, or one of the following 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.

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

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.

new() -> wxPrintData()

Default constructor.

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

Copy constructor.

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

Sets the current bin.

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

Sets collation to on or off.

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

Sets colour printing on or off.

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

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

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

Sets the default number of copies to be printed out.

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

Sets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT.

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

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).

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

Sets the printer name.

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

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

Sets the desired print quality.

This can be a positive integer, denoting the number of dots per inch, or one of the following 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.