## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Print_Settings

- Goto spec source

# Description

    package Gtk.Print_Settings is

A Gtk_Print_Settings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you've printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn't have to re-set all his settings.

It's also possible to enumerate the settings so that you can easily save the settings for the next time your app runs, or even store them in a document. The predefined keys try to use shared values as much as possible so that moving such a document between systems still works.

Binding from C File version 2.16.6

# Classes

### Gtk_Print_Settings_Record

- Goto declaration in source
- Goto full declaration in source

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

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Copy

- To API doc
- To spec

Get

- To API doc
- To spec

Get_Bool

- To API doc
- To spec

Get_Collate

- To API doc
- To spec

Get_Default_Source

- To API doc
- To spec

Get_Dither

- To API doc
- To spec

Get_Double

- To API doc
- To spec

Get_Duplex

- To API doc
- To spec

Get_Finishings

- To API doc
- To spec

Get_Int

- To API doc
- To spec

Get_Length

- To API doc
- To spec

Get_Media_Type

- To API doc
- To spec

Get_N_Copies

- To API doc
- To spec

Get_Number_Up

- To API doc
- To spec

Get_Number_Up_Layout

- To API doc
- To spec

Get_Orientation

- To API doc
- To spec

Get_Output_Bin

- To API doc
- To spec

Get_Page_Ranges

- To API doc
- To spec

Get_Page_Set

- 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_Print_Pages

- To API doc
- To spec

Get_Printer

- To API doc
- To spec

Get_Printer_Lpi

- To API doc
- To spec

Get_Quality

- To API doc
- To spec

Get_Resolution

- To API doc
- To spec

Get_Resolution_X

- To API doc
- To spec

Get_Resolution_Y

- To API doc
- To spec

Get_Reverse

- To API doc
- To spec

Get_Scale

- To API doc
- To spec

Get_Use_Color

- 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)
Has_Key

- To API doc
- To spec

Load_File

- To API doc
- To spec

Load_Key_File

- To API doc
- To spec

Set

- To API doc
- To spec

Set_Bool

- To API doc
- To spec

Set_Collate

- To API doc
- To spec

Set_Default_Source

- To API doc
- To spec

Set_Dither

- To API doc
- To spec

Set_Double

- To API doc
- To spec

Set_Duplex

- To API doc
- To spec

Set_Finishings

- To API doc
- To spec

Set_Int

- To API doc
- To spec

Set_Length

- To API doc
- To spec

Set_Media_Type

- To API doc
- To spec

Set_N_Copies

- To API doc
- To spec

Set_Number_Up

- To API doc
- To spec

Set_Number_Up_Layout

- To API doc
- To spec

Set_Orientation

- To API doc
- To spec

Set_Output_Bin

- To API doc
- To spec

Set_Page_Ranges

- To API doc
- To spec

Set_Page_Set

- To API doc
- To spec

Set_Paper_Height

- To API doc
- To spec

Set_Paper_Size

- To API doc
- To spec

Set_Paper_Width

- To API doc
- To spec

Set_Print_Pages

- To API doc
- To spec

Set_Printer

- To API doc
- To spec

Set_Printer_Lpi

- To API doc
- To spec

Set_Quality

- To API doc
- To spec

Set_Resolution

- To API doc
- To spec

Set_Resolution_XY

- To API doc
- To spec

Set_Reverse

- To API doc
- To spec

Set_Scale

- To API doc
- To spec

Set_Use_Color

- To API doc
- To spec

To_File

- To API doc
- To spec

To_Key_File

- To API doc
- To spec

Unset

- To API doc
- To spec

# Types

### Gtk_Print_Settings

- Goto declaration in source

    type Gtk_Print_Settings is access all Gtk_Print_Settings_Record'Class;

### Gtk_Page_Range_Record

- Goto declaration in source

    type Gtk_Page_Range_Record is record
          Range_Start : Gint;
          Range_End   : Gint;
       end record;

### Gtk_Page_Range_Array

- Goto declaration in source

    type Gtk_Page_Range_Array is
         array (Integer range <>) of Gtk_Page_Range_Record;

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

### Initialize

