package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Print_operation_preview/index.html

Module Wrappers.Print_operation_preview

type t = [ `print_operation_preview ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val render_page : t -> int -> unit

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.

val is_selected : t -> int -> bool

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

val end_preview : t -> unit

Ends a preview.

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

val on_got_page_size : ?after:bool -> t -> callback: (context:[ `print_context | `object_ ] Gobject.obj -> page_setup:[ `page_setup | `object_ ] Gobject.obj -> unit) -> Gobject.Signal.handler_id
val on_ready : ?after:bool -> t -> callback:(context:[ `print_context | `object_ ] Gobject.obj -> unit) -> Gobject.Signal.handler_id