package ocgtk

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

Module Wrappers.Page_setup

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

Create a new PageSetup

val new_from_file : string -> (t, GError.t) result

Create a new PageSetup

val new_from_gvariant : Gvariant.t -> t

Create a new PageSetup

val to_gvariant : t -> Gvariant.t

Serialize page setup to an asv variant.

val to_file : t -> string -> (bool, GError.t) result

This function saves the information from @setup to @file_name.

val set_top_margin : t -> float -> Gtk_enums.unit -> unit

Sets the top margin of the `GtkPageSetup`.

val set_right_margin : t -> float -> Gtk_enums.unit -> unit

Sets the right margin of the `GtkPageSetup`.

val set_paper_size_and_default_margins : t -> [ `paper_size ] Gobject.obj -> unit

Sets the paper size of the `GtkPageSetup` and modifies the margins according to the new paper size.

val set_paper_size : t -> [ `paper_size ] Gobject.obj -> unit

Sets the paper size of the `GtkPageSetup` without changing the margins.

See method@Gtk.PageSetup.set_paper_size_and_default_margins.

val set_orientation : t -> Gtk_enums.pageorientation -> unit

Sets the page orientation of the `GtkPageSetup`.

val set_left_margin : t -> float -> Gtk_enums.unit -> unit

Sets the left margin of the `GtkPageSetup`.

val set_bottom_margin : t -> float -> Gtk_enums.unit -> unit

Sets the bottom margin of the `GtkPageSetup`.

val load_file : t -> string -> (bool, GError.t) result

Reads the page setup from the file @file_name.

See method@Gtk.PageSetup.to_file.

val get_top_margin : t -> Gtk_enums.unit -> float

Gets the top margin in units of @unit.

val get_right_margin : t -> Gtk_enums.unit -> float

Gets the right margin in units of @unit.

val get_paper_width : t -> Gtk_enums.unit -> float

Returns the paper width in units of @unit.

Note that this function takes orientation, but not margins into consideration. See method@Gtk.PageSetup.get_page_width.

val get_paper_size : t -> [ `paper_size ] Gobject.obj

Gets the paper size of the `GtkPageSetup`.

val get_paper_height : t -> Gtk_enums.unit -> float

Returns the paper height in units of @unit.

Note that this function takes orientation, but not margins into consideration. See method@Gtk.PageSetup.get_page_height.

val get_page_width : t -> Gtk_enums.unit -> float

Returns the page width in units of @unit.

Note that this function takes orientation and margins into consideration. See method@Gtk.PageSetup.get_paper_width.

val get_page_height : t -> Gtk_enums.unit -> float

Returns the page height in units of @unit.

Note that this function takes orientation and margins into consideration. See method@Gtk.PageSetup.get_paper_height.

val get_orientation : t -> Gtk_enums.pageorientation

Gets the page orientation of the `GtkPageSetup`.

val get_left_margin : t -> Gtk_enums.unit -> float

Gets the left margin in units of @unit.

val get_bottom_margin : t -> Gtk_enums.unit -> float

Gets the bottom margin in units of @unit.

val copy : t -> t

Copies a `GtkPageSetup`.