Class

GtkPrintSettings

Description [src]

final class Gtk.PrintSettings : GObject.Object
{
  /* No available fields */
}

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.

Hierarchy

hierarchy this GtkPrintSettings ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

gtk_print_settings_new

Creates a new GtkPrintSettings object.

since: 2.10

gtk_print_settings_new_from_file

Reads the print settings from file_name. Returns a new GtkPrintSettings 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 GFileError or GKeyFileError. See gtk_print_settings_to_file().

since: 2.12

gtk_print_settings_new_from_gvariant

Deserialize print settings from an a{sv} variant in the format produced by gtk_print_settings_to_gvariant().

since: 3.22

gtk_print_settings_new_from_key_file

Reads the print settings from the group group_name in key_file. Returns a new GtkPrintSettings 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 GFileError or GKeyFileError.

since: 2.12

Instance methods

gtk_print_settings_copy

Copies a GtkPrintSettings object.

since: 2.10

gtk_print_settings_foreach

Calls func for each key-value pair of settings.

since: 2.10

gtk_print_settings_get

Looks up the string value associated with key.

since: 2.10

gtk_print_settings_get_bool

Returns the boolean represented by the value that is associated with key.

since: 2.10

gtk_print_settings_get_collate

Gets the value of GTK_PRINT_SETTINGS_COLLATE.

since: 2.10

gtk_print_settings_get_default_source

Gets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

since: 2.10

gtk_print_settings_get_dither

Gets the value of GTK_PRINT_SETTINGS_DITHER.

since: 2.10

gtk_print_settings_get_double

Returns the double value associated with key, or 0.

since: 2.10

gtk_print_settings_get_double_with_default

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.

since: 2.10

gtk_print_settings_get_duplex

Gets the value of GTK_PRINT_SETTINGS_DUPLEX.

since: 2.10

gtk_print_settings_get_finishings

Gets the value of GTK_PRINT_SETTINGS_FINISHINGS.

since: 2.10

gtk_print_settings_get_int

Returns the integer value of key, or 0.

since: 2.10

gtk_print_settings_get_int_with_default

Returns the value of key, interpreted as an integer, or the default value.

since: 2.10

gtk_print_settings_get_length

Returns the value associated with key, interpreted as a length. The returned value is converted to units.

since: 2.10

gtk_print_settings_get_media_type

Gets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.

since: 2.10

gtk_print_settings_get_n_copies

Gets the value of GTK_PRINT_SETTINGS_N_COPIES.

since: 2.10

gtk_print_settings_get_number_up

Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP.

since: 2.10

gtk_print_settings_get_number_up_layout

Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

since: 2.14

gtk_print_settings_get_orientation

Get the value of GTK_PRINT_SETTINGS_ORIENTATION, converted to a GtkPageOrientation.

since: 2.10

gtk_print_settings_get_output_bin

Gets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.

since: 2.10

gtk_print_settings_get_page_ranges

Gets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.

since: 2.10

gtk_print_settings_get_page_set

Gets the value of GTK_PRINT_SETTINGS_PAGE_SET.

since: 2.10

gtk_print_settings_get_paper_height

Gets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to unit.

since: 2.10

gtk_print_settings_get_paper_size

Gets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a GtkPaperSize.

since: 2.10

gtk_print_settings_get_paper_width

Gets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to unit.

since: 2.10

gtk_print_settings_get_print_pages

Gets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.

since: 2.10

gtk_print_settings_get_printer

Convenience function to obtain the value of GTK_PRINT_SETTINGS_PRINTER.

since: 2.10

gtk_print_settings_get_printer_lpi

Gets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.

since: 2.16

gtk_print_settings_get_quality

Gets the value of GTK_PRINT_SETTINGS_QUALITY.

since: 2.10

gtk_print_settings_get_resolution

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION.

since: 2.10

gtk_print_settings_get_resolution_x

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_X.

since: 2.16

gtk_print_settings_get_resolution_y

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_Y.

since: 2.16

gtk_print_settings_get_reverse

Gets the value of GTK_PRINT_SETTINGS_REVERSE.

since: 2.10

gtk_print_settings_get_scale

