gtk3-0.12.5.6: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Safe HaskellNone

Graphics.UI.Gtk.Printing.PrintSettings

Contents

Description

Stores print settings

  • Module available since Gtk+ version 2.10

Synopsis

Detail

A PrintSettings 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.

Class Hierarchy

 | GObject
 | +----PrintSettings

Types

Enums

Constructors

printSettingsNewFromFileSource

Arguments

:: String

fileName - the filename to read the settings from

-> IO PrintSettings 

Reads the print settings from fileName. Returns a new PrintSettings object with the restored settings.

  • Available since Gtk+ version 2.12

Methods

printSettingsCopySource

Arguments

:: PrintSettingsClass self 
=> self 
-> IO PrintSettings

returns a newly allocated copy of other

Copies a PrintSettings object.

printSettingsHasKeySource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> IO Bool

returns True, if key has a value

Returns True, if a value is associated with key.

printSettingsGetSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> IO String

returns the string value for key

Looks up the string value associated with key.

printSettingsSetSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> String

value - a string value

-> IO () 

Associates value with key.

printSettingsUnsetSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> IO () 

Removes any value associated with key

printSettingsForeachSource

Arguments

:: PrintSettingsClass self 
=> self 
-> (String -> IO ())

func - the function to call

-> IO () 

Calls func for each key-value pair of settings.

printSettingsGetBoolSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> IO Bool

returns True, if key maps to a true value.

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

The string "true" represents True, any other string False.

printSettingsSetBoolSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Bool

value - a boolean

-> IO () 

Sets key to a boolean value.

printSettingsGetDoubleSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> IO Double

returns the double value of key

Returns the double value associated with key, or 0.

printSettingsGetDoubleWithDefaultSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Double

def - the default value

-> IO Double

returns the floating point number associated with key

Returns the floating point number represented by the value that is associated with key, or defaultVal if the value does not represent a floating point number.

Floating point numbers are parsed with gAsciiStrtod.

printSettingsSetDoubleSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Double

value - a double value

-> IO () 

Sets key to a double value.

printSettingsGetLengthSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Unit

unit - the unit of the return value

-> IO Double

returns the length value of key, converted to unit

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

printSettingsSetLengthSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Double

value - a length

-> Unit

unit - the unit of length

-> IO () 

Associates a length in units of unit with key.

printSettingsGetIntSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> IO Int

returns the integer value of key

Returns the integer value of key, or 0.

printSettingsGetIntWithDefaultSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Int

def - the default value

-> IO Int

returns the integer value of key

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

printSettingsSetIntSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

key - a key

-> Int

value - an integer

-> IO () 

Sets key to an integer value.

printSettingsGetPaperWidthSource

Arguments

:: PrintSettingsClass self 
=> self 
-> Unit

unit - the unit for the return value

-> IO Double

returns the paper width, in units of unit

Gets the value of PrintSettingsPaperWidth, converted to unit.

printSettingsSetPaperWidthSource

Arguments

:: PrintSettingsClass self 
=> self 
-> Double

width - the paper width

-> Unit

unit - the units of width

-> IO () 

Sets the value of PrintSettingsPaperWidth.

printSettingsGetPaperHeightSource

Arguments

:: PrintSettingsClass self 
=> self 
-> Unit

unit - the unit for the return value

-> IO Double

returns the paper height, in units of unit

Gets the value of PrintSettingsPaperHeight, converted to unit.

printSettingsSetPaperHeightSource

Arguments

:: PrintSettingsClass self 
=> self 
-> Double

height - the paper height

-> Unit

unit - the units of height

-> IO () 

Sets the value of PrintSettingsPaperHeight.

printSettingsSetResolutionXySource

Arguments

:: PrintSettingsClass self 
=> self 
-> Int

resolutionX - the horizontal resolution in dpi

-> Int

resolutionY - the vertical resolution in dpi

-> IO () 

Sets the values of PrintSettingsResolution, PrintSettingsResolutionX and PrintSettingsResolutionY.

  • Available since Gtk+ version 2.16

printSettingsGetResolutionXSource

Arguments

:: PrintSettingsClass self 
=> self 
-> IO Int

returns the horizontal resolution in dpi

Gets the value of resolution-x.

  • Available since Gtk+ version 2.16

printSettingsGetResolutionYSource

Arguments

:: PrintSettingsClass self 
=> self 
-> IO Int

returns the vertical resolution in dpi

Gets the value of resolution-y.

  • Available since Gtk+ version 2.16

printSettingsLoadFileSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

fileName - the filename to read the settings from

-> IO Bool

returns True on success

Reads the print settings from fileName. See printSettingsToFile.

  • Available since Gtk+ version 2.14

printSettingsToFileSource

Arguments

:: PrintSettingsClass self 
=> self 
-> String

fileName - the file to save to

-> IO Bool

returns True on success

This function saves the print settings from settings to fileName.

  • Available since Gtk+ version 2.12

Attributes

printSettingsPrinter :: PrintSettingsClass self => Attr self StringSource

Obtain the value of PrintSettingsPrinter.

printSettingsOrientation :: PrintSettingsClass self => Attr self PageOrientationSource

The value of ''PrintSettingsOrientation'', converted to a PageOrientation.

printSettingsPaperSize :: PrintSettingsClass self => Attr self PaperSizeSource

The value of PrintSettingsPaperFormat, converted to a PaperSize.

printSettingsUseColor :: PrintSettingsClass self => Attr self BoolSource

The value of ''PrintSettingsUseColor''.

printSettingsCollate :: PrintSettingsClass self => Attr self BoolSource

The value of ''PrintSettingsCollate''.

printSettingsReverse :: PrintSettingsClass self => Attr self BoolSource

The value of ''PrintSettingsReverse''.

printSettingsDuplex :: PrintSettingsClass self => Attr self PrintDuplexSource

The value of ''PrintSettingsDuplex''.

printSettingsQuality :: PrintSettingsClass self => Attr self PrintQualitySource

The value of ''PrintSettingsQuality''.

printSettingsNCopies :: PrintSettingsClass self => Attr self IntSource

The value of PrintSettingsNCopies.

printSettingsNumberUp :: PrintSettingsClass self => Attr self IntSource

The value of PrintSettingsNumberUp.

printSettingsResolution :: PrintSettingsClass self => Attr self IntSource

The value of PrintSettingsResolution.

printSettingsScale :: PrintSettingsClass self => Attr self DoubleSource

The value of PrintSettingsScale.

printSettingsPrintPages :: PrintSettingsClass self => Attr self PrintPagesSource

The value of PrintSettingsPrintPages.

printSettingsPageSet :: PrintSettingsClass self => Attr self PageSetSource

The value of PrintSettingsPageSet.

printSettingsDefaultSource :: PrintSettingsClass self => Attr self StringSource

The value of PrintSettingsDefaultSource.

printSettingsMediaType :: PrintSettingsClass self => Attr self StringSource

The value of PrintSettingsMediaType.

printSettingsDither :: PrintSettingsClass self => Attr self StringSource

The value of PrintSettingsDither.

printSettingsFinishings :: PrintSettingsClass self => Attr self StringSource

The value of PrintSettingsFinishings.

printSettingsOutputBin :: PrintSettingsClass self => Attr self StringSource

The value of PrintSettingsOutputBin.

printSettingsNumberUpLayout :: PrintSettingsClass self => Attr self NumberUpLayoutSource

The value of PrintSettingsNumberUpLayout.

printSettingsPrinterLpi :: PrintSettingsClass self => Attr self DoubleSource

The value of PrintSettingsPrinterLpi.