package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Print_dialog

type t = [ `print_dialog | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new PrintDialog

val setup_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> ([ `print_setup ] Gobject.obj option, GError.t) result

Finishes the method@Gtk.PrintDialog.setup call.

If the call was successful, it returns a struct@Gtk.PrintSetup which contains the print settings and page setup information that will be used to print.

val set_title : t -> string -> unit

Sets the title that will be shown on the print dialog.

val set_print_settings : t -> [ `print_settings | `object_ ] Gobject.obj -> unit

Sets the print settings for the print dialog.

val set_page_setup : t -> [ `page_setup | `object_ ] Gobject.obj -> unit

Set the page setup for the print dialog.

val set_modal : t -> bool -> unit

Sets whether the print dialog blocks interaction with the parent window while it is presented.

val set_accept_label : t -> string -> unit

Sets the label that will be shown on the accept button of the print dialog shown for method@Gtk.PrintDialog.setup.

Finishes the method@Gtk.PrintDialog.print call and returns the results.

If the call was successful, the content to be printed should be written to the returned output stream. Otherwise, `NULL` is returned.

The overall results of the print operation will be returned in the method@Gio.OutputStream.close call, so if you are interested in the results, you need to explicitly close the output stream (it will be closed automatically if you just unref it). Be aware that the close call may not be instant as it operation will for the printer to finish printing.

val print_file_finish : t -> Ocgtk_gio.Gio.Wrappers.Async_result.t -> (bool, GError.t) result

Finishes the method@Gtk.PrintDialog.print_file call and returns the results.

val get_title : t -> string

Returns the title that will be shown on the print dialog.

val get_print_settings : t -> [ `print_settings | `object_ ] Gobject.obj

Returns the print settings for the print dialog.

val get_page_setup : t -> [ `page_setup | `object_ ] Gobject.obj

Returns the page setup.

val get_modal : t -> bool

Returns whether the print dialog blocks interaction with the parent window while it is presented.

val get_accept_label : t -> string

Returns the label that will be shown on the accept button of the print dialog.