Gets the value of GTK_PRINT_SETTINGS_SCALE.

since: 2.10

gtk_print_settings_get_use_color

Gets the value of GTK_PRINT_SETTINGS_USE_COLOR.

since: 2.10

gtk_print_settings_has_key

Returns TRUE, if a value is associated with key.

since: 2.10

gtk_print_settings_load_file

Reads the print settings from file_name. If the file could not be loaded then error is set to either a GFileError or GKeyFileError. See gtk_print_settings_to_file().

since: 2.14

gtk_print_settings_load_key_file

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 GFileError or GKeyFileError.

since: 2.14

gtk_print_settings_set

Associates value with key.

since: 2.10

gtk_print_settings_set_bool

Sets key to a boolean value.

since: 2.10

gtk_print_settings_set_collate

Sets the value of GTK_PRINT_SETTINGS_COLLATE.

since: 2.10

gtk_print_settings_set_default_source

Sets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

since: 2.10

gtk_print_settings_set_dither

Sets the value of GTK_PRINT_SETTINGS_DITHER.

since: 2.10

gtk_print_settings_set_double

Sets key to a double value.

since: 2.10

gtk_print_settings_set_duplex

Sets the value of GTK_PRINT_SETTINGS_DUPLEX.

since: 2.10

gtk_print_settings_set_finishings

Sets the value of GTK_PRINT_SETTINGS_FINISHINGS.

since: 2.10

gtk_print_settings_set_int

Sets key to an integer value.

since: 2.10

gtk_print_settings_set_length

Associates a length in units of unit with key.

since: 2.10

gtk_print_settings_set_media_type

Sets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.

since: 2.10

gtk_print_settings_set_n_copies

Sets the value of GTK_PRINT_SETTINGS_N_COPIES.

since: 2.10

gtk_print_settings_set_number_up

Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP.

since: 2.10

gtk_print_settings_set_number_up_layout

Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

since: 2.14

gtk_print_settings_set_orientation

Sets the value of GTK_PRINT_SETTINGS_ORIENTATION.

since: 2.10

gtk_print_settings_set_output_bin

Sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.

since: 2.10

gtk_print_settings_set_page_ranges

Sets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.

since: 2.10

gtk_print_settings_set_page_set

Sets the value of GTK_PRINT_SETTINGS_PAGE_SET.

since: 2.10

gtk_print_settings_set_paper_height

Sets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT.

since: 2.10

gtk_print_settings_set_paper_size

Sets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, GTK_PRINT_SETTINGS_PAPER_WIDTH and GTK_PRINT_SETTINGS_PAPER_HEIGHT.

since: 2.10

gtk_print_settings_set_paper_width

Sets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH.

since: 2.10

gtk_print_settings_set_print_pages

Sets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.

since: 2.10

gtk_print_settings_set_printer

Convenience function to set GTK_PRINT_SETTINGS_PRINTER to printer.

since: 2.10

gtk_print_settings_set_printer_lpi

Sets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.

since: 2.16

gtk_print_settings_set_quality

Sets the value of GTK_PRINT_SETTINGS_QUALITY.

since: 2.10

gtk_print_settings_set_resolution

Sets the values of GTK_PRINT_SETTINGS_RESOLUTION, GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y.

since: 2.10

gtk_print_settings_set_resolution_xy

Sets the values of GTK_PRINT_SETTINGS_RESOLUTION, GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y.

since: 2.16

gtk_print_settings_set_reverse

Sets the value of GTK_PRINT_SETTINGS_REVERSE.

since: 2.10

gtk_print_settings_set_scale

Sets the value of GTK_PRINT_SETTINGS_SCALE.

since: 2.10

gtk_print_settings_set_use_color

Sets the value of GTK_PRINT_SETTINGS_USE_COLOR.

since: 2.10

gtk_print_settings_to_file

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 GFileError or GKeyFileError.

since: 2.12

gtk_print_settings_to_gvariant

Serialize print settings to an a{sv} variant.

since: 3.22

gtk_print_settings_to_key_file

This function adds the print settings from settings to key_file.

since: 2.12

gtk_print_settings_unset

Removes any value associated with key. This has the same effect as setting the value to NULL.

since: 2.10

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.