PrintDialog
Object Hierarchy:
Gtk.PrintDialog
Gtk.PrintDialog
Gtk.PrintDialog
GLib.Object
GLib.Object
GLib.Object->Gtk.PrintDialog
Description:
[ CCode ( type_id = "gtk_print_dialog_get_type ()" ) ] [ Version ( since = "4.14" ) ]public sealed class PrintDialog : Object
A `GtkPrintDialog` object collects the arguments that are needed to present a print dialog to the user, such as a title for the dialog
and whether it should be modal.
The dialog is shown with the [method@Gtk.PrintDialog.setup] function. The actual printing can be done with [method@Gtk.PrintDialog.print]
or [method@Gtk.PrintDialog.print_file]. These APIs follows the GIO async pattern, and the results can be obtained by calling the
corresponding finish methods.
Content:
Properties:
public string accept_label { get ; set ; }
A label that may be shown on the accept button of a print dialog that
is presented by [method@Gtk.
public bool modal { get ; set ; }
Whether the print dialog is modal.
public PageSetup page_setup { get ; set ; }
The page setup to use.
public PrintSettings print_settings { get ; set ; }
The print settings to use.
public string title { get ; set ; }
A title that may be shown on the print dialog that is presented by [
method@Gtk.
Creation methods:
Methods:
public unowned string get_accept_label ()
Returns the label that will be shown on the accept button of the print
dialog.
public bool get_modal ()
Returns whether the print dialog blocks interaction with the parent
window while it is presented.
public unowned PageSetup get_page_setup ()
Returns the page setup.
public unowned PrintSettings get_print_settings ()
Returns the print settings for the print dialog.
public unowned string get_title ()
Returns the title that will be shown on the print dialog.
public async OutputStream ? print (Window ? parent, PrintSetup ? setup, Cancellable ? cancellable) throws Error
This function prints content from a stream.
public async bool print_file (Window ? parent, PrintSetup ? setup, File file, Cancellable ? cancellable) throws Error
This function prints a file.
public void set_accept_label (string accept_label)
Sets the label that will be shown on the accept button of the print
dialog shown for [method@Gtk.
public void set_modal (bool modal)
Sets whether the print dialog blocks interaction with the parent
window while it is presented.
public void set_page_setup (PageSetup page_setup)
Set the page setup for the print dialog.
public void set_print_settings (PrintSettings print_settings)
Sets the print settings for the print dialog.
public void set_title (string title)
Sets the title that will be shown on the print dialog.
public async PrintSetup ? setup (Window ? parent, Cancellable ? cancellable) throws Error
This function presents a print dialog to let the user select a
printer, and set up print settings and page setup.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref