wxPrintData — wx v2.4.2

Search documentation of wx

# View Source wxPrintData (wx v2.4.2)

Functions for wxPrintData class

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: Overview printing, `wxPrintDialog`, `wxPageSetupDialog`, `wxPrintDialogData`, `wxPageSetupDialogData`, Overview cmndlg, `wxPrinterDC` (not implemented in wx), `wxPostScriptDC`

wxWidgets docs: wxPrintData

# Summary

## Types

wxPrintData()

## Functions

destroy(This)

Destructor.

getBin(This)

Returns the current bin (papersource).

getCollate(This)

Returns true if collation is on.

getColour(This)

Returns true if colour printing is on.

getDuplex(This)

Returns the duplex mode.

getNoCopies(This)

Returns the number of copies requested by the user.

getOrientation(This)

Gets the orientation.

getPaperId(This)

Returns the paper size id.

getPrinterName(This)

Returns the printer name.

getQuality(This)

Returns the current print quality.

isOk(This)

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

new()

Default constructor.

new(Data)

Copy constructor.

setBin(This, Flag)

Sets the current bin.

setCollate(This, Flag)

Sets collation to on or off.

setColour(This, Flag)

Sets colour printing on or off.

setDuplex(This, Mode)

Returns the duplex mode.

setNoCopies(This, N)

Sets the default number of copies to be printed out.

setOrientation(This, Orientation)

Sets the orientation.

setPaperId(This, PaperId)

Sets the paper id.

setPrinterName(This, PrinterName)

Sets the printer name.

setQuality(This, Quality)

Sets the desired print quality.

# Types

Link to this type

# wxPrintData()

View Source

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

# Functions

Link to this function

# destroy(This)

View Source

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

Destructor.

Link to this function

# getBin(This)

View Source

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

Link to this function

# getCollate(This)

View Source

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

Returns true if collation is on.

Link to this function

# getColour(This)

View Source

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

Returns true if colour printing is on.

Link to this function

# getDuplex(This)

View Source

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

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

Link to this function

# getNoCopies(This)

View Source

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

Returns the number of copies requested by the user.

Link to this function

# getOrientation(This)

View Source

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

Gets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT.

Link to this function

# getPaperId(This)

View Source

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

Returns the paper size id.

See: `setPaperId/2`

Link to this function

# getPrinterName(This)

View Source

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

Returns the printer name.

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

Link to this function

# getQuality(This)

View Source

    -spec 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 the following identifiers:

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

Link to this function

# isOk(This)

View Source

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

Link to this function

# new()

View Source

    -spec new() -> wxPrintData().

Default constructor.

Link to this function

# new(Data)

View Source

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

Copy constructor.

Link to this function

# setBin(This, Flag)

View Source

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

Sets the current bin.

Link to this function

# setCollate(This, Flag)

View Source

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

Sets collation to on or off.

Link to this function

# setColour(This, Flag)

View Source

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

Sets colour printing on or off.

Link to this function

# setDuplex(This, Mode)

View Source

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

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

Link to this function

# setNoCopies(This, N)

View Source

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

Sets the default number of copies to be printed out.

Link to this function

# setOrientation(This, Orientation)

View Source

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

Sets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT.

Link to this function

# setPaperId(This, PaperId)

View Source

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

See: `SetPaperSize()` (not implemented in wx)

Link to this function

# setPrinterName(This, PrinterName)

View Source

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

Link to this function

# setQuality(This, Quality)

View Source

    -spec 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 the following identifiers:

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