Gtk.Print_Settings

Entities

Array Types

Record Types

Tagged Types

Access Types

Subprograms

Description

A GtkPrintSettings 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.

Its 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.

Printing support was added in GTK+ 2.10.

Copy

function Copy
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk_Print_Settings

Copies a Gtk.Print_Settings.Gtk_Print_Settings object. Since: gtk+ 2.10

Parameters
Self
Return Value

a newly allocated copy of Other

Foreach

procedure Foreach
   (Self : not null access Gtk_Print_Settings_Record;
    Func : Gtk_Print_Settings_Func)

Calls Func for each key-value pair of Settings. Since: gtk+ 2.10

Parameters
Self
Func

the function to call

Get

function Get
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String) return UTF8_String

Looks up the string value associated with Key. Since: gtk+ 2.10

Parameters
Self
Key

a key

Return Value

the string value for Key

Get_Bool

function Get_Bool
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String) return Boolean

Returns the boolean represented by the value that is associated with Key. The string "true" represents True, any other string False. Since: gtk+ 2.10

Parameters
Self
Key

a key

Return Value

True, if Key maps to a true value.

Get_Collate

function Get_Collate
   (Self : not null access Gtk_Print_Settings_Record) return Boolean

Gets the value of GTK_PRINT_SETTINGS_COLLATE. Since: gtk+ 2.10

Parameters
Self
Return Value

whether to collate the printed pages

Get_Default_Source

function Get_Default_Source
   (Self : not null access Gtk_Print_Settings_Record) return UTF8_String

Gets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE. Since: gtk+ 2.10

Parameters
Self
Return Value

the default source

Get_Dither

function Get_Dither
   (Self : not null access Gtk_Print_Settings_Record) return UTF8_String

Gets the value of GTK_PRINT_SETTINGS_DITHER. Since: gtk+ 2.10

Parameters
Self
Return Value

the dithering that is used

Get_Double

function Get_Double
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String) return Gdouble

Returns the double value associated with Key, or 0. Since: gtk+ 2.10

Parameters
Self
Key

a key

Return Value

the double value of Key

Get_Double_With_Default

function Get_Double_With_Default
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String;
    Def  : Gdouble) return Gdouble

Returns the floating point number represented by the value that is associated with Key, or Default_Val if the value does not represent a floating point number. Floating point numbers are parsed with g_ascii_strtod. Since: gtk+ 2.10

Parameters
Self
Key

a key

Def

the default value

Return Value

the floating point number associated with Key

Get_Duplex

function Get_Duplex
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Enums.Gtk_Print_Duplex

Gets the value of GTK_PRINT_SETTINGS_DUPLEX. Since: gtk+ 2.10

Parameters
Self
Return Value

whether to print the output in duplex.

Get_Finishings

function Get_Finishings
   (Self : not null access Gtk_Print_Settings_Record) return UTF8_String

Gets the value of GTK_PRINT_SETTINGS_FINISHINGS. Since: gtk+ 2.10

Parameters
Self
Return Value

the finishings

Get_Int

function Get_Int
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String) return Glib.Gint

Returns the integer value of Key, or 0. Since: gtk+ 2.10

Parameters
Self
Key

a key

Return Value

the integer value of Key

Get_Int_With_Default

function Get_Int_With_Default
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String;
    Def  : Glib.Gint) return Glib.Gint

Returns the value of Key, interpreted as an integer, or the default value. Since: gtk+ 2.10

Parameters
Self
Key

a key

Def

the default value

Return Value

the integer value of Key

Get_Length

function Get_Length
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String;
    Unit : Gtk.Enums.Gtk_Unit) return Gdouble

Returns the value associated with Key, interpreted as a length. The returned value is converted to Units. Since: gtk+ 2.10

Parameters
Self
Key

a key

Unit

the unit of the return value

Return Value

the length value of Key, converted to Unit

Get_Media_Type

function Get_Media_Type
   (Self : not null access Gtk_Print_Settings_Record) return UTF8_String

Gets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE. The set of media types is defined in PWG 5101.1-2002 PWG. Since: gtk+ 2.10

Parameters
Self
Return Value

the media type

Get_N_Copies

function Get_N_Copies
   (Self : not null access Gtk_Print_Settings_Record) return Glib.Gint

Gets the value of GTK_PRINT_SETTINGS_N_COPIES. Since: gtk+ 2.10

Parameters
Self
Return Value

the number of copies to print

Get_Number_Up

