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.
- public void @foreach (PrintSettingsFunc func)
Calls func
for each key-value pair of
this.
- public unowned string? @get (string key)
Looks up the string value associated with key
.
- public void @set (string key, string? value)
Associates value
with key
.
- public PrintSettings copy ()
Copies a `GtkPrintSettings` object.
- public bool get_bool (string key)
Returns the boolean represented by the value that is associated with
key
.
- public bool get_collate ()
Gets the value of
gtk_print_settings_collate.
- public unowned string? get_default_source ()
Gets the value of
gtk_print_settings_default_source.
- public unowned string? get_dither ()
Gets the value of gtk_print_settings_dither
.
- public double get_double (string key)
Returns the double value associated with key
, or 0.
- public double get_double_with_default (string key, double def)
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.
- public PrintDuplex get_duplex ()
Gets the value of gtk_print_settings_duplex
.
- public unowned string? get_finishings ()
Gets the value of
gtk_print_settings_finishings.
- public int get_int (string key)
Returns the integer value of key
, or 0.
- public int get_int_with_default (string key, int def)
Returns the value of key
, interpreted as an integer, or
the default value.
- public double get_length (string key, Unit unit)
Returns the value associated with key
, interpreted as a
length.
- public unowned string? get_media_type ()
Gets the value of
gtk_print_settings_media_type.
- public int get_n_copies ()
Gets the value of
gtk_print_settings_n_copies.
- public int get_number_up ()
Gets the value of
gtk_print_settings_number_up.
- public NumberUpLayout get_number_up_layout ()
Gets the value of
gtk_print_settings_number_up_layout.
- public PageOrientation get_orientation ()
Get the value of
gtk_print_settings_orientation, converted to a `GtkPageOrientation`.
- public unowned string? get_output_bin ()
Gets the value of
gtk_print_settings_output_bin.
- public PageRange[] get_page_ranges ()
Gets the value of
gtk_print_settings_page_ranges.
- public PageSet get_page_set ()
Gets the value of
gtk_print_settings_page_set.
- public double get_paper_height (Unit unit)
Gets the value of
gtk_print_settings_paper_height, converted to unit
.
- public PaperSize? get_paper_size ()
Gets the value of
gtk_print_settings_paper_format, converted to a `GtkPaperSize`.
- public double get_paper_width (Unit unit)
Gets the value of
gtk_print_settings_paper_width, converted to unit
.
- public PrintPages get_print_pages ()
Gets the value of
gtk_print_settings_print_pages.
- public unowned string? get_printer ()
Convenience function to obtain the value of
gtk_print_settings_printer.
- public double get_printer_lpi ()
Gets the value of
gtk_print_settings_printer_lpi.
- public PrintQuality get_quality ()
Gets the value of
gtk_print_settings_quality.
- public int get_resolution ()
Gets the value of
gtk_print_settings_resolution.
- public int get_resolution_x ()
Gets the value of
gtk_print_settings_resolution_x.
- public int get_resolution_y ()
Gets the value of
gtk_print_settings_resolution_y.
- public bool get_reverse ()
Gets the value of
gtk_print_settings_reverse.
- public double get_scale ()
Gets the value of gtk_print_settings_scale
.
- public bool get_use_color ()
Gets the value of
gtk_print_settings_use_color.
- public bool has_key (string key)
Returns true, if a value is
associated with key
.
- public bool load_file (string file_name) throws Error
Reads the print settings from file_name
.
- public bool load_key_file (KeyFile key_file, string? group_name) throws Error
Reads the print settings from the group group_name
in
key_file
.
- public void set_bool (string key, bool value)
Sets key
to a boolean value.
- public void set_collate (bool collate)
Sets the value of
gtk_print_settings_collate.
- public void set_default_source (string default_source)
Sets the value of
gtk_print_settings_default_source.
- public void set_dither (string dither)
Sets the value of gtk_print_settings_dither
.
- public void set_double (string key, double value)
Sets key
to a double value.
- public void set_duplex (PrintDuplex duplex)
Sets the value of gtk_print_settings_duplex
.
- public void set_finishings (string finishings)
Sets the value of
gtk_print_settings_finishings.
- public void set_int (string key, int value)
Sets key
to an integer value.
- public void set_length (string key, double value, Unit unit)
Associates a length in units of unit
with key
.
- public void set_media_type (string media_type)
Sets the value of
gtk_print_settings_media_type.
- public void set_n_copies (int num_copies)
Sets the value of
gtk_print_settings_n_copies.
- public void set_number_up (int number_up)
Sets the value of
gtk_print_settings_number_up.
- public void set_number_up_layout (NumberUpLayout number_up_layout)
Sets the value of
gtk_print_settings_number_up_layout.
- public void set_orientation (PageOrientation orientation)
Sets the value of
gtk_print_settings_orientation.
- public void set_output_bin (string output_bin)
Sets the value of
gtk_print_settings_output_bin.
- public void set_page_ranges (PageRange[] page_ranges)
Sets the value of
gtk_print_settings_page_ranges.
- public void set_page_set (PageSet page_set)
Sets the value of
gtk_print_settings_page_set.
- public void set_paper_height (double height, Unit unit)
Sets the value of
gtk_print_settings_paper_height.
- public void set_paper_size (PaperSize paper_size)
Sets the value of
gtk_print_settings_paper_format, gtk_print_settings_paper_width and
gtk_print_settings_paper_height.
- public void set_paper_width (double width, Unit unit)
Sets the value of
gtk_print_settings_paper_width.
- public void set_print_pages (PrintPages pages)
Sets the value of
gtk_print_settings_print_pages.
- public void set_printer (string printer)
Convenience function to set
gtk_print_settings_printer to printer
.
- public void set_printer_lpi (double lpi)
Sets the value of
gtk_print_settings_printer_lpi.
- public void set_quality (PrintQuality quality)
Sets the value of
gtk_print_settings_quality.
- public void set_resolution (int resolution)
Sets the values of
gtk_print_settings_resolution, gtk_print_settings_resolution_x and
gtk_print_settings_resolution_y.
- public void set_resolution_xy (int resolution_x, int resolution_y)
Sets the values of
gtk_print_settings_resolution, gtk_print_settings_resolution_x and
gtk_print_settings_resolution_y.
- public void set_reverse (bool reverse)
Sets the value of
gtk_print_settings_reverse.
- public void set_scale (double scale)
Sets the value of gtk_print_settings_scale
.
- public void set_use_color (bool use_color)
Sets the value of
gtk_print_settings_use_color.
- public bool to_file (string file_name) throws Error
This function saves the print settings from
this to file_name
.
- public Variant to_gvariant ()
Serialize print settings to an a{sv} variant.
- public void to_key_file (KeyFile key_file, string? group_name)
This function adds the print settings from
this to key_file
.
- public void unset (string key)
Removes any value associated with key
.