package ocgtk

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

Module Wrappers.Paper_size

type t = [ `paper_size ] Gobject.obj

`GtkPaperSize` handles paper sizes.

It uses the standard called PWG 5101.1-2002 PWG: Standard for Media Standardized Names(http://www.pwg.org/standards.html) to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, `GtkPaperSize` allows to construct custom paper sizes with arbitrary dimensions.

The `GtkPaperSize` object stores not only the dimensions (width and height) of a paper size and its name, it also provides default print margins.

val new_ : string option -> t

Create a new PaperSize

val new_custom : string -> string -> float -> float -> Gtk_enums.unit -> t

Create a new PaperSize

val new_from_gvariant : Gvariant.t -> t

Create a new PaperSize

val new_from_ipp : string -> float -> float -> t

Create a new PaperSize

val new_from_ppd : string -> string -> float -> float -> t

Create a new PaperSize

val to_gvariant : t -> Gvariant.t

Serialize a paper size to an `asv` variant.

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

Changes the dimensions of a @size to @width x @height.

val is_ipp : t -> bool

Returns %TRUE if @size is an IPP standard paper size.

val is_equal : t -> t -> bool

Compares two `GtkPaperSize` objects.

val is_custom : t -> bool

Returns %TRUE if @size is not a standard paper size.

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

Gets the paper width of the `GtkPaperSize`, in units of @unit.

val get_ppd_name : t -> string

Gets the PPD name of the `GtkPaperSize`, which may be %NULL.

val get_name : t -> string

Gets the name of the `GtkPaperSize`.

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

Gets the paper height of the `GtkPaperSize`, in units of @unit.

val get_display_name : t -> string

Gets the human-readable name of the `GtkPaperSize`.

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

Gets the default top margin for the `GtkPaperSize`.

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

Gets the default right margin for the `GtkPaperSize`.

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

Gets the default left margin for the `GtkPaperSize`.

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

Gets the default bottom margin for the `GtkPaperSize`.

val get_type : unit -> Gobject.Type.t