function Get_Number_Up
   (Self : not null access Gtk_Print_Settings_Record) return Glib.Gint

Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP. Since: gtk+ 2.10

Parameters
Self
Return Value

the number of pages per sheet

Get_Number_Up_Layout

function Get_Number_Up_Layout
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Enums.Gtk_Number_Up_Layout

Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT. Since: gtk+ 2.14

Parameters
Self
Return Value

layout of page in number-up mode

Get_Orientation

function Get_Orientation
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Enums.Gtk_Page_Orientation

Get the value of GTK_PRINT_SETTINGS_ORIENTATION, converted to a Gtk.Enums.Gtk_Page_Orientation. Since: gtk+ 2.10

Parameters
Self
Return Value

the orientation

Get_Output_Bin

function Get_Output_Bin
   (Self : not null access Gtk_Print_Settings_Record) return UTF8_String

Gets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN. Since: gtk+ 2.10

Parameters
Self
Return Value

the output bin

Get_Page_Ranges

function Get_Page_Ranges
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk_Page_Range_Array

Gets the value of GTK_PRINT_SETTINGS_PAGE_RANGES. Since: gtk+ 2.10

Parameters
Self
Return Value

Get_Page_Set

function Get_Page_Set
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Enums.Gtk_Page_Set

Gets the value of GTK_PRINT_SETTINGS_PAGE_SET. Since: gtk+ 2.10

Parameters
Self
Return Value

the set of pages to print

Get_Paper_Height

function Get_Paper_Height
   (Self : not null access Gtk_Print_Settings_Record;
    Unit : Gtk.Enums.Gtk_Unit) return Gdouble

Gets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to Unit. Since: gtk+ 2.10

Parameters
Self
Unit

the unit for the return value

Return Value

the paper height, in units of Unit

Get_Paper_Size

function Get_Paper_Size
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Paper_Size.Gtk_Paper_Size

Gets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a Gtk.Paper_Size.Gtk_Paper_Size. Since: gtk+ 2.10

Parameters
Self
Return Value

the paper size

Get_Paper_Width

function Get_Paper_Width
   (Self : not null access Gtk_Print_Settings_Record;
    Unit : Gtk.Enums.Gtk_Unit) return Gdouble

Gets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to Unit. Since: gtk+ 2.10

Parameters
Self
Unit

the unit for the return value

Return Value

the paper width, in units of Unit

Get_Print_Pages

function Get_Print_Pages
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Enums.Gtk_Print_Pages

Gets the value of GTK_PRINT_SETTINGS_PRINT_PAGES. Since: gtk+ 2.10

Parameters
Self
Return Value

which pages to print

Get_Printer

function Get_Printer
   (Self : not null access Gtk_Print_Settings_Record) return UTF8_String

Convenience function to obtain the value of GTK_PRINT_SETTINGS_PRINTER. Since: gtk+ 2.10

Parameters
Self
Return Value

the printer name

Get_Printer_Lpi

function Get_Printer_Lpi
   (Self : not null access Gtk_Print_Settings_Record) return Gdouble

Gets the value of GTK_PRINT_SETTINGS_PRINTER_LPI. Since: gtk+ 2.16

Parameters
Self
Return Value

the resolution in lpi (lines per inch)

Get_Quality

function Get_Quality
   (Self : not null access Gtk_Print_Settings_Record)
    return Gtk.Enums.Gtk_Print_Quality

Gets the value of GTK_PRINT_SETTINGS_QUALITY. Since: gtk+ 2.10

Parameters
Self
Return Value

the print quality

Get_Resolution

function Get_Resolution
   (Self : not null access Gtk_Print_Settings_Record) return Glib.Gint

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION. Since: gtk+ 2.10

Parameters
Self
Return Value

the resolution in dpi

Get_Resolution_X

function Get_Resolution_X
   (Self : not null access Gtk_Print_Settings_Record) return Glib.Gint

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_X. Since: gtk+ 2.16

Parameters
Self
Return Value

the horizontal resolution in dpi

Get_Resolution_Y

function Get_Resolution_Y
   (Self : not null access Gtk_Print_Settings_Record) return Glib.Gint

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_Y. Since: gtk+ 2.16

Parameters
Self
Return Value

the vertical resolution in dpi

Get_Reverse

function Get_Reverse
   (Self : not null access Gtk_Print_Settings_Record) return Boolean

Gets the value of GTK_PRINT_SETTINGS_REVERSE. Since: gtk+ 2.10

Parameters
Self
Return Value

whether to reverse the order of the printed pages

