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.

Available 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().

Available 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().

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

Available since: 2.12

Instance methods

gtk_print_settings_copy

Copies a GtkPrintSettings object.

Available since: 2.10

gtk_print_settings_foreach

Calls func for each key-value pair of settings.

Available since: 2.10

gtk_print_settings_get

Looks up the string value associated with key.

Available since: 2.10

gtk_print_settings_get_bool

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

Available since: 2.10

gtk_print_settings_get_collate

Gets the value of GTK_PRINT_SETTINGS_COLLATE.

Available since: 2.10

gtk_print_settings_get_default_source

Gets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

Available since: 2.10

gtk_print_settings_get_dither

Gets the value of GTK_PRINT_SETTINGS_DITHER.

Available since: 2.10

gtk_print_settings_get_double

Returns the double value associated with key, or 0.

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

Available since: 2.10

gtk_print_settings_get_duplex

Gets the value of GTK_PRINT_SETTINGS_DUPLEX.

Available since: 2.10

gtk_print_settings_get_finishings

Gets the value of GTK_PRINT_SETTINGS_FINISHINGS.

Available since: 2.10

gtk_print_settings_get_int

Returns the integer value of key, or 0.

Available since: 2.10

gtk_print_settings_get_int_with_default

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

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

Available since: 2.10

gtk_print_settings_get_media_type

Gets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.

Available since: 2.10

gtk_print_settings_get_n_copies

Gets the value of GTK_PRINT_SETTINGS_N_COPIES.

Available since: 2.10

gtk_print_settings_get_number_up

Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP.

Available since: 2.10

gtk_print_settings_get_number_up_layout

Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

Available since: 2.14

gtk_print_settings_get_orientation

Get the value of GTK_PRINT_SETTINGS_ORIENTATION, converted to a GtkPageOrientation.

Available since: 2.10

gtk_print_settings_get_output_bin

Gets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.

Available since: 2.10

gtk_print_settings_get_page_ranges

Gets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.

Available since: 2.10

gtk_print_settings_get_page_set

Gets the value of GTK_PRINT_SETTINGS_PAGE_SET.

Available since: 2.10

gtk_print_settings_get_paper_height

Gets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to unit.

Available since: 2.10

gtk_print_settings_get_paper_size

Gets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a GtkPaperSize.

Available since: 2.10

gtk_print_settings_get_paper_width

Gets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to unit.

Available since: 2.10

gtk_print_settings_get_print_pages

Gets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.

Available since: 2.10

gtk_print_settings_get_printer

Convenience function to obtain the value of GTK_PRINT_SETTINGS_PRINTER.

Available since: 2.10

gtk_print_settings_get_printer_lpi

Gets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.

Available since: 2.16

gtk_print_settings_get_quality

Gets the value of GTK_PRINT_SETTINGS_QUALITY.

Available since: 2.10

gtk_print_settings_get_resolution

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION.

Available since: 2.10

gtk_print_settings_get_resolution_x

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_X.

Available since: 2.16

gtk_print_settings_get_resolution_y

Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_Y.

Available since: 2.16

gtk_print_settings_get_reverse

Gets the value of GTK_PRINT_SETTINGS_REVERSE.

Available since: 2.10

gtk_print_settings_get_scale

Gets the value of GTK_PRINT_SETTINGS_SCALE.

Available since: 2.10

gtk_print_settings_get_use_color

Gets the value of GTK_PRINT_SETTINGS_USE_COLOR.

Available since: 2.10

gtk_print_settings_has_key

Returns TRUE, if a value is associated with key.

Available 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().

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

Available since: 2.14

gtk_print_settings_set

Associates value with key.

Available since: 2.10

gtk_print_settings_set_bool

Sets key to a boolean value.

Available since: 2.10

gtk_print_settings_set_collate

Sets the value of GTK_PRINT_SETTINGS_COLLATE.

Available since: 2.10

gtk_print_settings_set_default_source

Sets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

Available since: 2.10

gtk_print_settings_set_dither

Sets the value of GTK_PRINT_SETTINGS_DITHER.

Available since: 2.10

gtk_print_settings_set_double

Sets key to a double value.

Available since: 2.10

gtk_print_settings_set_duplex

Sets the value of GTK_PRINT_SETTINGS_DUPLEX.

Available since: 2.10

gtk_print_settings_set_finishings

Sets the value of GTK_PRINT_SETTINGS_FINISHINGS.

Available since: 2.10

gtk_print_settings_set_int

Sets key to an integer value.

Available since: 2.10

gtk_print_settings_set_length

Associates a length in units of unit with key.

Available since: 2.10

gtk_print_settings_set_media_type

Sets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.

Available since: 2.10

gtk_print_settings_set_n_copies

Sets the value of GTK_PRINT_SETTINGS_N_COPIES.

Available since: 2.10

gtk_print_settings_set_number_up

Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP.

Available since: 2.10

gtk_print_settings_set_number_up_layout

Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

Available since: 2.14

gtk_print_settings_set_orientation

Sets the value of GTK_PRINT_SETTINGS_ORIENTATION.

Available since: 2.10

gtk_print_settings_set_output_bin

Sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.

Available since: 2.10

gtk_print_settings_set_page_ranges

Sets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.

Available since: 2.10

gtk_print_settings_set_page_set

Sets the value of GTK_PRINT_SETTINGS_PAGE_SET.

Available since: 2.10

gtk_print_settings_set_paper_height

Sets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT.

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

Available since: 2.10

gtk_print_settings_set_paper_width

Sets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH.

Available since: 2.10

gtk_print_settings_set_print_pages

Sets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.

Available since: 2.10

gtk_print_settings_set_printer

Convenience function to set GTK_PRINT_SETTINGS_PRINTER to printer.

Available since: 2.10

gtk_print_settings_set_printer_lpi

Sets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.

Available since: 2.16

gtk_print_settings_set_quality

Sets the value of GTK_PRINT_SETTINGS_QUALITY.

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

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

Available since: 2.16

gtk_print_settings_set_reverse

Sets the value of GTK_PRINT_SETTINGS_REVERSE.

Available since: 2.10

gtk_print_settings_set_scale

Sets the value of GTK_PRINT_SETTINGS_SCALE.

Available since: 2.10

gtk_print_settings_set_use_color

Sets the value of GTK_PRINT_SETTINGS_USE_COLOR.

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

Available since: 2.12

gtk_print_settings_to_gvariant

Serialize print settings to an a{sv} variant.

Available since: 3.22

gtk_print_settings_to_key_file

This function adds the print settings from settings to key_file.

Available since: 2.12

gtk_print_settings_unset

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

Available since: 2.10

Methods inherited from GObject (42)

Signals

Signals inherited from GObject (1)