Class: Wx::PRT::Printer

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/prt/printer.rb,
lib/wx/doc/prt/printer.rb

Overview

This class represents the Windows or PostScript printer, and is the vehicle through which printing may be launched by an application.

Printing can also be achieved through using of lower functions and classes, but this and associated classes provide a more convenient and general method of printing.

Category: Printing Framework

See Also:

Requires:

  • USE_PRINTING_ARCHITECTURE

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(data = nil) ⇒ Wx::PRT::Printer

Constructor.

Pass an optional pointer to a block of print dialog data, which will be copied to the printer object’s local data.

Parameters:

See Also:



33
# File 'lib/wx/doc/gen/prt/printer.rb', line 33

def initialize(data=nil) end

Class Method Details

.get_last_errorWx::PrinterError

Return last error.

Valid after calling #print, #print_dialog or Wx::PRT::PrintPreview#print. These functions set last error to Wx::PRT::PrinterError::PRINTER_NO_ERROR if no error happened. Returned value is one of the following:

Wx::PRT::PrinterError::PRINTER_NO_ERROR No error happened.

Wx::PRT::PrinterError::PRINTER_CANCELLED The user cancelled printing.

Wx::PRT::PrinterError::PRINTER_ERROR There was an error during printing.

Returns:

  • (Wx::PrinterError)


91
# File 'lib/wx/doc/gen/prt/printer.rb', line 91

def self.get_last_error; end

Instance Method Details

#create_abort_window(parent, printout) ⇒ Wx::PRT::PrintAbortDialog

Creates the default printing abort window, with a cancel button.

Parameters:

Returns:



39
# File 'lib/wx/doc/gen/prt/printer.rb', line 39

def create_abort_window(parent, printout) end

#get_abortBoolean Also known as: abort

Returns true if the user has aborted the print job.

Returns:

  • (Boolean)


43
# File 'lib/wx/doc/gen/prt/printer.rb', line 43

def get_abort; end

#get_print_dialog_dataWx::PRT::PrintDialogData Also known as: print_dialog_data

Returns (a copy of) the print dialog data of the printer.

Returns:



16
# File 'lib/wx/doc/prt/printer.rb', line 16

def get_print_dialog_data; end

Starts the printing process.

Provide a parent window, a user-defined Wx::PRT::Printout object which controls the printing of a document, and whether the print dialog should be invoked first. #print could return false if there was a problem initializing the printer device context (current printer not set, for example) or the user cancelled printing. Call get_last_error to get detailed information about the kind of the error.

Parameters:

Returns:

  • (Boolean)


54
# File 'lib/wx/doc/gen/prt/printer.rb', line 54

def print(parent, printout, prompt=true) end

Invokes the print dialog.

If successful (the user did not press Cancel and no error occurred), a suitable device context will be returned; otherwise NULL is returned; call get_last_error to get detailed information about the kind of the error.

Remark:

The application must delete this device context to avoid a memory leak.

Parameters:

Returns:



67
# File 'lib/wx/doc/gen/prt/printer.rb', line 67

def print_dialog(parent) end

#report_error(parent, printout, message) ⇒ void

This method returns an undefined value.

Default error-reporting function.

Parameters:



74
# File 'lib/wx/doc/gen/prt/printer.rb', line 74

def report_error(parent, printout, message) end

#set_print_dialog_data(prt_data) ⇒ void Also known as: print_dialog_data=

This method returns an undefined value.

Updates the print dialog data for the printer.

Parameters:



22
# File 'lib/wx/doc/prt/printer.rb', line 22

def set_print_dialog_data(prt_data); end