Class: Gtk::PrintDialog
- Inherits:
-
Object
- Object
- Gtk::PrintDialog
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#accept_label ⇒ String
A label that may be shown on the accept button of a print dialog that is presented by [methodGtk.PrintDialog.setup].
-
#accept_label=(accept_label) ⇒ String
A label that may be shown on the accept button of a print dialog that is presented by [methodGtk.PrintDialog.setup].
-
#initialize ⇒ Gtk::PrintDialog
constructor
Creates a new
GtkPrintDialogobject. -
#modal ⇒ Boolean
Returns whether the print dialog blocks interaction with the parent window while it is presented.
-
#modal=(modal) ⇒ Boolean
Whether the print dialog is modal.
-
#modal? ⇒ Boolean
Whether the print dialog is modal.
-
#page_setup ⇒ Gtk::PageSetup
The page setup to use.
-
#page_setup=(page_setup) ⇒ Gtk::PageSetup
The page setup to use.
-
#print(parent, setup, cancellable, callback, user_data) ⇒ nil
This function prints content from a stream.
-
#print_file(parent, setup, file, cancellable, callback, user_data) ⇒ nil
This function prints a file.
-
#print_file_finish(result) ⇒ Boolean
Finishes the [methodGtk.PrintDialog.print_file] call and returns the results.
-
#print_finish(result) ⇒ Gio::OutputStream
Finishes the [methodGtk.PrintDialog.print] call and returns the results.
-
#print_settings ⇒ Gtk::PrintSettings
The print settings to use.
-
#print_settings=(print_settings) ⇒ Gtk::PrintSettings
The print settings to use.
-
#setup(parent, cancellable, callback, user_data) ⇒ nil
This function presents a print dialog to let the user select a printer, and set up print settings and page setup.
-
#setup_finish(result) ⇒ Gtk::PrintSetup
Finishes the [methodGtk.PrintDialog.setup] call.
-
#title ⇒ String
A title that may be shown on the print dialog that is presented by [methodGtk.PrintDialog.setup].
-
#title=(title) ⇒ String
A title that may be shown on the print dialog that is presented by [methodGtk.PrintDialog.setup].
Constructor Details
#initialize ⇒ Gtk::PrintDialog
Creates a new GtkPrintDialog object.
Instance Method Details
#accept_label ⇒ String
A label that may be shown on the accept button of a print dialog that is presented by [methodGtk.PrintDialog.setup].
#accept_label=(accept_label) ⇒ String
A label that may be shown on the accept button of a print dialog that is presented by [methodGtk.PrintDialog.setup].
#modal ⇒ Boolean
Returns whether the print dialog blocks interaction with the parent window while it is presented.
#modal=(modal) ⇒ Boolean
Whether the print dialog is modal.
#modal? ⇒ Boolean
Whether the print dialog is modal.
#page_setup ⇒ Gtk::PageSetup
The page setup to use.
#page_setup=(page_setup) ⇒ Gtk::PageSetup
The page setup to use.
#print(parent, setup, cancellable, callback, user_data) ⇒ nil
This function prints content from a stream.
If you pass NULL as setup, then this method will present a print dialog.
Otherwise, it will attempt to print directly, without user interaction.
The callback will be called when the printing is done. It should call [methodGtk.PrintDialog.print_finish] to obtain the results.
#print_file(parent, setup, file, cancellable, callback, user_data) ⇒ nil
This function prints a file.
If you pass NULL as setup, then this method will present a print dialog.
Otherwise, it will attempt to print directly, without user interaction.
The callback will be called when the printing is done. It should call [methodGtk.PrintDialog.print_file_finish] to obtain the results.
#print_file_finish(result) ⇒ Boolean
Finishes the [methodGtk.PrintDialog.print_file] call and returns the results.
#print_finish(result) ⇒ Gio::OutputStream
Finishes the [methodGtk.PrintDialog.print] call and returns the results.
If the call was successful, the content to be printed should be
written to the returned output stream. Otherwise, NULL is returned.
The overall results of the print operation will be returned in the [methodGio.OutputStream.close] call, so if you are interested in the results, you need to explicitly close the output stream (it will be closed automatically if you just unref it). Be aware that the close call may not be instant as it operation will for the printer to finish printing.
#print_settings ⇒ Gtk::PrintSettings
The print settings to use.
#print_settings=(print_settings) ⇒ Gtk::PrintSettings
The print settings to use.
#setup(parent, cancellable, callback, user_data) ⇒ nil
This function presents a print dialog to let the user select a printer, and set up print settings and page setup.
The callback will be called when the dialog is dismissed. It should call [methodGtk.PrintDialog.setup_finish] to obtain the results in the form of a [structGtk.PrintSetup], that can then be passed to [methodGtk.PrintDialog.print] or [methodGtk.PrintDialog.print_file].
One possible use for this method is to have the user select a printer, then show a page setup UI in the application (e.g. to arrange images on a page), then call [methodGtk.PrintDialog.print] on self to do the printing without further user interaction.
#setup_finish(result) ⇒ Gtk::PrintSetup
Finishes the [methodGtk.PrintDialog.setup] call.
If the call was successful, it returns a [structGtk.PrintSetup] which contains the print settings and page setup information that will be used to print.
#title ⇒ String
A title that may be shown on the print dialog that is presented by [methodGtk.PrintDialog.setup].
#title=(title) ⇒ String
A title that may be shown on the print dialog that is presented by [methodGtk.PrintDialog.setup].