Signal
Gtk PrintOperation::preview
since: 2.10
Declaration
gboolean
preview(
GtkPrintOperation*self,
GtkPrintOperationPreview*preview,
GtkPrintContext*context,
GtkWindow*parent,
gpointeruser_data
)
Description [src]
Gets emitted when a preview is requested from the native dialog.
The default handler for this signal uses an external viewer application to preview.
To implement a custom print preview, an application must return
TRUE from its handler for this signal. In order to use the
provided context for the preview implementation, it must be
given a suitable cairo context with gtk_print_context_set_cairo_context().
The custom preview implementation can use
gtk_print_operation_preview_is_selected() and
gtk_print_operation_preview_render_page() to find pages which
are selected for print and render them. The preview must be
finished by calling gtk_print_operation_preview_end_preview()
(typically in response to the user clicking a close button).
The default handler is called after the handlers added via g_signal_connect().
Parameters
preview-
Type:
GtkPrintOperationPreviewThe
GtkPrintOperationPreviewfor the current operation.The data is owned by the caller of the function. context-
Type:
GtkPrintContextThe
GtkPrintContextthat will be used.The data is owned by the caller of the function. parent-
Type:
GtkWindowThe
GtkWindowto use as window parent, orNULL.The argument can beNULL.The data is owned by the caller of the function.
Return value
Type: gboolean
TRUE if the listener wants to take over control of the preview.