Get_Scale

function Get_Scale
   (Self : not null access Gtk_Print_Settings_Record) return Gdouble

Gets the value of GTK_PRINT_SETTINGS_SCALE. Since: gtk+ 2.10

Parameters
Self
Return Value

the scale in percent

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Use_Color

function Get_Use_Color
   (Self : not null access Gtk_Print_Settings_Record) return Boolean

Gets the value of GTK_PRINT_SETTINGS_USE_COLOR. Since: gtk+ 2.10

Parameters
Self
Return Value

whether to use color

Gtk_New

procedure Gtk_New (Self : out Gtk_Print_Settings)

Creates a new Gtk.Print_Settings.Gtk_Print_Settings object. Since: gtk+ 2.10 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Gtk_New_From_File

procedure Gtk_New_From_File
   (Self      : out Gtk_Print_Settings;
    File_Name : UTF8_String)

Reads the print settings from File_Name. Returns a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, or null if an error occurred. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. See Gtk.Print_Settings.To_File. Since: gtk+ 2.12 Initialize_From_File does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
File_Name

the filename to read the settings from

Gtk_New_From_Gvariant

procedure Gtk_New_From_Gvariant
   (Self    : out Gtk_Print_Settings;
    Variant : Glib.Variant.Gvariant)

Deserialize print settings from an a{sv} variant in the format produced by Gtk.Print_Settings.To_Gvariant. Since: gtk+ 3.22 Initialize_From_Gvariant does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
Variant

an a{sv} Glib.Variant.Gvariant

Gtk_New_From_Key_File

procedure Gtk_New_From_Key_File
   (Self       : out Gtk_Print_Settings;
    Key_File   : Glib.Key_File.G_Key_File;
    Group_Name : UTF8_String := "")

Reads the print settings from the group Group_Name in Key_File. Returns a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, or null if an error occurred. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. Since: gtk+ 2.12 Initialize_From_Key_File does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
Key_File

the Gkey.File.Gkey_File to retrieve the settings from

Group_Name

the name of the group to use, or null to use the default "Print Settings"

Gtk_Page_Range_Array

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

Page range specification(s).

Gtk_Page_Range_Record

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

Page range specification(s).

Record fields
Range_Start
Range_End

Gtk_Print_Settings

type Gtk_Print_Settings is access all Gtk_Print_Settings_Record'Class;

Gtk_Print_Settings_Func

type Gtk_Print_Settings_Func is access procedure (Key : UTF8_String; Value : UTF8_String);
Parameters
Key
Value

Gtk_Print_Settings_New

function Gtk_Print_Settings_New return Gtk_Print_Settings

Creates a new Gtk.Print_Settings.Gtk_Print_Settings object. Since: gtk+ 2.10

Return Value

Gtk_Print_Settings_New_From_File

function Gtk_Print_Settings_New_From_File
   (File_Name : UTF8_String) return Gtk_Print_Settings

Reads the print settings from File_Name. Returns a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, or null if an error occurred. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. See Gtk.Print_Settings.To_File. Since: gtk+ 2.12

Parameters
File_Name

the filename to read the settings from

Return Value

Gtk_Print_Settings_New_From_Gvariant

function Gtk_Print_Settings_New_From_Gvariant
   (Variant : Glib.Variant.Gvariant) return Gtk_Print_Settings

Deserialize print settings from an a{sv} variant in the format produced by Gtk.Print_Settings.To_Gvariant. Since: gtk+ 3.22

Parameters
Variant

an a{sv} Glib.Variant.Gvariant

Return Value

Gtk_Print_Settings_New_From_Key_File

function Gtk_Print_Settings_New_From_Key_File
   (Key_File   : Glib.Key_File.G_Key_File;
    Group_Name : UTF8_String := "") return Gtk_Print_Settings

Reads the print settings from the group Group_Name in Key_File. Returns a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, or null if an error occurred. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. Since: gtk+ 2.12

Parameters
Key_File

the Gkey.File.Gkey_File to retrieve the settings from

Group_Name

the name of the group to use, or null to use the default "Print Settings"

Return Value

Gtk_Print_Settings_Record

type Gtk_Print_Settings_Record is new GObject_Record with null record;

Has_Key

function Has_Key
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String) return Boolean

Returns True, if a value is associated with Key. Since: gtk+ 2.10

Parameters
Self
Key

a key

Return Value

True, if Key has a value

Initialize

