Gtk.PrintOperationPreview¶
interface
The interface that is used to implement print preview.
A GtkPrintOperationPreview object is passed to the
PrintOperation.preview signal by
PrintOperation.
Methods¶
end_preview¶
Ends a preview.
This function must be called to finish a custom print preview.
is_selected¶
Returns whether the given page is included in the set of pages that have been selected for printing.
Parameters:
page_nr— a page number
render_page¶
Renders a page to the preview.
This is using the print context that was passed to the
PrintOperation.preview handler together
with preview.
A custom print preview should use this function to render the currently selected page.
Note that this function requires a suitable cairo context to be associated with the print context.
Parameters:
page_nr— the page to render
Virtual methods¶
do_end_preview¶
Ends a preview.
This function must be called to finish a custom print preview.
do_got_page_size¶
do_is_selected¶
Returns whether the given page is included in the set of pages that have been selected for printing.
Parameters:
page_nr— a page number
do_ready¶
do_render_page¶
Renders a page to the preview.
This is using the print context that was passed to the
PrintOperation.preview handler together
with preview.
A custom print preview should use this function to render the currently selected page.
Note that this function requires a suitable cairo context to be associated with the print context.
Parameters:
page_nr— the page to render
Signals¶
got-page-size¶
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 PrintContext.set_cairo_context.
ready¶
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.