Crea  Modifica  FrontPage  Indici  Cerca  Ultime modifiche  History  RSS  Login

Gtk::PrintUnixDialog

class Gtk::PrintUnixDialog

Gtk::PrintUnixDialog implements a print dialog for platforms which don't provide a native print dialog, like Unix. It can be used very much like any other GTK+ dialog, at the cost of the portability offered by Gtk::PrintOperation

In order to print something with Gtk::PrintUnixDialog, you need to use Gtk::PrintUnixDialog#selected_printer to obtain a Gtk::Printer object and use it to construct a Gtk::PrintJob using Gtk::PrintJob.new.

Gtk:PrintUnixDialog uses the following response values:

Class Methods

Gtk::PrintUnixDialog.new(title=nil, parent=nil)
Creates a new Gtk::PrintUnixDialog. Since 2.10
  • title: Title of the dialog, or nil
  • parent: Transient parent of the dialog, or nil
  • Returns: a new Gtk::PrintUnixDialog

Instance Methods

add_custom_tab(child, tab_label)
Adds a custom tab to the print dialog. Since 2.10
manual_capability=(capabilities)
This lets you specify the printing capabilities your application supports. For instance, if you can handle scaling the output then you pass Gtk::PrintUnixDialog::CAPABILITY_SCALE. If you don't pass that, then the dialog will only let you select the scale if the printing system automatically handles scaling. Since 2.10
set_manual_capability(capabilities)
Same as manual_capabilities=. Since 2.10
settings
Gets a new Gtk::PrintSettings object that represents the current values in the print dialog. Note that this creates a new object. Since 2.10
settings=(settings)
Sets the Gtk::PrintSettings for the Gtk::PrintUnixDialog. Typically, this is used to restore saved print settings from a previous print operation before the print dialog is shown. Since 2.10
set_settings(settings)
Same as #settings=. Since 2.10
current_page
Gets the current page in the document. Since 2.10
  • Returns: The current page in the document
current_page=(current_page)
Sets the current page in the document. Since 2.10
  • current_page: The current page in the document
  • Returns: current_page
set_current_page(current_page)
Same as current_page=. Since 2.10
  • current_page: The current page in the document
  • Returns: self
page_setup
Gets the Gtk::PageSetup to use. Since 2.10
page_setup=(page_setup)
Sets the Gtk::PageSetup to use. Since 2.10
set_page_setup(page_setup)
Same as page_setup=. Since 2.10
print_settings
Gets the Gtk::PrintSettings used for initializing the dialog. Since 2.10
print_settings=(print_settings)
Sets the Gtk::PrintSettings used for initializing the dialog. Since 2.10
  • print_settings: The Gtk::PrintSettings used for initializing the dialog
  • Returns: print_settings
set_print_settings(print_settings)
Same as print_settings=. Since 2.10
selected_printer
Gets the Gtk::Printer which is selected. Since 2.10

Constants

Capabilities

An enum for specifying which features the print dialog should offer. I neither Gtk::PrintUnixDialog#CAPABILITY_GENERATE_PDF nor Gtk::PrintUnixDialog#CAPABILITY_GENERATE_PS is specified, GTK+ assumes that all formats are supported.

CAPABILITY_PAGE_SET
CAPABILITY_COPIES
CAPABILITY_COLLATE
CAPABILITY_REVERSE
CAPABILITY_SCALE
CAPABILITY_GENERATE_PDF
The program will send the document to the printer in PDF format
CAPABILITY_GENERATE_PS
The program will send the document to the printer in Postscript format
CAPABILITY_PREVIEW

ChangeLog

  • 2006-11-04: Modified. - Masao
  • 2006-07-09: updated for 2.10. - kou?

- kou?

Ultima modifica:2006/11/04 04:24:24
Parola chiave:
Referenze:[Gtk::PrintOperation] [Gtk::PrintUnixDialog] [Gtk::PrintCapabilities] [Gtk::Printer]