GtkPageSetup: GtkPageSetup

Description Methods and Functions Hierarchy Detailed Description Structures Convenient Construction Author(s) References

Description

Stores page setup information

Methods and Functions

gtkPageSetupNew()
gtkPageSetupCopy(object)
gtkPageSetupGetOrientation(object)
gtkPageSetupSetOrientation(object, orientation)
gtkPageSetupGetPaperSize(object)
gtkPageSetupSetPaperSize(object, size)
gtkPageSetupGetTopMargin(object, unit)
gtkPageSetupSetTopMargin(object, margin, unit)
gtkPageSetupGetBottomMargin(object, unit)
gtkPageSetupSetBottomMargin(object, margin, unit)
gtkPageSetupGetLeftMargin(object, unit)
gtkPageSetupSetLeftMargin(object, margin, unit)
gtkPageSetupGetRightMargin(object, unit)
gtkPageSetupSetRightMargin(object, margin, unit)
gtkPageSetupSetPaperSizeAndDefaultMargins(object, size)
gtkPageSetupGetPaperWidth(object, unit)
gtkPageSetupGetPaperHeight(object, unit)
gtkPageSetupGetPageWidth(object, unit)
gtkPageSetupGetPageHeight(object, unit)
gtkPageSetupNewFromFile(file.name, .errwarn = TRUE)
gtkPageSetupNewFromKeyFile(key.file, group.name, .errwarn = TRUE)
gtkPageSetupLoadFile(object, file.name, .errwarn = TRUE)
gtkPageSetupLoadKeyFile(object, key.file, group.name, .errwarn = TRUE)
gtkPageSetupToFile(object, file.name, .errwarn = TRUE)
gtkPageSetupToKeyFile(object, key.file, group.name)
gtkPageSetup()

Hierarchy

1
2

Detailed Description

A GtkPageSetup 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 GtkPrintOperation when printing. The benefit of splitting this out of the GtkPrintSettings 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 GtkPageSetup use gtkPageSetupNew to get the defaults, or use gtkPrintRunPageSetupDialog to show the page setup dialog and receive the resulting page setup.

A page setup dialog

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
do_page_setup <- function()
{
  if (is.null(settings))
    settings <- gtkPrintSettings()

  new_page_setup <- gtkPrintRunPageSetupDialog(main_window, page_setup,
                                               settings)

  page_setup <- new_page_setup
}

Printing support was added in GTK+ 2.10.

Structures

GtkPageSetup

undocumented

Convenient Construction

gtkPageSetup is the equivalent of gtkPageSetupNew.

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/gtk2/stable/GtkPageSetup.html


RGtk2 documentation built on March 8, 2019, 5:05 p.m.