Index

Package: Page_Setup

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

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

Ancestors:

Primitive operations:

Get_Bottom_Margin
Get_Left_Margin
Get_Orientation
Get_Page_Height
Get_Page_Width
Get_Paper_Height
Get_Paper_Size
Get_Paper_Width
Get_Right_Margin
Get_Top_Margin
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Load_Key_File
Set_Bottom_Margin
Set_Left_Margin
Set_Orientation
Set_Paper_Size
Set_Paper_Size_And_Default_Margins
Set_Right_Margin
Set_Top_Margin

Types

Gtk_Page_Setup

type Gtk_Page_Setup is access all Gtk_Page_Setup_Record'Class;

Subprograms & Entries

Get_Type

function Get_Type return GType;

Gtk_New

procedure Gtk_New 
(Widget: out Gtk_Page_Setup);

Initialize

procedure Initialize 
(Widget: access Gtk_Page_Setup_Record'Class);
Creates a new Gtk_Page_Setup.

Gtk_New_From_File

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

Initialize_From_File

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

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

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

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

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

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

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

function Copy 
(Other: access Gtk_Page_Setup_Record) return Gtk_Page_Setup;
Copies a Gtk_Page_Setup.

Get_Bottom_Margin

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

Get_Left_Margin

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

Get_Right_Margin

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

Get_Top_Margin

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

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

Set_Left_Margin

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

Set_Right_Margin

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

Set_Top_Margin

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

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

Get_Page_Width

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

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

Set_Paper_Size

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

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

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

Get_Paper_Width

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

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

Set_Orientation

procedure Set_Orientation 
(Setup: access Gtk_Page_Setup_Record;
Orientation: Gtk.Enums.Gtk_Page_Orientation);
The page orientation of the Gtk_Page_Setup.