Gtk.PrintOperationPreview¶
- Implementations:
Methods¶
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
---|---|
The |
|
The |
Fields¶
None
Class Details¶
- class Gtk.PrintOperationPreview¶
- Bases:
- Structure:
- end_preview()[source]¶
Ends a preview.
This function must be called to finish a custom print preview.
New in version 2.10.
- is_selected(page_nr)[source]¶
- Parameters:
page_nr (
int
) – a page number- Returns:
True
if the page has been selected for printing- Return type:
Returns whether the given page is included in the set of pages that have been selected for printing.
New in version 2.10.
- render_page(page_nr)[source]¶
- Parameters:
page_nr (
int
) – the page to render
Renders a page to the preview, using the print context that was passed to the
Gtk.PrintOperation
::preview
handler together with self.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.
New in version 2.10.
- do_end_preview() virtual¶
Ends a preview.
This function must be called to finish a custom print preview.
New in version 2.10.
- do_got_page_size(context, page_setup) virtual¶
- Parameters:
context (
Gtk.PrintContext
) –page_setup (
Gtk.PageSetup
) –
- do_is_selected(page_nr) virtual¶
- Parameters:
page_nr (
int
) – a page number- Returns:
True
if the page has been selected for printing- Return type:
Returns whether the given page is included in the set of pages that have been selected for printing.
New in version 2.10.
- do_ready(context) virtual¶
- Parameters:
context (
Gtk.PrintContext
) –
- do_render_page(page_nr) virtual¶
- Parameters:
page_nr (
int
) – the page to render
Renders a page to the preview, using the print context that was passed to the
Gtk.PrintOperation
::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.
New in version 2.10.
Signal Details¶
- Gtk.PrintOperationPreview.signals.got_page_size(print_operation_preview, context, page_setup)¶
- Signal Name:
got-page-size
- Flags:
- Parameters:
print_operation_preview (
Gtk.PrintOperationPreview
) – The object which received the signalcontext (
Gtk.PrintContext
) – the currentGtk.PrintContext
page_setup (
Gtk.PageSetup
) – theGtk.PageSetup
for the current page
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.PrintContext.set_cairo_context
().
- Gtk.PrintOperationPreview.signals.ready(print_operation_preview, context)¶
- Signal Name:
ready
- Flags:
- Parameters:
print_operation_preview (
Gtk.PrintOperationPreview
) – The object which received the signalcontext (
Gtk.PrintContext
) – the currentGtk.PrintContext
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.