procedure Initialize
   (Self : not null access Gtk_Print_Settings_Record'Class)

Creates a new Gtk.Print_Settings.Gtk_Print_Settings object. Since: gtk+ 2.10 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Initialize_From_File

procedure Initialize_From_File
   (Self      : not null access Gtk_Print_Settings_Record'Class;
    File_Name : UTF8_String)

Reads the print settings from File_Name. Returns a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, or null if an error occurred. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. See Gtk.Print_Settings.To_File. Since: gtk+ 2.12 Initialize_From_File does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
File_Name

the filename to read the settings from

Initialize_From_Gvariant

procedure Initialize_From_Gvariant
   (Self    : not null access Gtk_Print_Settings_Record'Class;
    Variant : Glib.Variant.Gvariant)

Deserialize print settings from an a{sv} variant in the format produced by Gtk.Print_Settings.To_Gvariant. Since: gtk+ 3.22 Initialize_From_Gvariant does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
Variant

an a{sv} Glib.Variant.Gvariant

Initialize_From_Key_File

procedure Initialize_From_Key_File
   (Self       : not null access Gtk_Print_Settings_Record'Class;
    Key_File   : Glib.Key_File.G_Key_File;
    Group_Name : UTF8_String := "")

Reads the print settings from the group Group_Name in Key_File. Returns a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, or null if an error occurred. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. Since: gtk+ 2.12 Initialize_From_Key_File does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self
Key_File

the Gkey.File.Gkey_File to retrieve the settings from

Group_Name

the name of the group to use, or null to use the default "Print Settings"

Load_File

function Load_File
   (Self      : not null access Gtk_Print_Settings_Record;
    File_Name : UTF8_String) return Boolean

Reads the print settings from File_Name. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. See Gtk.Print_Settings.To_File. Since: gtk+ 2.14

Parameters
Self
File_Name

the filename to read the settings from

Return Value

True on success

Load_Key_File

function Load_Key_File
   (Self       : not null access Gtk_Print_Settings_Record;
    Key_File   : Glib.Key_File.G_Key_File;
    Group_Name : UTF8_String := "") return Boolean

Reads the print settings from the group Group_Name in Key_File. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. Since: gtk+ 2.14

Parameters
Self
Key_File

the Gkey.File.Gkey_File to retrieve the settings from

Group_Name

the name of the group to use, or null to use the default "Print Settings"

Return Value

True on success

Set

procedure Set
   (Self  : not null access Gtk_Print_Settings_Record;
    Key   : UTF8_String;
    Value : UTF8_String := "")

Associates Value with Key. Since: gtk+ 2.10

Parameters
Self
Key

a key

Value

a string value, or null

Set_Bool

procedure Set_Bool
   (Self  : not null access Gtk_Print_Settings_Record;
    Key   : UTF8_String;
    Value : Boolean)

Sets Key to a boolean value. Since: gtk+ 2.10

Parameters
Self
Key

a key

Value

a boolean

Set_Collate

procedure Set_Collate
   (Self    : not null access Gtk_Print_Settings_Record;
    Collate : Boolean)

Sets the value of GTK_PRINT_SETTINGS_COLLATE. Since: gtk+ 2.10

Parameters
Self
Collate

whether to collate the output

Set_Default_Source

procedure Set_Default_Source
   (Self           : not null access Gtk_Print_Settings_Record;
    Default_Source : UTF8_String)

Sets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE. Since: gtk+ 2.10

Parameters
Self
Default_Source

the default source

Set_Dither

procedure Set_Dither
   (Self   : not null access Gtk_Print_Settings_Record;
    Dither : UTF8_String)

Sets the value of GTK_PRINT_SETTINGS_DITHER. Since: gtk+ 2.10

Parameters
Self
Dither

the dithering that is used

Set_Double

procedure Set_Double
   (Self  : not null access Gtk_Print_Settings_Record;
    Key   : UTF8_String;
    Value : Gdouble)

Sets Key to a double value. Since: gtk+ 2.10

Parameters
Self
Key

a key

Value

a double value

Set_Duplex

procedure Set_Duplex
   (Self   : not null access Gtk_Print_Settings_Record;
    Duplex : Gtk.Enums.Gtk_Print_Duplex)

Sets the value of GTK_PRINT_SETTINGS_DUPLEX. Since: gtk+ 2.10

Parameters
Self
Duplex

a Gtk.Enums.Gtk_Print_Duplex value

Set_Finishings

procedure Set_Finishings
   (Self       : not null access Gtk_Print_Settings_Record;
    Finishings : UTF8_String)

Sets the value of GTK_PRINT_SETTINGS_FINISHINGS. Since: gtk+ 2.10

Parameters
Self
Finishings

the finishings

Set_Int

procedure Set_Int
   (Self  : not null access Gtk_Print_Settings_Record;
    Key   : UTF8_String;
    Value : Glib.Gint)

Sets Key to an integer value. Since: gtk+ 2.10

Parameters
Self
Key

a key

Value

an integer

Set_Length

procedure Set_Length
   (Self  : not null access Gtk_Print_Settings_Record;
    Key   : UTF8_String;
    Value : Gdouble;
    Unit  : Gtk.Enums.Gtk_Unit)

Associates a length in units of Unit with Key. Since: gtk+ 2.10

Parameters
Self
Key

a key

Value

a length

Unit

the unit of Length

Set_Media_Type

procedure Set_Media_Type
   (Self       : not null access Gtk_Print_Settings_Record;
    Media_Type : UTF8_String)

Sets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE. The set of media types is defined in PWG 5101.1-2002 PWG. Since: gtk+ 2.10

Parameters
Self
Media_Type

the media type

Set_N_Copies

procedure Set_N_Copies
   (Self       : not null access Gtk_Print_Settings_Record;
    Num_Copies : Glib.Gint)

Sets the value of GTK_PRINT_SETTINGS_N_COPIES. Since: gtk+ 2.10

Parameters
Self
Num_Copies

the number of copies

Set_Number_Up

procedure Set_Number_Up
   (Self      : not null access Gtk_Print_Settings_Record;
    Number_Up : Glib.Gint)

Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP. Since: gtk+ 2.10

Parameters
Self
Number_Up

the number of pages per sheet

Set_Number_Up_Layout

procedure Set_Number_Up_Layout
   (Self             : not null access Gtk_Print_Settings_Record;
    Number_Up_Layout : Gtk.Enums.Gtk_Number_Up_Layout)

Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT. Since: gtk+ 2.14

Parameters
Self
Number_Up_Layout

a Gtk.Enums.Gtk_Number_Up_Layout value

Set_Orientation

procedure Set_Orientation
   (Self        : not null access Gtk_Print_Settings_Record;
    Orientation : Gtk.Enums.Gtk_Page_Orientation)

Sets the value of GTK_PRINT_SETTINGS_ORIENTATION. Since: gtk+ 2.10

Parameters
Self
Orientation

a page orientation

Set_Output_Bin

procedure Set_Output_Bin
   (Self       : not null access Gtk_Print_Settings_Record;
    Output_Bin : UTF8_String)

Sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN. Since: gtk+ 2.10

Parameters
Self
Output_Bin

the output bin

Set_Page_Ranges

procedure Set_Page_Ranges
   (Self        : not null access Gtk_Print_Settings_Record;
    Page_Ranges : Gtk_Page_Range_Array)

Sets the value of GTK_PRINT_SETTINGS_PAGE_RANGES. Since: gtk+ 2.10

Parameters
Self
Page_Ranges

an array of Gtk_Page_Ranges

Set_Page_Set

procedure Set_Page_Set
   (Self     : not null access Gtk_Print_Settings_Record;
    Page_Set : Gtk.Enums.Gtk_Page_Set)

Sets the value of GTK_PRINT_SETTINGS_PAGE_SET. Since: gtk+ 2.10

Parameters
Self
Page_Set

a Gtk.Enums.Gtk_Page_Set value

Set_Paper_Height

procedure Set_Paper_Height
   (Self   : not null access Gtk_Print_Settings_Record;
    Height : Gdouble;
    Unit   : Gtk.Enums.Gtk_Unit)

Sets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT. Since: gtk+ 2.10

Parameters
Self
Height

the paper height

Unit

the units of Height

Set_Paper_Size

procedure Set_Paper_Size
   (Self       : not null access Gtk_Print_Settings_Record;
    Paper_Size : Gtk.Paper_Size.Gtk_Paper_Size)

Sets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, GTK_PRINT_SETTINGS_PAPER_WIDTH and GTK_PRINT_SETTINGS_PAPER_HEIGHT. Since: gtk+ 2.10

Parameters
Self
Paper_Size

a paper size

Set_Paper_Width

procedure Set_Paper_Width
   (Self  : not null access Gtk_Print_Settings_Record;
    Width : Gdouble;
    Unit  : Gtk.Enums.Gtk_Unit)

Sets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH. Since: gtk+ 2.10

Parameters
Self
Width

the paper width

Unit

the units of Width

Set_Print_Pages

procedure Set_Print_Pages
   (Self  : not null access Gtk_Print_Settings_Record;
    Pages : Gtk.Enums.Gtk_Print_Pages)

Sets the value of GTK_PRINT_SETTINGS_PRINT_PAGES. Since: gtk+ 2.10

Parameters
Self
Pages

a Gtk.Enums.Gtk_Print_Pages value

Set_Printer

procedure Set_Printer
   (Self    : not null access Gtk_Print_Settings_Record;
    Printer : UTF8_String)

Convenience function to set GTK_PRINT_SETTINGS_PRINTER to Printer. Since: gtk+ 2.10

Parameters
Self
Printer

the printer name

Set_Printer_Lpi

procedure Set_Printer_Lpi
   (Self : not null access Gtk_Print_Settings_Record;
    Lpi  : Gdouble)

Sets the value of GTK_PRINT_SETTINGS_PRINTER_LPI. Since: gtk+ 2.16

Parameters
Self
Lpi

the resolution in lpi (lines per inch)

Set_Quality

procedure Set_Quality
   (Self    : not null access Gtk_Print_Settings_Record;
    Quality : Gtk.Enums.Gtk_Print_Quality)

Sets the value of GTK_PRINT_SETTINGS_QUALITY. Since: gtk+ 2.10

Parameters
Self
Quality

a Gtk.Enums.Gtk_Print_Quality value

Set_Resolution

procedure Set_Resolution
   (Self       : not null access Gtk_Print_Settings_Record;
    Resolution : Glib.Gint)

Sets the values of GTK_PRINT_SETTINGS_RESOLUTION, GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y. Since: gtk+ 2.10

Parameters
Self
Resolution

the resolution in dpi

Set_Resolution_Xy

procedure Set_Resolution_Xy
   (Self         : not null access Gtk_Print_Settings_Record;
    Resolution_X : Glib.Gint;
    Resolution_Y : Glib.Gint)

Sets the values of GTK_PRINT_SETTINGS_RESOLUTION, GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y. Since: gtk+ 2.16

Parameters
Self
Resolution_X

the horizontal resolution in dpi

Resolution_Y

the vertical resolution in dpi

Set_Reverse

procedure Set_Reverse
   (Self        : not null access Gtk_Print_Settings_Record;
    Gtk_Reverse : Boolean)

Sets the value of GTK_PRINT_SETTINGS_REVERSE. Since: gtk+ 2.10

Parameters
Self
Gtk_Reverse

whether to reverse the output

Set_Scale

procedure Set_Scale
   (Self  : not null access Gtk_Print_Settings_Record;
    Scale : Gdouble)

Sets the value of GTK_PRINT_SETTINGS_SCALE. Since: gtk+ 2.10

Parameters
Self
Scale

the scale in percent

Set_Use_Color

procedure Set_Use_Color
   (Self      : not null access Gtk_Print_Settings_Record;
    Use_Color : Boolean)

Sets the value of GTK_PRINT_SETTINGS_USE_COLOR. Since: gtk+ 2.10

Parameters
Self
Use_Color

whether to use color

To_File

function To_File
   (Self      : not null access Gtk_Print_Settings_Record;
    File_Name : UTF8_String) return Boolean

This function saves the print settings from Settings to File_Name. If the file could not be loaded then error is set to either a GFile_Error or GKey_File_Error. Since: gtk+ 2.12

Parameters
Self
File_Name

the file to save to

Return Value

True on success

To_Gvariant

function To_Gvariant
   (Self : not null access Gtk_Print_Settings_Record)
    return Glib.Variant.Gvariant

Serialize print settings to an a{sv} variant. Since: gtk+ 3.22

Parameters
Self
Return Value

a new, floating, Glib.Variant.Gvariant

To_Key_File

procedure To_Key_File
   (Self       : not null access Gtk_Print_Settings_Record;
    Key_File   : Glib.Key_File.G_Key_File;
    Group_Name : UTF8_String := "")

This function adds the print settings from Settings to Key_File. Since: gtk+ 2.12

Parameters
Self
Key_File

the Gkey.File.Gkey_File to save the print settings to

Group_Name

the group to add the settings to in Key_File, or null to use the default "Print Settings"

Unset

procedure Unset
   (Self : not null access Gtk_Print_Settings_Record;
    Key  : UTF8_String)

Removes any value associated with Key. This has the same effect as setting the value to null. Since: gtk+ 2.10

Parameters
Self
Key

a key