gtk.print_dialog
Module for [PrintDialog] class
Types 3
classPrintDialog : gobject.object.ObjectWrap
A [gtk.print_dialog.PrintDialog] 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 [gtk.print_dialog.PrintDialog.setup] function. The actual printing can be done with [gtk.print_dialog.PrintDialog.print] or [gtk.print_dialog.PrintDialog.printFile]. These APIs follows the GIO async pattern, and the results can be obtained by calling the corresponding finish methods.
Methods
PrintDialog self()Returns `this`, for use in `with` statements.PrintDialogGidBuilder builder()Get builder for [gtk.print_dialog.PrintDialog] Returns: New builder objectstring acceptLabel() @propertyGet `acceptLabel` property. Returns: A label that may be shown on the accept button of a print dialog that is presented by [gtk.print_dialog.PrintDialog.setup].void acceptLabel(string propval) @propertySet `acceptLabel` property. Params: propval = A label that may be shown on the accept button of a print dialog that is presented by [gtk.print_dialog.PrintDialog.setup].void modal(bool propval) @propertySet `modal` property. Params: propval = Whether the print dialog is modal.gtk.page_setup.PageSetup pageSetup() @propertyGet `pageSetup` property. Returns: The page setup to use.void pageSetup(gtk.page_setup.PageSetup propval) @propertySet `pageSetup` property. Params: propval = The page setup to use.gtk.print_settings.PrintSettings printSettings() @propertyGet `printSettings` property. Returns: The print settings to use.void printSettings(gtk.print_settings.PrintSettings propval) @propertySet `printSettings` property. Params: propval = The print settings to use.string title() @propertyGet `title` property. Returns: A title that may be shown on the print dialog that is presented by [gtk.print_dialog.PrintDialog.setup].void title(string propval) @propertySet `title` property. Params: propval = A title that may be shown on the print dialog that is presented by [gtk.print_dialog.PrintDialog.setup].string getAcceptLabel()Returns the label that will be shown on the accept button of the print dialog. Returns: the accept labelbool getModal()Returns whether the print dialog blocks interaction with the parent window while it is presented. Returns: whether the print dialog is modalgtk.page_setup.PageSetup getPageSetup()Returns the page setup. Returns: the page setupgtk.print_settings.PrintSettings getPrintSettings()Returns the print settings for the print dialog. Returns: the settingsstring getTitle()Returns the title that will be shown on the print dialog. Returns: the titlevoid print(gtk.window.Window parent = null, gtk.print_setup.PrintSetup setup = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function prints content from a stream.void printFile(gtk.window.Window parent, gtk.print_setup.PrintSetup setup, gio.file.File file, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function prints a file.bool printFileFinish(gio.async_result.AsyncResult result)Finishes the [gtk.print_dialog.PrintDialog.printFile] call and returns the results.gio.output_stream.OutputStream printFinish(gio.async_result.AsyncResult result)Finishes the [gtk.print_dialog.PrintDialog.print] call and returns the results.void setAcceptLabel(string acceptLabel)Sets the label that will be shown on the accept button of the print dialog shown for [gtk.print_dialog.PrintDialog.setup].void setModal(bool modal)Sets whether the print dialog blocks interaction with the parent window while it is presented.void setPageSetup(gtk.page_setup.PageSetup pageSetup)Set the page setup for the print dialog.void setPrintSettings(gtk.print_settings.PrintSettings printSettings)Sets the print settings for the print dialog.void setTitle(string title)Sets the title that will be shown on the print dialog.void setup(gtk.window.Window parent = null, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)This function presents a print dialog to let the user select a printer, and set up print settings and page setup.gtk.print_setup.PrintSetup setupFinish(gio.async_result.AsyncResult result)Finishes the [gtk.print_dialog.PrintDialog.setup] call.Methods
T acceptLabel(string propval)Set `acceptLabel` property. Params: propval = A label that may be shown on the accept button of a print dialog that is presented by [gtk.print_dialog.PrintDialog.setup]. Returns: Builder instance f...T modal(bool propval)Set `modal` property. Params: propval = Whether the print dialog is modal. Returns: Builder instance for fluent chainingT pageSetup(gtk.page_setup.PageSetup propval)Set `pageSetup` property. Params: propval = The page setup to use. Returns: Builder instance for fluent chainingT printSettings(gtk.print_settings.PrintSettings propval)Set `printSettings` property. Params: propval = The print settings to use. Returns: Builder instance for fluent chainingT title(string propval)Set `title` property. Params: propval = A title that may be shown on the print dialog that is presented by [gtk.print_dialog.PrintDialog.setup]. Returns: Builder instance for fluent chainingFluent builder for [gtk.print_dialog.PrintDialog]
Methods
PrintDialog build()