## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Paper_Size

- Goto spec source

# Description

    package Gtk.Paper_Size is

Gtk_Paper_Size handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: Standard for Media Standardized Names" to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, Gtk_Paper_Size allows to construct custom paper sizes with arbitrary dimensions.

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

Binding from C File version 2.16.6

# Packages

### Gtk_Paper_Size_Glist (new Glib.Glist.Generic_List)

    package Gtk_Paper_Size_Glist is
         new Glib.Glist.Generic_List (Gtk_Paper_Size);

# Types

### Gtk_Paper_Size

- Goto declaration in source

    type Gtk_Paper_Size is new Glib.C_Proxy;

# Constants & Global variables

### Gtk_Paper_Name_A3

- Goto declaration in source

(String)

    Gtk_Paper_Name_A3        : constant String := "iso_a3";

Common names, from PWG 5101.1-2002 PWG: Standard for Media Standardized Names

### Gtk_Paper_Name_A4

- Goto declaration in source

(String)

    Gtk_Paper_Name_A4        : constant String := "iso_a4";

### Gtk_Paper_Name_A5

- Goto declaration in source

(String)

    Gtk_Paper_Name_A5        : constant String := "iso_a5";

### Gtk_Paper_Name_B5

- Goto declaration in source

(String)

    Gtk_Paper_Name_B5        : constant String := "iso_b5";

### Gtk_Paper_Name_Letter

- Goto declaration in source

(String)

    Gtk_Paper_Name_Letter    : constant String := "na_letter";

### Gtk_Paper_Name_Executive

- Goto declaration in source

(String)

    Gtk_Paper_Name_Executive : constant String := "na_executive";

### Gtk_Paper_Name_Legal

- Goto declaration in source

(String)

    Gtk_Paper_Name_Legal     : constant String := "na_legal";

# Subprograms & Entries

### Convert

- Goto spec in source

    function Convert is new Ada.Unchecked_Conversion (Gtk_Paper_Size, System.Address);

### Convert

- Goto spec in source

    function Convert is new Ada.Unchecked_Conversion (System.Address, Gtk_Paper_Size);

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return GType;

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Widget: out Gtk_Paper_Size;Name: String);

Creates a new Gtk_Paper_Size object by parsing a PWG 5101.1-2002 paper name. If Name is "", the default paper size is returned; see Get_Default.

### Gtk_New_Custom

- Goto spec in source

    procedure Gtk_New_Custom (Widget: out Gtk_Paper_Size;Name: String;Display_Name: String;Width: Gdouble;Height: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

Creates a new Gtk_Paper_Size object with the given parameters: Name: the paper name Display_Name: the human-readable name Width: the paper width, in units of Unit Height: the paper height, in units of Unit Unit: the unit for Width and Height

### Gtk_New_From_Key_File

- Goto spec in source

    procedure Gtk_New_From_Key_File (Widget: out Gtk_Paper_Size;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "");

Reads a paper size from the group Group_Name in the key file Key_File. Will set Widget to null in case of error.

### Gtk_New_From_Ppd

- Goto spec in source

    procedure Gtk_New_From_Ppd (Widget: out Gtk_Paper_Size;Ppd_Name: String;Ppd_Display_Name: String := "";Width: Gdouble;Height: Gdouble);

Creates a new Gtk_Paper_Size object by using PPD information: Ppd_Name: a PPD paper name Ppd_Display_Name: the corresponding human-readable name Width: the paper width, in points Height: the paper height in points If Ppd_Name is not a recognized PPD paper name, Ppd_Display_Name, Width and Height are used to construct a custom Gtk_Paper_Size object.

### To_Key_File

- Goto spec in source

    procedure To_Key_File (Size: Gtk_Paper_Size;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "");

This function adds the paper size from Size to Key_File, within the group Group_Name.

### Copy

- Goto spec in source
- Goto body in source

    function Copy (Other: Gtk_Paper_Size) return Gtk_Paper_Size;

Copies an existing Gtk_Paper_Size.

### Free

- Goto spec in source
- Goto body in source

    procedure Free (Size: Gtk_Paper_Size);

Free the given Gtk_Paper_Size object.

### Get_Default

- Goto spec in source

    function Get_Default return String;

Returns the name of the default paper size, which depends on the current locale.

### Get_Name

- Goto spec in source

    function Get_Name (Size: Gtk_Paper_Size) return String;

Gets the name of the Gtk_Paper_Size.

### Get_Display_Name

- Goto spec in source

    function Get_Display_Name (Size: Gtk_Paper_Size) return String;

Gets the human-readable name of the Gtk_Paper_Size.

### Get_Ppd_Name

- Goto spec in source

    function Get_Ppd_Name (Size: Gtk_Paper_Size) return String;

Gets the PPD name of the Gtk_Paper_Size.

### Is_Custom

- Goto spec in source

    function Is_Custom (Size: Gtk_Paper_Size) return Boolean;

Returns True if Size is not a standard paper size.

### Get_Width

- Goto spec in source
- Goto body in source

    function Get_Width (Size: Gtk_Paper_Size;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Height

- Goto spec in source
- Goto body in source

    function Get_Height (Size: Gtk_Paper_Size;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

Gets the paper width/height of the Gtk_Paper_Size, in units of Unit.

### Set_Size

- Goto spec in source
- Goto body in source

    procedure Set_Size (Size: Gtk_Paper_Size;Width: Gdouble;Height: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

Changes the dimensions of a Size to Width x Height.

### Get_Paper_Sizes

- Goto spec in source

    function Get_Paper_Sizes (Include_Custom: Boolean) return Gtk_Paper_Size_Glist.Glist;

Creates a list of known paper sizes. The caller must specify whether to include custom paper sizes as defined in the page setup dialog

### =

- Goto spec in source

    function "=" (Size1, Size2: Gtk_Paper_Size) return Boolean;

Compares two Gtk_Paper_Size objects.

### Get_Default_Bottom_Margin

- Goto spec in source
- Goto body in source

    function Get_Default_Bottom_Margin (Size: Gtk_Paper_Size;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Default_Left_Margin

- Goto spec in source
- Goto body in source

    function Get_Default_Left_Margin (Size: Gtk_Paper_Size;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Default_Right_Margin

- Goto spec in source
- Goto body in source

    function Get_Default_Right_Margin (Size: Gtk_Paper_Size;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Default_Top_Margin

- Goto spec in source
- Goto body in source

    function Get_Default_Top_Margin (Size: Gtk_Paper_Size;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

Gets the default bottom/left/right/top margin for the Gtk_Paper_Size, using the units specified by Unit.