PrintSettings

open class PrintSettings(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Skipped during bindings generation

  • parameter num_ranges: num_ranges: Out parameter is not supported

  • parameter page_ranges: PageRange

Constructors

Link copied to clipboard
constructor()

Creates a new GtkPrintSettings object.

constructor(fileName: String)

Reads the print settings from @file_name.

constructor(variant: <Error class: unknown class>)

Deserialize print settings from an a{sv} variant.

constructor(keyFile: <Error class: unknown class>, groupName: String? = null)

Reads the print settings from the group @group_name in @key_file.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkPrintSettingsPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun copy(): PrintSettings

Copies a GtkPrintSettings object.

Link copied to clipboard
open fun foreach(func: PrintSettingsFunc)

Calls @func for each key-value pair of @settings.

Link copied to clipboard
open fun get(key: String): String?

Looks up the string value associated with @key.

Link copied to clipboard
open fun getBool(key: String): Boolean

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

Link copied to clipboard
open fun getCollate(): Boolean

Gets the value of %GTK_PRINT_SETTINGS_COLLATE.

Link copied to clipboard

Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

Link copied to clipboard
open fun getDither(): String?

Gets the value of %GTK_PRINT_SETTINGS_DITHER.

Link copied to clipboard
open fun getDouble(key: String): <Error class: unknown class>

Returns the double value associated with @key, or 0.

Link copied to clipboard
open fun getDoubleWithDefault(key: String, def: <Error class: unknown class>): <Error class: unknown class>

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.

Link copied to clipboard

Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.

Link copied to clipboard
open fun getFinishings(): String?

Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.

Link copied to clipboard
open fun getInt(key: String): <Error class: unknown class>

Returns the integer value of @key, or 0.

Link copied to clipboard
open fun getIntWithDefault(key: String, def: <Error class: unknown class>): <Error class: unknown class>

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

Link copied to clipboard
open fun getLength(key: String, unit: Unit): <Error class: unknown class>

Returns the value associated with @key, interpreted as a length.

Link copied to clipboard
open fun getMediaType(): String?

Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.

Link copied to clipboard
open fun getNCopies(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.

Link copied to clipboard
open fun getNumberUp(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.

Link copied to clipboard

Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

Link copied to clipboard

Get the value of %GTK_PRINT_SETTINGS_ORIENTATION, converted to a GtkPageOrientation.

Link copied to clipboard
open fun getOutputBin(): String?

Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.

Link copied to clipboard
open fun getPageSet(): PageSet

Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.

Link copied to clipboard
open fun getPaperHeight(unit: Unit): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to @unit.

Link copied to clipboard
open fun getPaperSize(): PaperSize?

Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a GtkPaperSize.

Link copied to clipboard
open fun getPaperWidth(unit: Unit): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to @unit.

Link copied to clipboard
open fun getPrinter(): String?

Convenience function to obtain the value of %GTK_PRINT_SETTINGS_PRINTER.

Link copied to clipboard
open fun getPrinterLpi(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.

Link copied to clipboard

Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.

Link copied to clipboard

Gets the value of %GTK_PRINT_SETTINGS_QUALITY.

Link copied to clipboard
open fun getResolution(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.

Link copied to clipboard
open fun getResolutionX(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.

Link copied to clipboard
open fun getResolutionY(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.

Link copied to clipboard
open fun getReverse(): Boolean

Gets the value of %GTK_PRINT_SETTINGS_REVERSE.

Link copied to clipboard
open fun getScale(): <Error class: unknown class>

Gets the value of %GTK_PRINT_SETTINGS_SCALE.

Link copied to clipboard
open fun getUseColor(): Boolean

Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.

Link copied to clipboard
open fun hasKey(key: String): Boolean

Returns true, if a value is associated with @key.

Link copied to clipboard
open fun loadFile(fileName: String): <Error class: unknown class><Boolean>

Reads the print settings from @file_name.

Link copied to clipboard
open fun loadKeyFile(keyFile: <Error class: unknown class>, groupName: String? = null): <Error class: unknown class><Boolean>

Reads the print settings from the group @group_name in @key_file.

Link copied to clipboard
open fun set(key: String, value: String? = null)

Associates @value with @key.

Link copied to clipboard
open fun setBool(key: String, value: Boolean)

Sets @key to a boolean value.

Link copied to clipboard
open fun setCollate(collate: Boolean)

Sets the value of %GTK_PRINT_SETTINGS_COLLATE.

Link copied to clipboard
open fun setDefaultSource(defaultSource: String)

Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

Link copied to clipboard
open fun setDither(dither: String)

Sets the value of %GTK_PRINT_SETTINGS_DITHER.

Link copied to clipboard
open fun setDouble(key: String, value: <Error class: unknown class>)

Sets @key to a double value.

Link copied to clipboard
open fun setDuplex(duplex: PrintDuplex)

Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.

Link copied to clipboard
open fun setFinishings(finishings: String)

Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.

Link copied to clipboard
open fun setInt(key: String, value: <Error class: unknown class>)

Sets @key to an integer value.

Link copied to clipboard
open fun setLength(key: String, value: <Error class: unknown class>, unit: Unit)

Associates a length in units of @unit with @key.

Link copied to clipboard
open fun setMediaType(mediaType: String)

Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.

Link copied to clipboard
open fun setNCopies(numCopies: <Error class: unknown class>)

Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.

Link copied to clipboard
open fun setNumberUp(numberUp: <Error class: unknown class>)

Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.

Link copied to clipboard
open fun setNumberUpLayout(numberUpLayout: NumberUpLayout)

Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

Link copied to clipboard
open fun setOrientation(orientation: PageOrientation)

Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.

Link copied to clipboard
open fun setOutputBin(outputBin: String)

Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.

Link copied to clipboard
open fun setPageSet(pageSet: PageSet)

Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.

Link copied to clipboard
open fun setPaperHeight(height: <Error class: unknown class>, unit: Unit)

Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.

Link copied to clipboard
open fun setPaperSize(paperSize: PaperSize)

Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, %GTK_PRINT_SETTINGS_PAPER_WIDTH and %GTK_PRINT_SETTINGS_PAPER_HEIGHT.

Link copied to clipboard
open fun setPaperWidth(width: <Error class: unknown class>, unit: Unit)

Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.

Link copied to clipboard
open fun setPrinter(printer: String)

Convenience function to set %GTK_PRINT_SETTINGS_PRINTER to @printer.

Link copied to clipboard
open fun setPrinterLpi(lpi: <Error class: unknown class>)

Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.

Link copied to clipboard
open fun setPrintPages(pages: PrintPages)

Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.

Link copied to clipboard
open fun setQuality(quality: PrintQuality)

Sets the value of %GTK_PRINT_SETTINGS_QUALITY.

Link copied to clipboard
open fun setResolution(resolution: <Error class: unknown class>)

Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, %GTK_PRINT_SETTINGS_RESOLUTION_X and %GTK_PRINT_SETTINGS_RESOLUTION_Y.

Link copied to clipboard
open fun setResolutionXy(resolutionX: <Error class: unknown class>, resolutionY: <Error class: unknown class>)

Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, %GTK_PRINT_SETTINGS_RESOLUTION_X and %GTK_PRINT_SETTINGS_RESOLUTION_Y.

Link copied to clipboard
open fun setReverse(reverse: Boolean)

Sets the value of %GTK_PRINT_SETTINGS_REVERSE.

Link copied to clipboard
open fun setScale(scale: <Error class: unknown class>)

Sets the value of %GTK_PRINT_SETTINGS_SCALE.

Link copied to clipboard
open fun setUseColor(useColor: Boolean)

Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.

Link copied to clipboard
open fun toFile(fileName: String): <Error class: unknown class><Boolean>

This function saves the print settings from @settings to @file_name.

Link copied to clipboard
open fun toGvariant(): <Error class: unknown class>

Serialize print settings to an a{sv} variant.

Link copied to clipboard
open fun toKeyFile(keyFile: <Error class: unknown class>, groupName: String? = null)

This function adds the print settings from @settings to @key_file.

Link copied to clipboard
open fun unset(key: String)

Removes any value associated with @key.