gtk.print_operation_preview_mixin
Module for [PrintOperationPreview] interface mixin
Templates 2
Ends a preview.
This function must be called to finish a custom print preview.
Returns whether the given page is included in the set of pages that have been selected for printing.
Parameters
pageNr | a page number |
Returns
Renders a page to the preview, using the print context that was passed to the #GtkPrintOperation::preview handler together with preview.
A custom iprint preview should use this function in its ::expose handler to render the currently selected page.
Note that this function requires a suitable cairo context to be associated with the print context.
Parameters
pageNr | the page to render |
Connect to GotPageSize signal.
The ::got-page-size signal is emitted once for each page that gets rendered to the preview.
A handler for this signal should update the context according to page_setup and set up a suitable cairo context, using [gtk.print_context.PrintContext.setCairoContext].
Parameters
callback | signal callback delegate or function to connect void callback(gtk.print_context.PrintContext context, gtk.page_setup.PageSetup pageSetup, gtk.print_operation_preview.PrintOperationPreview printOperationPreview) context the current #GtkPrintContext (optional) pageSetup the #GtkPageSetup for the current page (optional) printOperationPreview the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Connect to Ready signal.
The ::ready signal gets emitted once per preview operation, before the first page is rendered.
A handler for this signal can be used for setup tasks.
Parameters
callback | signal callback delegate or function to connect void callback(gtk.print_context.PrintContext context, gtk.print_operation_preview.PrintOperationPreview printOperationPreview) context the current #GtkPrintContext (optional) printOperationPreview the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |