Index

Package: Paper_Size

Description

package Gtk.Paper_Size is

GtkPaperSize handles paper sizes. It uses the standard called <ulink url="http://www.pwg.org/standards.html">"PWG 5101.1-2002 PWG: Standard for Media Standardized Names"</ulink> 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 Gtk.Paper_Size.Gtk_Paper_Size object stores not only the dimensions (width and height) of a paper size and its name, it also provides default <link linkend="print-margins">print margins</link>.

Printing support has been added in GTK+ 2.10.

Packages

Gtk_Paper_Size_Glist (new Glib.Glist.Generic_List)

package Gtk_Paper_Size_Glist is new Generic_List (Gtk.Paper_Size.Gtk_Paper_Size);

Classes

Gtk_Paper_Size

type Gtk_Paper_Size is new Glib.C_Boxed with null record;

Ancestors:

Primitive operations:

From_Object_Free
Get_Default_Bottom_Margin
Get_Default_Left_Margin
Get_Default_Right_Margin
Get_Default_Top_Margin
Get_Display_Name
Get_Ppd_Name
Gtk_New_Custom
Gtk_New_From_Key_File
Gtk_New_From_Ppd
Gtk_Paper_Size_New
Gtk_Paper_Size_New_Custom
Gtk_Paper_Size_New_From_Key_File
Gtk_Paper_Size_New_From_Ppd

Constants & Global variables

Null_Gtk_Paper_Size (Gtk_Paper_Size)

Null_Gtk_Paper_Size : constant Gtk_Paper_Size;

Gtk_Paper_Name_A3 (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 (String)

Gtk_Paper_Name_A4        : constant String := "iso_a4";

Gtk_Paper_Name_A5 (String)

Gtk_Paper_Name_A5        : constant String := "iso_a5";

Gtk_Paper_Name_B5 (String)

Gtk_Paper_Name_B5        : constant String := "iso_b5";

Gtk_Paper_Name_Letter (String)

Gtk_Paper_Name_Letter    : constant String := "na_letter";

Gtk_Paper_Name_Executive (String)

Gtk_Paper_Name_Executive : constant String := "na_executive";

Gtk_Paper_Name_Legal (String)

Gtk_Paper_Name_Legal     : constant String := "na_legal";

Subprograms & Entries

From_Object

function From_Object 
(Object: System.Address) return Gtk_Paper_Size;

From_Object_Free

function From_Object_Free 
(B: access Gtk_Paper_Size'Class) return Gtk_Paper_Size;

Gtk_New

procedure Gtk_New 
(Widget: out Gtk_Paper_Size;
Name: UTF8_String := "");
Creates a new Gtk.Paper_Size.Gtk_Paper_Size object by parsing a <ulink url="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf">PWG 5101.1-2002</ulink> paper name. If Name is null, the default paper size is returned, see Gtk.Paper_Size.Get_Default. Since: gtk+ 2.10 "name": a paper size name, or null

Gtk_Paper_Size_New

function Gtk_Paper_Size_New 
(Name: UTF8_String := "") return Gtk_Paper_Size;
Creates a new Gtk.Paper_Size.Gtk_Paper_Size object by parsing a <ulink url="ftp://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn10-20020226-5101.1.pdf">PWG 5101.1-2002</ulink> paper name. If Name is null, the default paper size is returned, see Gtk.Paper_Size.Get_Default. Since: gtk+ 2.10 "name": a paper size name, or null

Gtk_New_Custom

procedure Gtk_New_Custom 
(Widget: out Gtk_Paper_Size;
Name: UTF8_String;
Display_Name: UTF8_String;
Width: Gdouble;
Height: Gdouble;
Unit: Gtk.Enums.Gtk_Unit);
Creates a new Gtk.Paper_Size.Gtk_Paper_Size object with the given parameters. Since: gtk+ 2.10 "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. not Gtk.Enums.None.

Gtk_Paper_Size_New_Custom

function Gtk_Paper_Size_New_Custom 
(Name: UTF8_String;
Display_Name: UTF8_String;
Width: Gdouble;
Height: Gdouble;
Unit: Gtk.Enums.Gtk_Unit) return Gtk_Paper_Size;
Creates a new Gtk.Paper_Size.Gtk_Paper_Size object with the given parameters. Since: gtk+ 2.10 "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. not Gtk.Enums.None.

Gtk_New_From_Key_File

procedure Gtk_New_From_Key_File 
(Widget: out Gtk_Paper_Size;
Key_File: Glib.Key_File.G_Key_File;
Group_Name: UTF8_String);
Reads a paper size from the group Group_Name in the key file Key_File. Since: gtk+ 2.12 "key_file": the Gkey.File.Gkey_File to retrieve the papersize from "group_name": the name ofthe group in the key file to read, or null to read the first group

Gtk_Paper_Size_New_From_Key_File

function Gtk_Paper_Size_New_From_Key_File 
(Key_File: Glib.Key_File.G_Key_File;
Group_Name: UTF8_String) return Gtk_Paper_Size;
Reads a paper size from the group Group_Name in the key file Key_File. Since: gtk+ 2.12 "key_file": the Gkey.File.Gkey_File to retrieve the papersize from "group_name": the name ofthe group in the key file to read, or null to read the first group

Gtk_New_From_Ppd

procedure Gtk_New_From_Ppd 
(Widget: out Gtk_Paper_Size;
Ppd_Name: UTF8_String;
Ppd_Display_Name: UTF8_String;
Width: Gdouble;
Height: Gdouble);
Creates a new Gtk.Paper_Size.Gtk_Paper_Size object by using PPD information. 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.Gtk_Paper_Size object. Since: gtk+ 2.10 "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

Gtk_Paper_Size_New_From_Ppd

function Gtk_Paper_Size_New_From_Ppd 
(Ppd_Name: UTF8_String;
Ppd_Display_Name: UTF8_String;
Width: Gdouble;
Height: Gdouble) return Gtk_Paper_Size;
Creates a new Gtk.Paper_Size.Gtk_Paper_Size object by using PPD information. 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.Gtk_Paper_Size object. Since: gtk+ 2.10 "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

Get_Type

function Get_Type return Glib.GType;

Copy

function Copy 
(Widget: Gtk_Paper_Size) return Gtk_Paper_Size;
Copies an existing Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10

Free

procedure Free 
(Widget: Gtk_Paper_Size);
Free the given Gtk.Paper_Size.Gtk_Paper_Size object. Since: gtk+ 2.10

Get_Default_Bottom_Margin

function Get_Default_Bottom_Margin 
(Widget: Gtk_Paper_Size;
Unit: Gtk.Enums.Gtk_Unit) return Gdouble;
Gets the default bottom margin for the Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10 "unit": the unit for the return value, not Gtk.Enums.None

Get_Default_Left_Margin

function Get_Default_Left_Margin 
(Widget: Gtk_Paper_Size;
Unit: Gtk.Enums.Gtk_Unit) return Gdouble;
Gets the default left margin for the Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10 "unit": the unit for the return value, not Gtk.Enums.None

Get_Default_Right_Margin

function Get_Default_Right_Margin 
(Widget: Gtk_Paper_Size;
Unit: Gtk.Enums.Gtk_Unit) return Gdouble;
Gets the default right margin for the Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10 "unit": the unit for the return value, not Gtk.Enums.None

Get_Default_Top_Margin

function Get_Default_Top_Margin 
(Widget: Gtk_Paper_Size;
Unit: Gtk.Enums.Gtk_Unit) return Gdouble;
Gets the default top margin for the Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10 "unit": the unit for the return value, not Gtk.Enums.None

Get_Display_Name

function Get_Display_Name 
(Widget: Gtk_Paper_Size) return UTF8_String;
Gets the human-readable name of the Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10

Get_Height

function Get_Height 
(Widget: Gtk_Paper_Size;
Unit: Gtk.Enums.Gtk_Unit) return Gdouble;
Gets the paper height of the Gtk.Paper_Size.Gtk_Paper_Size, in units of Unit. Since: gtk+ 2.10 "unit": the unit for the return value, not Gtk.Enums.None

Get_Name

function Get_Name 
(Widget: Gtk_Paper_Size) return UTF8_String;
Gets the name of the Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10

Get_Ppd_Name

function Get_Ppd_Name 
(Widget: Gtk_Paper_Size) return UTF8_String;
Gets the PPD name of the Gtk.Paper_Size.Gtk_Paper_Size, which may be null. Since: gtk+ 2.10

Get_Width

function Get_Width 
(Widget: Gtk_Paper_Size;
Unit: Gtk.Enums.Gtk_Unit) return Gdouble;
Gets the paper width of the Gtk.Paper_Size.Gtk_Paper_Size, in units of Unit. Since: gtk+ 2.10 "unit": the unit for the return value, not Gtk.Enums.None

Is_Custom

function Is_Custom 
(Widget: Gtk_Paper_Size) return Boolean;
Returns True if Size is not a standard paper size.

Is_Equal

function Is_Equal 
(Widget: Gtk_Paper_Size;
Size2: Gtk_Paper_Size) return Boolean;
Compares two Gtk.Paper_Size.Gtk_Paper_Size objects. Since: gtk+ 2.10 "size2": another Gtk.Paper_Size.Gtk_Paper_Size object

Set_Size

procedure Set_Size 
(Widget: Gtk_Paper_Size;
Width: Gdouble;
Height: Gdouble;
Unit: Gtk.Enums.Gtk_Unit);
Changes the dimensions of a Size to Width x Height. Since: gtk+ 2.10 "width": the new width in units of Unit "height": the new height in units of Unit "unit": the unit for Width and Height

To_Key_File

procedure To_Key_File 
(Widget: Gtk_Paper_Size;
Key_File: Glib.Key_File.G_Key_File;
Group_Name: UTF8_String);
This function adds the paper size from Size to Key_File. Since: gtk+ 2.12 "key_file": the Gkey.File.Gkey_File to save the paper size to "group_name": the group to add the settings to in Key_File

Convert

function Convert 
(R: Gtk.Paper_Size.Gtk_Paper_Size) return System.Address;

Convert

function Convert 
(R: System.Address) return Gtk.Paper_Size.Gtk_Paper_Size;

Get_Default

function Get_Default return UTF8_String;
Returns the name of the default paper size, which depends on the current locale. Since: gtk+ 2.10

Get_Paper_Sizes

function Get_Paper_Sizes 
(Include_Custom: Boolean) return Gtk_Paper_Size_Glist.Glist;
Creates a list of known paper sizes. Since: gtk+ 2.12 "include_custom": whether to include custom paper sizes as defined in the page setup dialog