PrintDialog

open class PrintDialog(val gtkPrintDialogPointer: <Error class: unknown class><<Error class: unknown class>>)(source)

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.

Since

4.14

Constructors

Link copied to clipboard
constructor()

Creates a new GtkPrintDialog object.

constructor(gtkPrintDialogPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A label that may be shown on the accept button of a print dialog that is presented by method@Gtk.PrintDialog.setup.

Link copied to clipboard
val gtkPrintDialogPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open var modal: Boolean

Whether the print dialog is modal.

Link copied to clipboard

The page setup to use.

Link copied to clipboard

The print settings to use.

Link copied to clipboard
open var title: String

A title that may be shown on the print dialog that is presented by method@Gtk.PrintDialog.setup.

Functions

Link copied to clipboard
open fun print(parent: Window? = null, setup: PrintSetup? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function prints content from a stream.

Link copied to clipboard
open fun printFile(parent: Window? = null, setup: PrintSetup? = null, file: <Error class: unknown class>, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function prints a file.

Link copied to clipboard
open fun printFileFinish(result: <Error class: unknown class>): <Error class: unknown class><Boolean>

Finishes the method@Gtk.PrintDialog.print_file call and returns the results.

Link copied to clipboard
open fun printFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>?>

Finishes the method@Gtk.PrintDialog.print call and returns the results.

Link copied to clipboard
open fun setup(parent: Window? = null, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

This function presents a print dialog to let the user select a printer, and set up print settings and page setup.

Link copied to clipboard
open fun setupFinish(result: <Error class: unknown class>): <Error class: unknown class><PrintSetup?>

Finishes the method@Gtk.PrintDialog.setup call.