## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Page_Setup

- Goto spec source

# Description

    package Gtk.Page_Setup is

A Gtk_Page_Setup object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the Gtk_Print_Operation when printing. The benefit of splitting this out of the Gtk_Print_Settings is that these affect the actual layout of the page, and thus need to be set long before user prints.

The margins specified in this object are the "print margins", i.e. the parts of the page that the printer cannot print on. These are different from the layout margins that a word processor uses; they are typically used to determine the minimal size for the layout margins.

To obtain a Gtk_Page_Setup use Gtk_New to get the defaults, or use Gtk_Print_Run_Page_Setup_Dialog to show the page setup dialog and receive the resulting page setup.

Binding from C File version 2.16.6

# Classes

### Gtk_Page_Setup_Record

- Goto declaration in source
- Goto full declaration in source

    type Gtk_Page_Setup_Record is new Glib.Object.GObject_Record with private;

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Copy

- To API doc
- To spec

Get_Bottom_Margin

- To API doc
- To spec

Get_Left_Margin

- To API doc
- To spec

Get_Orientation

- To API doc
- To spec

Get_Page_Height

- To API doc
- To spec

Get_Page_Width

- To API doc
- To spec

Get_Paper_Height

- To API doc
- To spec

Get_Paper_Size

- To API doc
- To spec

Get_Paper_Width

- To API doc
- To spec

Get_Right_Margin

- To API doc
- To spec

Get_Top_Margin

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Load_File

- To API doc
- To spec

Load_Key_File

- To API doc
- To spec

Set_Bottom_Margin

- To API doc
- To spec

Set_Left_Margin

- To API doc
- To spec

Set_Orientation

- To API doc
- To spec

Set_Paper_Size

- To API doc
- To spec

Set_Paper_Size_And_Default_Margins

- To API doc
- To spec

Set_Right_Margin

- To API doc
- To spec

Set_Top_Margin

- To API doc
- To spec

To_File

- To API doc
- To spec

To_Key_File

- To API doc
- To spec

# Types

### Gtk_Page_Setup

- Goto declaration in source

    type Gtk_Page_Setup is access all Gtk_Page_Setup_Record'Class;

# Subprograms & Entries

### 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_Page_Setup);

### Initialize

- Goto spec in source

    procedure Initialize (Widget: access Gtk_Page_Setup_Record'Class);

Creates a new Gtk_Page_Setup.

### Gtk_New_From_File

- Goto spec in source

    procedure Gtk_New_From_File (Widget: out Gtk_Page_Setup;File_Name: String;Error: Glib.Error.GError := null);

### Initialize_From_File

- Goto spec in source

    procedure Initialize_From_File (Widget: access Gtk_Page_Setup_Record'Class;File_Name: String;Error: Glib.Error.GError := null);

Reads the page setup from the file File_Name. Returns a new Gtk_Page_Setup object with the restored page setup, or null if an error occurred. See To_File.

### Gtk_New_From_Key_File

- Goto spec in source

    procedure Gtk_New_From_Key_File (Widget: out Gtk_Page_Setup;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "";Error: Glib.Error.GError := null);

### Initialize_From_Key_File

- Goto spec in source

    procedure Initialize_From_Key_File (Widget: access Gtk_Page_Setup_Record'Class;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "";Error: Glib.Error.GError := null);

Reads the page setup from the group @group_name in the key file Key_File. Returns a new Gtk_Page_Setup object with the restored page setup, or null if an error occurred. Return value: the restored Gtk_Page_Setup

### Load_File

- Goto spec in source

    function Load_File (Setup: access Gtk_Page_Setup_Record;File_Name: String;Error: Glib.Error.GError := null) return Boolean;

Reads the page setup from the file File_name. See To_File. Returns True on success.

### Load_Key_File

- Goto spec in source

    function Load_Key_File (Setup: access Gtk_Page_Setup_Record;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "";Error: Glib.Error.GError := null) return Boolean;

Reads the page setup from the group Group_Name (by default, "Page Setup") in the key file Key_File. Returns True on success.

### To_File

- Goto spec in source

    function To_File (Setup: access Gtk_Page_Setup_Record;File_Name: String;Error: Glib.Error.GError := null) return Boolean;

This function saves the information from Setup to File_Name. Returns True on success.

### To_Key_File

- Goto spec in source

    procedure To_Key_File (Setup: access Gtk_Page_Setup_Record;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "");

This function adds the page setup from Setup to Key_File.

### Copy

- Goto spec in source

    function Copy (Other: access Gtk_Page_Setup_Record) return Gtk_Page_Setup;

Copies a Gtk_Page_Setup.

### Get_Bottom_Margin

- Goto spec in source

    function Get_Bottom_Margin (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Left_Margin

- Goto spec in source

    function Get_Left_Margin (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Right_Margin

- Goto spec in source

    function Get_Right_Margin (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Top_Margin

- Goto spec in source

    function Get_Top_Margin (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

Gets the specified margin in units of Unit.

### Set_Bottom_Margin

- Goto spec in source

    procedure Set_Bottom_Margin (Setup: access Gtk_Page_Setup_Record;Margin: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

### Set_Left_Margin

- Goto spec in source

    procedure Set_Left_Margin (Setup: access Gtk_Page_Setup_Record;Margin: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

### Set_Right_Margin

- Goto spec in source

    procedure Set_Right_Margin (Setup: access Gtk_Page_Setup_Record;Margin: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

### Set_Top_Margin

- Goto spec in source

    procedure Set_Top_Margin (Setup: access Gtk_Page_Setup_Record;Margin: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

Sets the margins of the Gtk_Page_Setup.

### Get_Page_Height

- Goto spec in source

    function Get_Page_Height (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Page_Width

- Goto spec in source

    function Get_Page_Width (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

Returns the page height/width in units of Unit. Note that this function takes orientation and margins into consideration. See Get_Paper_Height.

### Get_Paper_Size

- Goto spec in source

    function Get_Paper_Size (Setup: access Gtk_Page_Setup_Record) return Gtk.Paper_Size.Gtk_Paper_Size;

### Set_Paper_Size

- Goto spec in source

    procedure Set_Paper_Size (Setup: access Gtk_Page_Setup_Record;Size: Gtk.Paper_Size.Gtk_Paper_Size);

Gets/Sets the paper size of the Gtk_Page_Setup without changing the margins. See Set_Paper_Size_And_Default_Margins.

### Set_Paper_Size_And_Default_Margins

- Goto spec in source

    procedure Set_Paper_Size_And_Default_Margins (Setup: access Gtk_Page_Setup_Record;Size: Gtk.Paper_Size.Gtk_Paper_Size);

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

### Get_Paper_Height

- Goto spec in source

    function Get_Paper_Height (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Paper_Width

- Goto spec in source

    function Get_Paper_Width (Setup: access Gtk_Page_Setup_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

Returns the paper height in units of Unit. Note that this function takes orientation, but not margins into consideration. See Get_Page_Height.

### Get_Orientation

- Goto spec in source

    function Get_Orientation (Setup: access Gtk_Page_Setup_Record) return Gtk.Enums.Gtk_Page_Orientation;

### Set_Orientation

- Goto spec in source

    procedure Set_Orientation (Setup: access Gtk_Page_Setup_Record;Orientation: Gtk.Enums.Gtk_Page_Orientation);

The page orientation of the Gtk_Page_Setup.