Interface

Gtk-3.0GtkPrintOperationPreviewInterface

Interface for implementing PrintOperationPreview. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_end_preview(): void;
    vfunc_got_page_size(
        context: Gtk.PrintContext,
        page_setup: Gtk.PageSetup,
    ): void;
    vfunc_is_selected(page_nr: number): boolean;
    vfunc_ready(context: Gtk.PrintContext): void;
    vfunc_render_page(page_nr: number): void;
}

Hierarchy (View Summary)

Index

Methods

  • Ends a preview.

    This function must be called to finish a custom print preview.

    Returns void

  • Returns whether the given page is included in the set of pages that have been selected for printing.

    Parameters

    • page_nr: number

      a page number

    Returns boolean

  • 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.

    Parameters

    • page_nr: number

      the page to render

    Returns void