wxRuby Documentation Home

# Wx::PrintDialog

This class represents the print and print setup common dialogs.
You may obtain a PrinterDC device context from
a successfully dismissed print dialog.

## Derived from

Dialog

Window

EvtHandler

Object

## See also

PrintDialog Overview

## Methods

- PrintDialog.new
- PrintDialog#get_print_dialog_data
- PrintDialog#get_print_dc
- PrintDialog#show_modal

### PrintDialog.new

PrintDialog.new(%(arg-type)Window% parent, PrintDialogData data = nil)

Constructor. Pass a parent window, and optionally a pointer to a block of print
data, which will be copied to the print dialog’s print data.

#### See also

PrintDialogData

destructor()

Destructor. If PrintDialog::GetPrintDC has not been called,
the device context obtained by the dialog (if any) will be deleted.

### PrintDialog#get_print_dialog_data

PrintDialogData get_print_dialog_data()

Returns the print dialog data associated with the print dialog.

### PrintDialog#get_print_dc

“DC* ":dc* .html get_print_dc()

Returns the device context created by the print dialog, if any.
When this function has been called, the ownership of the device context
is transferred to the application, so it must then be deleted
explicitly.

### PrintDialog#show_modal

Integer show_modal()

Shows the dialog, returning ID_OK if the user pressed OK, and ID_CANCEL
otherwise. After this function is called, a device context may
be retrievable using PrintDialog#get_print_dc.

[This page automatically generated from the Textile source at 2023-06-09 00:45:25 +0000]