gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Printing.PageSetup

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes

Description

Stores page setup information

- Module available since Gtk+ version 2.10

Synopsis

- data PageSetup
- class GObjectClass o => PageSetupClass o
- castToPageSetup :: GObjectClass obj => obj -> PageSetup
- toPageSetup :: PageSetupClass o => o -> PageSetup
- pageSetupNew :: IO PageSetup
- pageSetupNewFromFile :: GlibString string => string -> IO PageSetup
- pageSetupCopy :: PageSetupClass self => self -> IO PageSetup
- pageSetupGetTopMargin :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupSetTopMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()
- pageSetupGetBottomMargin :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupSetBottomMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()
- pageSetupGetLeftMargin :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupSetLeftMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()
- pageSetupGetRightMargin :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupSetRightMargin :: PageSetupClass self => self -> Double -> Unit -> IO ()
- pageSetupSetPaperSizeAndDefaultMargins :: PageSetupClass self => self -> PaperSize -> IO ()
- pageSetupGetPaperWidth :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupGetPaperHeight :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupGetPageWidth :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupGetPageHeight :: PageSetupClass self => self -> Unit -> IO Double
- pageSetupLoadFile :: (PageSetupClass self, GlibString string) => self -> string -> IO Bool
- pageSetupToFile :: (PageSetupClass self, GlibString string) => self -> string -> IO Bool
- pageSetupOrientation :: PageSetupClass self => Attr self PageOrientation
- pageSetupPaperSize :: PageSetupClass self => Attr self PaperSize

# Detail

A `PageSetup` object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the `PrintOperation` when printing. The benefit of splitting this out of the `PrintSettings` is that these affect the actual layout of the page, and thus need to be set long before user prints.

The margins specified in this object are the "print margins", i.e. the parts of the page that the printer cannot print on. These are different from the layout margins that a word processor uses; they are typically used to determine the minimal size for the layout margins.

To obtain a `PageSetup` use `pageSetupNew` to get the defaults, or use `printRunPageSetupDialog` to show the page setup dialog and receive the resulting page setup.

Printing support was added in Gtk+ 2.10.

# Class Hierarchy

    | GObject
    | +----PageSetup

# Types

data PageSetup Source #

#### Instances

Instances details

Eq PageSetup Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: PageSetup -> PageSetup -> Bool Source # (/=) :: PageSetup -> PageSetup -> Bool Source #
Ord PageSetup Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: PageSetup -> PageSetup -> Ordering Source #

(<) :: PageSetup -> PageSetup -> Bool Source #

(<=) :: PageSetup -> PageSetup -> Bool Source #

(>) :: PageSetup -> PageSetup -> Bool Source #

(>=) :: PageSetup -> PageSetup -> Bool Source #

max :: PageSetup -> PageSetup -> PageSetup Source #

min :: PageSetup -> PageSetup -> PageSetup Source #

GObjectClass PageSetup Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: PageSetup -> GObject Source # unsafeCastGObject :: GObject -> PageSetup Source #
PageSetupClass PageSetup Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class GObjectClass o => PageSetupClass o Source #

#### Instances

Instances details

PageSetupClass PageSetup Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToPageSetup :: GObjectClass obj => obj -> PageSetup Source #

toPageSetup :: PageSetupClass o => o -> PageSetup Source #

# Constructors

pageSetupNew :: IO PageSetup Source #

Creates a new `PageSetup`.

pageSetupNewFromFile Source #

Arguments

:: GlibString string |
=> string | `fileName` - the filename to read the page setup from
-> IO PageSetup |

Reads the page setup from the file `fileName`. Returns a new `PageSetup` object with the restored page setup.

- Available since Gtk+ version 2.12

# Methods

pageSetupCopy Source #

Arguments

:: PageSetupClass self |
=> self |
-> IO PageSetup | returns a copy of `other`

Copies a `PageSetup`.

pageSetupGetTopMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the top margin

Gets the top margin in units of `unit`.

pageSetupSetTopMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Double | `margin` - the new top margin in units of `unit`
-> Unit | `unit` - the units for `margin`
-> IO () |

Sets the top margin of the `PageSetup`.

pageSetupGetBottomMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the bottom margin

Gets the bottom margin in units of `unit`.

pageSetupSetBottomMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Double | `margin` - the new bottom margin in units of `unit`
-> Unit | `unit` - the units for `margin`
-> IO () |

Sets the bottom margin of the `PageSetup`.

pageSetupGetLeftMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the left margin

Gets the left margin in units of `unit`.

pageSetupSetLeftMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Double | `margin` - the new left margin in units of `unit`
-> Unit | `unit` - the units for `margin`
-> IO () |

Sets the left margin of the `PageSetup`.

pageSetupGetRightMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the right margin

Gets the right margin in units of `unit`.

pageSetupSetRightMargin Source #

Arguments

:: PageSetupClass self |
=> self |
-> Double | `margin` - the new right margin in units of `unit`
-> Unit | `unit` - the units for `margin`
-> IO () |

Sets the right margin of the `PageSetup`.

pageSetupSetPaperSizeAndDefaultMargins Source #

Arguments

:: PageSetupClass self |
=> self |
-> PaperSize | `size` - a `PaperSize`
-> IO () |

Sets the paper size of the `PageSetup` and modifies the margins according to the new paper size.

pageSetupGetPaperWidth Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the paper width.

Returns the paper width in units of `unit`.

Note that this function takes orientation, but not margins into consideration. See `pageSetupGetPageWidth`.

pageSetupGetPaperHeight Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the paper height.

Returns the paper height in units of `unit`.

Note that this function takes orientation, but not margins into consideration. See `pageSetupGetPageHeight`.

pageSetupGetPageWidth Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the page width.

Returns the page width in units of `unit`.

Note that this function takes orientation and margins into consideration. See `pageSetupGetPaperWidth`.

pageSetupGetPageHeight Source #

Arguments

:: PageSetupClass self |
=> self |
-> Unit | `unit` - the unit for the return value
-> IO Double | returns the page height.

Returns the page height in units of `unit`.

Note that this function takes orientation and margins into consideration. See `pageSetupGetPaperHeight`.

pageSetupLoadFile Source #

Arguments

:: (PageSetupClass self, GlibString string) |
=> self |
-> string | `fileName` - the filename to read the page setup from
-> IO Bool | returns `True` on success

Reads the page setup from the file `fileName`. See `pageSetupToFile`.

- Available since Gtk+ version 2.14

pageSetupToFile Source #

Arguments

:: (PageSetupClass self, GlibString string) |
=> self |
-> string | `fileName` - the file to save to
-> IO Bool | returns `True` on success

This function saves the information from `setup` to `fileName`.

- Available since Gtk+ version 2.12

# Attributes

pageSetupOrientation :: PageSetupClass self => Attr self PageOrientation Source #

The page orientation of the `PageSetup`.

pageSetupPaperSize :: PageSetupClass self => Attr self PaperSize Source #

The paper size of the `PageSetup`.