Class PrintOperationPreview

All Implemented Interfaces:
PointerInterface

public class PrintOperationPreview extends Interface
`GtkPrintOperationPreview` is the interface that is used to
implement print preview.

A `GtkPrintOperationPreview` object is passed to the
[signal@Gtk.PrintOperation::preview] signal by
[class@Gtk.PrintOperation].

https://docs.gtk.org/gtk4/iface.PrintOperationPreview.html

  • Field Details

  • Constructor Details

    • PrintOperationPreview

      public PrintOperationPreview(PointerContainer pointer)
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • endPreview

      public void endPreview()
      Ends a preview.

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

      public boolean isSelected(int page_nr)
      Returns whether the given page is included in the set of pages that
      have been selected for printing.
      Parameters:
      page_nr - a page number
      Returns:
      %TRUE if the page has been selected for printing
    • renderPage

      public void renderPage(int page_nr)
      Renders a page to the preview.

      This is using the print context that was passed to the
      [signal@Gtk.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
    • onGotPageSize

      public SignalHandler onGotPageSize(PrintOperationPreview.OnGotPageSize signal)
      Connect to signal "got-page-size".
      See PrintOperationPreview.OnGotPageSize.onGotPageSize(ch.bailu.gtk.gtk.PrintContext, ch.bailu.gtk.gtk.PageSetup) for signal description.
      Field SIGNAL_ON_GOT_PAGE_SIZE contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • onReady

      Connect to signal "ready".
      See PrintOperationPreview.OnReady.onReady(ch.bailu.gtk.gtk.PrintContext) for signal description.
      Field SIGNAL_ON_READY contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()