Stores print settings
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.
<gtk-print-settings>
)Creates a new
<gtk-print-settings>
object.
- ret
- a new
<gtk-print-settings>
objectSince 2.10
<gtk-print-settings>
) (key mchars
) ⇒ (ret bool
)Returns ‘
#t
’, if a value is associated with key.
- settings
- a
<gtk-print-settings>
- key
- a key
- ret
- ‘
#t
’, if key has a valueSince 2.10
<gtk-print-settings>
) (key mchars
) ⇒ (ret mchars
)Looks up the string value associated with key.
- settings
- a
<gtk-print-settings>
- key
- a key
- ret
- the string value for key
Since 2.10
<gtk-print-settings>
) (key mchars
) (value mchars
)Associates value with key.
- settings
- a
<gtk-print-settings>
- key
- a key
- value
- a string value, or ‘
#f
’Since 2.10
<gtk-print-settings>
) (key mchars
)Removes any value associated with key. This has the same effect as setting the value to ‘
#f
’.
- settings
- a
<gtk-print-settings>
- key
- a key
Since 2.10
<gtk-print-settings>
) (key mchars
) ⇒ (ret bool
)Returns the boolean represented by the value that is associated with key.
The string "true" represents ‘
#t
’, any other string ‘#f
’.
- settings
- a
<gtk-print-settings>
- key
- a key
- ret
- ‘
#t
’, if key maps to a true value.Since 2.10
<gtk-print-settings>
) (key mchars
) (value bool
)Sets key to a boolean value.
- settings
- a
<gtk-print-settings>
- key
- a key
- value
- a boolean
Since 2.10
<gtk-print-settings>
) (key mchars
) ⇒ (ret double
)Returns the double value associated with key, or 0.
- settings
- a
<gtk-print-settings>
- key
- a key
- ret
- the double value of key
Since 2.10
<gtk-print-settings>
) (key mchars
) (value double
)Sets key to a double value.
- settings
- a
<gtk-print-settings>
- key
- a key
- value
- a double value
Since 2.10
<gtk-print-settings>
) (key mchars
) (unit <gtk-unit>
) ⇒ (ret double
)Returns the value associated with key, interpreted as a length. The returned value is converted to units.
- settings
- a
<gtk-print-settings>
- key
- a key
- unit
- the unit of the return value
- ret
- the length value of key, converted to unit
Since 2.10
<gtk-print-settings>
) (key mchars
) (value double
) (unit <gtk-unit>
)Associates a length in units of unit with key.
- settings
- a
<gtk-print-settings>
- key
- a key
- value
- a length
- unit
- the unit of length
Since 2.10
<gtk-print-settings>
) (key mchars
) ⇒ (ret int
)Returns the integer value of key, or 0.
- settings
- a
<gtk-print-settings>
- key
- a key
- ret
- the integer value of key
Since 2.10
<gtk-print-settings>
) (key mchars
) (value int
)Sets key to an integer value.
- settings
- a
<gtk-print-settings>
- key
- a key
- value
- an integer
Since 2.10
<gtk-print-settings>
) ⇒ (ret mchars
)Convenience function to obtain the value of ‘GTK_PRINT_SETTINGS_PRINTER’.
- settings
- a
<gtk-print-settings>
- ret
- the printer name
Since 2.10
<gtk-print-settings>
) (printer mchars
)Convenience function to set ‘GTK_PRINT_SETTINGS_PRINTER’ to printer.
- settings
- a
<gtk-print-settings>
- printer
- the printer name
Since 2.10
<gtk-print-settings>
) ⇒ (ret <gtk-page-orientation>
)Get the value of ‘GTK_PRINT_SETTINGS_ORIENTATION’, converted to a
<gtk-page-orientation>
.
- settings
- a
<gtk-print-settings>
- ret
- the orientation
Since 2.10
<gtk-print-settings>
) (orientation <gtk-page-orientation>
)Sets the value of ‘GTK_PRINT_SETTINGS_ORIENTATION’.
- settings
- a
<gtk-print-settings>
- orientation
- a page orientation
Since 2.10
<gtk-print-settings>
) ⇒ (ret <gtk-paper-size>
)Gets the value of ‘GTK_PRINT_SETTINGS_PAPER_FORMAT’, converted to a
<gtk-paper-size>
.
- settings
- a
<gtk-print-settings>
- ret
- the paper size
Since 2.10
<gtk-print-settings>
) (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’.
- settings
- a
<gtk-print-settings>
- paper-size
- a paper size
Since 2.10
<gtk-print-settings>
) (unit <gtk-unit>
) ⇒ (ret double
)Gets the value of ‘GTK_PRINT_SETTINGS_PAPER_WIDTH’, converted to unit.
- settings
- a
<gtk-print-settings>
- unit
- the unit for the return value
- ret
- the paper width, in units of unit
Since 2.10
<gtk-print-settings>
) (width double
) (unit <gtk-unit>
)Sets the value of ‘GTK_PRINT_SETTINGS_PAPER_WIDTH’.
- settings
- a
<gtk-print-settings>
- width
- the paper width
- unit
- the units of width
Since 2.10
<gtk-print-settings>
) (unit <gtk-unit>
) ⇒ (ret double
)Gets the value of ‘GTK_PRINT_SETTINGS_PAPER_HEIGHT’, converted to unit.
- settings
- a
<gtk-print-settings>
- unit
- the unit for the return value
- ret
- the paper height, in units of unit
Since 2.10
<gtk-print-settings>
) (height double
) (unit <gtk-unit>
)Sets the value of ‘GTK_PRINT_SETTINGS_PAPER_HEIGHT’.
- settings
- a
<gtk-print-settings>
- height
- the paper height
- unit
- the units of height
Since 2.10
<gtk-print-settings>
) ⇒ (ret bool
)Gets the value of ‘GTK_PRINT_SETTINGS_USE_COLOR’.
- settings
- a
<gtk-print-settings>
- ret
- whether to use color
Since 2.10
<gtk-print-settings>
) (use_color bool
)Sets the value of ‘GTK_PRINT_SETTINGS_USE_COLOR’.
- settings
- a
<gtk-print-settings>
- use-color
- whether to use color
Since 2.10
<gtk-print-settings>
) ⇒ (ret bool
)Gets the value of ‘GTK_PRINT_SETTINGS_COLLATE’.
- settings
- a
<gtk-print-settings>
- ret
- whether to collate the printed pages
Since 2.10
<gtk-print-settings>
) (collate bool
)Sets the value of ‘GTK_PRINT_SETTINGS_COLLATE’.
- settings
- a
<gtk-print-settings>
- collate
- whether to collate the output
Since 2.10
<gtk-print-settings>
) ⇒ (ret bool
)Gets the value of ‘GTK_PRINT_SETTINGS_REVERSE’.
- settings
- a
<gtk-print-settings>
- ret
- whether to reverse the order of the printed pages
Since 2.10
<gtk-print-settings>
) (reverse bool
)Sets the value of ‘GTK_PRINT_SETTINGS_REVERSE’.
- settings
- a
<gtk-print-settings>
- reverse
- whether to reverse the output
Since 2.10
<gtk-print-settings>
) ⇒ (ret <gtk-print-duplex>
)Gets the value of ‘GTK_PRINT_SETTINGS_DUPLEX’.
- settings
- a
<gtk-print-settings>
- ret
- whether to print the output in duplex.
Since 2.10
<gtk-print-settings>
) (duplex <gtk-print-duplex>
)Sets the value of ‘GTK_PRINT_SETTINGS_DUPLEX’.
- settings
- a
<gtk-print-settings>
- duplex
- a
<gtk-print-duplex>
valueSince 2.10
<gtk-print-settings>
) ⇒ (ret <gtk-print-quality>
)Gets the value of ‘GTK_PRINT_SETTINGS_QUALITY’.
- settings
- a
<gtk-print-settings>
- ret
- the print quality
Since 2.10
<gtk-print-settings>
) (quality <gtk-print-quality>
)Sets the value of ‘GTK_PRINT_SETTINGS_QUALITY’.
- settings
- a
<gtk-print-settings>
- quality
- a
<gtk-print-quality>
valueSince 2.10
<gtk-print-settings>
) ⇒ (ret int
)Gets the value of ‘GTK_PRINT_SETTINGS_N_COPIES’.
- settings
- a
<gtk-print-settings>
- ret
- the number of copies to print
Since 2.10
<gtk-print-settings>
) (num_copies int
)Sets the value of ‘GTK_PRINT_SETTINGS_N_COPIES’.
- settings
- a
<gtk-print-settings>
- num-copies
- the number of copies
Since 2.10
<gtk-print-settings>
) ⇒ (ret int
)Gets the value of ‘GTK_PRINT_SETTINGS_NUMBER_UP’.
- settings
- a
<gtk-print-settings>
- ret
- the number of pages per sheet
Since 2.10
<gtk-print-settings>
) (number_up int
)Sets the value of ‘GTK_PRINT_SETTINGS_NUMBER_UP’.
- settings
- a
<gtk-print-settings>
- number-up
- the number of pages per sheet
Since 2.10
<gtk-print-settings>
) ⇒ (ret int
)Gets the value of ‘GTK_PRINT_SETTINGS_RESOLUTION’.
- settings
- a
<gtk-print-settings>
- ret
- the resolution in dpi
Since 2.10
<gtk-print-settings>
) (resolution int
)Sets the value of ‘GTK_PRINT_SETTINGS_RESOLUTION’.
- settings
- a
<gtk-print-settings>
- resolution
- the resolution in dpi
Since 2.10
<gtk-print-settings>
) ⇒ (ret double
)Gets the value of ‘GTK_PRINT_SETTINGS_SCALE’.
- settings
- a
<gtk-print-settings>
- ret
- the scale in percent
Since 2.10
<gtk-print-settings>
) (scale double
)Sets the value of ‘GTK_PRINT_SETTINGS_SCALE’.
- settings
- a
<gtk-print-settings>
- scale
- the scale in percent
Since 2.10
<gtk-print-settings>
) ⇒ (ret <gtk-page-set>
)Gets the value of ‘GTK_PRINT_SETTINGS_PAGE_SET’.
- settings
- a
<gtk-print-settings>
- ret
- the set of pages to print
Since 2.10
<gtk-print-settings>
) (page_set <gtk-page-set>
)Sets the value of ‘GTK_PRINT_SETTINGS_PAGE_SET’.
- settings
- a
<gtk-print-settings>
- page-set
- a
<gtk-page-set>
valueSince 2.10
<gtk-print-settings>
) ⇒ (ret mchars
)Gets the value of ‘GTK_PRINT_SETTINGS_MEDIA_TYPE’.
The set of media types is defined in PWG 5101.1-2002 PWG.
- settings
- a
<gtk-print-settings>
- ret
- the media type
Since 2.10
<gtk-print-settings>
) (media_type mchars
)Sets the value of ‘GTK_PRINT_SETTINGS_MEDIA_TYPE’.
The set of media types is defined in PWG 5101.1-2002 PWG.
- settings
- a
<gtk-print-settings>
- media-type
- the media type
Since 2.10
<gtk-print-settings>
) ⇒ (ret mchars
)Gets the value of ‘GTK_PRINT_SETTINGS_DITHER’.
- settings
- a
<gtk-print-settings>
- ret
- the dithering that is used
Since 2.10
<gtk-print-settings>
) (dither mchars
)Sets the value of ‘GTK_PRINT_SETTINGS_DITHER’.
- settings
- a
<gtk-print-settings>
- dither
- the dithering that is used
Since 2.10
<gtk-print-settings>
) ⇒ (ret mchars
)Gets the value of ‘GTK_PRINT_SETTINGS_FINISHINGS’.
- settings
- a
<gtk-print-settings>
- ret
- the finishings
Since 2.10
<gtk-print-settings>
) (finishings mchars
)Sets the value of ‘GTK_PRINT_SETTINGS_FINISHINGS’.
- settings
- a
<gtk-print-settings>
- finishings
- the finishings
Since 2.10