- Goto spec in source

    procedure Initialize (Widget: access Gtk_Print_Settings_Record'Class);

Creates a new Gtk_Print_Settings object.

### Gtk_New_From_File

- Goto spec in source

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

### Initialize_From_File

- Goto spec in source

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

Reads the print settings from File_Name. Returns a new Gtk_Print_Settings object with the restored settings, 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_Print_Settings;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_Print_Settings_Record'Class;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "";Error: Glib.Error.GError := null);

Reads the print settings from the group Group_Name in Key_File. Returns a new Gtk_Print_Settings object with the restored settings, or null if an error occurred.

### Copy

- Goto spec in source

    function Copy (Other: access Gtk_Print_Settings_Record) return Gtk_Print_Settings;

Copies a Gtk_Print_Settings object.

### Has_Key

- Goto spec in source

    function Has_Key (Settings: access Gtk_Print_Settings_Record;Key: String) return Boolean;

Returns True, if a value is associated with Key.

### Get

- Goto spec in source

    function Get (Settings: access Gtk_Print_Settings_Record;Key: String) return String;

### Set

- Goto spec in source

    procedure Set (Settings: access Gtk_Print_Settings_Record;Key: String;Value: String := "");

Manipulate string value associated with Key.

### Unset

- Goto spec in source

    procedure Unset (Settings: access Gtk_Print_Settings_Record;Key: String);

Removes any value associated with Key. This has the same effect as setting the value to null.

### Get_Bool

- Goto spec in source

    function Get_Bool (Settings: access Gtk_Print_Settings_Record;Key: String) return Boolean;

### Set_Bool

- Goto spec in source

    procedure Set_Bool (Settings: access Gtk_Print_Settings_Record;Key: String;Value: Boolean);

Gets/Sets the boolean represented by the value that is associated with Key.

### Get_Double

- Goto spec in source

    function Get_Double (Settings: access Gtk_Print_Settings_Record;Key: String;Def: Gdouble := 0.0) return Gdouble;

### Set_Double

- Goto spec in source

    procedure Set_Double (Settings: access Gtk_Print_Settings_Record;Key: String;Value: Gdouble);

Gets/Sets the floating point number represented by the value that is associated with Key, or Def if the value does not represent a floating point number. Floating point numbers are parsed with g_ascii_strtod().

### Get_Int

- Goto spec in source

    function Get_Int (Settings: access Gtk_Print_Settings_Record;Key: String;Def: Gint := 0) return Gint;

### Set_Int

- Goto spec in source

    procedure Set_Int (Settings: access Gtk_Print_Settings_Record;Key: String;Value: Gint);

Gets/Sets the value of Key. Get_Int interprets the value as an integer, or else returns the default value.

### Get_Length

- Goto spec in source

    function Get_Length (Settings: access Gtk_Print_Settings_Record;Key: String;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Set_Length

- Goto spec in source

    procedure Set_Length (Settings: access Gtk_Print_Settings_Record;Key: String;Value: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

Gets/Sets the value associated with Key, interpreted as a length. The returned value is converted to Units.

### Get_Collate

- Goto spec in source

    function Get_Collate (Settings: access Gtk_Print_Settings_Record) return Boolean;

### Set_Collate

- Goto spec in source

    procedure Set_Collate (Settings: access Gtk_Print_Settings_Record;Collate: Boolean);

Whether to collate the printed pages

### Get_Default_Source

- Goto spec in source

    function Get_Default_Source (Settings: access Gtk_Print_Settings_Record) return String;

### Set_Default_Source

- Goto spec in source

    procedure Set_Default_Source (Settings: access Gtk_Print_Settings_Record;Default_Source: String);

The default source

### Get_Dither

- Goto spec in source

    function Get_Dither (Settings: access Gtk_Print_Settings_Record) return String;

### Set_Dither

- Goto spec in source

    procedure Set_Dither (Settings: access Gtk_Print_Settings_Record;Dither: String);

Gets/Sets the dithering that is used

### Get_Duplex

- Goto spec in source

    function Get_Duplex (Settings: access Gtk_Print_Settings_Record) return Gtk.Enums.Gtk_Print_Duplex;

### Set_Duplex

- Goto spec in source

    procedure Set_Duplex (Settings: access Gtk_Print_Settings_Record;Duplex: Gtk.Enums.Gtk_Print_Duplex);

Whether to print the output in duplex.

### Get_Finishings

- Goto spec in source

    function Get_Finishings (Settings: access Gtk_Print_Settings_Record) return String;

### Set_Finishings

- Goto spec in source

    procedure Set_Finishings (Settings: access Gtk_Print_Settings_Record;Finishings: String);

The finishings

### Get_Media_Type

- Goto spec in source

    function Get_Media_Type (Settings: access Gtk_Print_Settings_Record) return String;

### Set_Media_Type

- Goto spec in source

    procedure Set_Media_Type (Settings: access Gtk_Print_Settings_Record;Media_Type: String);

Gets/Sets the media type. The set of media types is defined in PWG 5101.1-2002 PWG.

### Get_N_Copies

- Goto spec in source

    function Get_N_Copies (Settings: access Gtk_Print_Settings_Record) return Gint;

### Set_N_Copies

- Goto spec in source

    procedure Set_N_Copies (Settings: access Gtk_Print_Settings_Record;Num_Copies: Gint);

Gets/Sets the number of copies to print

### Get_Number_Up

- Goto spec in source

    function Get_Number_Up (Settings: access Gtk_Print_Settings_Record) return Gint;

### Set_Number_Up

- Goto spec in source

    procedure Set_Number_Up (Settings: access Gtk_Print_Settings_Record;Number_Up: Gint);

Gets/Sets the number of pages per sheet

### Get_Number_Up_Layout

- Goto spec in source

    function Get_Number_Up_Layout (Settings: access Gtk_Print_Settings_Record) return Gtk.Enums.Gtk_Number_Up_Layout;

### Set_Number_Up_Layout

- Goto spec in source

    procedure Set_Number_Up_Layout (Settings: access Gtk_Print_Settings_Record;Number_Up_Layout: Gtk.Enums.Gtk_Number_Up_Layout);

Gets/Sets layout of page in number-up mode

### Get_Orientation

- Goto spec in source

    function Get_Orientation (Settings: access Gtk_Print_Settings_Record) return Gtk.Enums.Gtk_Page_Orientation;

### Set_Orientation

- Goto spec in source

    procedure Set_Orientation (Settings: access Gtk_Print_Settings_Record;Orientation: Gtk.Enums.Gtk_Page_Orientation);

Get the orientation.

### Get_Output_Bin

- Goto spec in source

    function Get_Output_Bin (Settings: access Gtk_Print_Settings_Record) return String;

### Set_Output_Bin

- Goto spec in source

    procedure Set_Output_Bin (Settings: access Gtk_Print_Settings_Record;Output_Bin: String);

Gets/Sets the output bin.

### Get_Page_Ranges

- Goto spec in source

    function Get_Page_Ranges (Settings: access Gtk_Print_Settings_Record) return Gtk_Page_Range_Array;

### Set_Page_Ranges

- Goto spec in source

    procedure Set_Page_Ranges (Settings: access Gtk_Print_Settings_Record;Page_Ranges: access Gtk_Page_Range_Array);

Gets/Sets an array of Gtk_Page_Range_Records.

### Get_Page_Set

- Goto spec in source

    function Get_Page_Set (Settings: access Gtk_Print_Settings_Record) return Gtk.Enums.Gtk_Page_Set;

### Set_Page_Set

- Goto spec in source

    procedure Set_Page_Set (Settings: access Gtk_Print_Settings_Record;Page_Set: Gtk.Enums.Gtk_Page_Set);

Gets/Sets the set of pages to print

### Get_Paper_Height

- Goto spec in source

    function Get_Paper_Height (Settings: access Gtk_Print_Settings_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Get_Paper_Width

- Goto spec in source

    function Get_Paper_Width (Settings: access Gtk_Print_Settings_Record;Unit: Gtk.Enums.Gtk_Unit) return Gdouble;

### Set_Paper_Height

- Goto spec in source

    procedure Set_Paper_Height (Settings: access Gtk_Print_Settings_Record;Height: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

### Set_Paper_Width

- Goto spec in source

    procedure Set_Paper_Width (Settings: access Gtk_Print_Settings_Record;Width: Gdouble;Unit: Gtk.Enums.Gtk_Unit);

Get/Set the paper height/width, in units of Unit

### Get_Paper_Size

- Goto spec in source

    function Get_Paper_Size (Settings: access Gtk_Print_Settings_Record) return Gtk.Paper_Size.Gtk_Paper_Size;

### Set_Paper_Size

- Goto spec in source

    procedure Set_Paper_Size (Settings: access Gtk_Print_Settings_Record;Paper_Size: Gtk.Paper_Size.Gtk_Paper_Size);

Sets/Gets the paper size.

### Get_Print_Pages

- Goto spec in source

    function Get_Print_Pages (Settings: access Gtk_Print_Settings_Record) return Gtk.Enums.Gtk_Print_Pages;

### Set_Print_Pages

- Goto spec in source

    procedure Set_Print_Pages (Settings: access Gtk_Print_Settings_Record;Pages: Gtk.Enums.Gtk_Print_Pages);

Gets/Sets which pages to print

### Get_Printer

- Goto spec in source

    function Get_Printer (Settings: access Gtk_Print_Settings_Record) return String;

### Set_Printer

- Goto spec in source

    procedure Set_Printer (Settings: access Gtk_Print_Settings_Record;Printer: String);

Gets/Sets the printer name

### Get_Printer_Lpi

- Goto spec in source

    function Get_Printer_Lpi (Settings: access Gtk_Print_Settings_Record) return Gdouble;

### Set_Printer_Lpi

- Goto spec in source

    procedure Set_Printer_Lpi (Settings: access Gtk_Print_Settings_Record;Lpi: Gdouble);

Gets/Sets the resolution in lpi (lines per inch)

### Get_Quality

- Goto spec in source

    function Get_Quality (Settings: access Gtk_Print_Settings_Record) return Gtk.Enums.Gtk_Print_Quality;

### Set_Quality

- Goto spec in source

    procedure Set_Quality (Settings: access Gtk_Print_Settings_Record;Quality: Gtk.Enums.Gtk_Print_Quality);

Gets/Sets the print quality

### Get_Resolution

- Goto spec in source

    function Get_Resolution (Settings: access Gtk_Print_Settings_Record) return Gint;

### Set_Resolution

- Goto spec in source

    procedure Set_Resolution (Settings: access Gtk_Print_Settings_Record;Resolution: Gint);

Gets/Sets the resolution in dpi.

### Get_Resolution_X

- Goto spec in source

    function Get_Resolution_X (Settings: access Gtk_Print_Settings_Record) return Gint;

### Get_Resolution_Y

- Goto spec in source

    function Get_Resolution_Y (Settings: access Gtk_Print_Settings_Record) return Gint;

### Set_Resolution_XY

- Goto spec in source

    procedure Set_Resolution_XY (Settings: access Gtk_Print_Settings_Record;Resolution_X: Gint;Resolution_Y: Gint);

Gets/Sets the horizontal/vertical resolution, in dpi.

### Get_Reverse

- Goto spec in source

    function Get_Reverse (Settings: access Gtk_Print_Settings_Record) return Boolean;

### Set_Reverse

- Goto spec in source

    procedure Set_Reverse (Settings: access Gtk_Print_Settings_Record;Rev: Boolean);

Returns whether to reverse the order of the printed pages

### Get_Scale

- Goto spec in source

    function Get_Scale (Settings: access Gtk_Print_Settings_Record) return Gdouble;

### Set_Scale

- Goto spec in source

    procedure Set_Scale (Settings: access Gtk_Print_Settings_Record;Scale: Gdouble);

Returns the scale in percent

### Get_Use_Color

- Goto spec in source

    function Get_Use_Color (Settings: access Gtk_Print_Settings_Record) return Boolean;

### Set_Use_Color

- Goto spec in source

    procedure Set_Use_Color (Settings: access Gtk_Print_Settings_Record;Use_Color: Boolean);

Returns whether to use color

### Load_File

- Goto spec in source

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

Reads the print settings from File_Name. See To_File. Returns True on success.

### Load_Key_File

- Goto spec in source

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

Reads the print settings from the group Group_Name ("Print Settings" by default) in Key_File. Returns True on success

### To_File

- Goto spec in source

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

This function saves the print settings from Settings to File_Name. Returns True on success

### To_Key_File

- Goto spec in source

    procedure To_Key_File (Settings: access Gtk_Print_Settings_Record;Key_File: Glib.Key_File.G_Key_File;Group_Name: String := "");

This function adds the print settings from Settings to Key_File. if Group_Name is not specified, it defaults to "Print Settings".