gtk.PrintOperationPreviewT

Undocumented in source.

Public Imports

gtkc.gtktypes
public import gtkc.gtktypes;
Undocumented in source.
gtkc.gtk
public import gtkc.gtk;
Undocumented in source.
glib.ConstructionException
public import glib.ConstructionException;
Undocumented in source.
gobject.ObjectG
public import gobject.ObjectG;
Undocumented in source.
gobject.Signals
public import gobject.Signals;
Undocumented in source.
gtkc.gdktypes
public import gtkc.gdktypes;
Undocumented in source.
gtk.Widget
public import gtk.Widget;
Undocumented in source.
gtk.PageSetup
public import gtk.PageSetup;
Undocumented in source.
gtk.PrintSettings
public import gtk.PrintSettings;
Undocumented in source.

Members

Templates

PrintOperationPreviewT
template PrintOperationPreviewT(TStruct)

Description GtkPrintOperation is the high-level, portable printing API. It looks a bit different than other GTK+ dialogs such as the GtkFileChooser, since some platforms don't expose enough infrastructure to implement a good print dialog. On such platforms, GtkPrintOperation uses the native print dialog. On platforms which do not provide a native print dialog, GTK+ uses its own, see GtkPrintUnixDialog. The typical way to use the high-level printing API is to create a GtkPrintOperation object with gtk_print_operation_new() when the user selects to print. Then you set some properties on it, e.g. the page size, any GtkPrintSettings from previous print operations, the number of pages, the current page, etc. Then you start the print operation by calling gtk_print_operation_run(). It will then show a dialog, let the user select a printer and options. When the user finished the dialog various signals will be emitted on the GtkPrintOperation, the main one being ::draw-page, which you are supposed to catch and render the page on the provided GtkPrintContext using Cairo. By default GtkPrintOperation uses an external application to do print preview. To implement a custom print preview, an application must connect to the preview signal. The functions gtk_print_operation_print_preview_render_page(), gtk_print_operation_preview_end_preview() and gtk_print_operation_preview_is_selected() are useful when implementing a print preview. Printing support was added in GTK+ 2.10.

Meta