It derives from <GObject>.
Stores page size, orientation and margins for printing.
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
page-setup:new to get the defaults, or use
print-run-page-setup-dialog to
show the page setup dialog and receive the resulting page setup.
static GtkPrintSettings *settings = NULL;
static GtkPageSetup *page_setup = NULL;
static void
do_page_setup (void)
{
GtkPageSetup *new_page_setup;
if (settings == NULL)
settings = gtk_print_settings_new ();
new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
page_setup, settings);
if (page_setup)
g_object_unref (page_setup);
page_setup = new_page_setup;
}
Copies a <GtkPageSetup>.
Passed: a <GtkPageSetup>.
the <GtkPageSetup> to copy
Returned: a <GtkPageSetup>.
a copy of self
Gets the bottom margin in units of unit.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the bottom margin
Gets the left margin in units of unit.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the left margin
Gets the page orientation of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Returned: a <GtkPageOrientation>.
the page orientation
Returns the page height in units of unit.
Note that this function takes orientation and margins into
consideration. See page-setup:get-paper-height.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the page height.
Returns the page width in units of unit.
Note that this function takes orientation and margins into
consideration. See page-setup:get-paper-width.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the page width.
Returns the paper height in units of unit.
Note that this function takes orientation, but not margins into
consideration. See page-setup:get-page-height.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the paper height.
Gets the paper size of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Returned: a <GtkPaperSize>.
the paper size
Returns the paper width in units of unit.
Note that this function takes orientation, but not margins into
consideration. See page-setup:get-page-width.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the paper width.
Gets the right margin in units of unit.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the right margin
Gets the top margin in units of unit.
Passed: a <GtkPageSetup>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the top margin
Reads the page setup from the file file-name.
See page-setup:to-file?.
Passed: a <GtkPageSetup>.
Passed: a file name, as a string.
the filename to read the page setup from
Returned: a boolean.
#t on success
Reads the page setup from the group group-name in the key file key-file.
Passed: a <GtkPageSetup>.
Passed: a <GKeyFile>.
the <GKeyFile> to retrieve the page_setup
from
Passed, or left out: a string, or #f.
the name of the group in the key_file to read to use the default name “Page Setup”
Returned: a boolean.
#t on success
Creates a new <GtkPageSetup>.
Returned: a <GtkPageSetup>.
a new <GtkPageSetup>.
Reads the page setup from the file file-name.
Returns a new <GtkPageSetup> object with the
restored page setup, or #f if an error occurred. See
page-setup:to-file?.
Passed: a file name, as a string.
the filename to read the page setup from
Returned: a <GtkPageSetup>.
the restored <GtkPageSetup>
Desrialize a page setup from an a{sv} variant.
The variant must be in the format produced by page-setup:to-gvariant.
Passed: a <GVariant>.
an a{sv} <GVariant>
Returned: a <GtkPageSetup>.
a new <GtkPageSetup> object
Reads the page setup from the group group-name in the key file key-file.
Returns a new <GtkPageSetup> object with the
restored page setup, or #f if an error occurred.
Passed: a <GKeyFile>.
the <GKeyFile> to retrieve the page_setup
from
Passed, or left out: a string, or #f.
the name of the group in the key_file to read to use the default name “Page Setup”
Returned: a <GtkPageSetup>.
the restored <GtkPageSetup>
Sets the bottom margin of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Passed: a real number.
the new bottom margin in units of unit
Passed: a <GtkUnit>, or one of its symbols.
the units for margin
Sets the left margin of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Passed: a real number.
the new left margin in units of unit
Passed: a <GtkUnit>, or one of its symbols.
the units for margin
Sets the page orientation of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Passed: a <GtkPageOrientation>, or one of
its symbols.
a <GtkPageOrientation> value
Sets the paper size of the <GtkPageSetup>
without changing the margins.
See page-setup:set-paper-size-and-default-margins.
Passed: a <GtkPageSetup>.
Passed: a <GtkPaperSize>.
Sets the paper size of the <GtkPageSetup> and
modifies the margins according to the new paper size.
Passed: a <GtkPageSetup>.
Passed: a <GtkPaperSize>.
Sets the right margin of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Passed: a real number.
the new right margin in units of unit
Passed: a <GtkUnit>, or one of its symbols.
the units for margin
Sets the top margin of the <GtkPageSetup>.
Passed: a <GtkPageSetup>.
Passed: a real number.
the new top margin in units of unit
Passed: a <GtkUnit>, or one of its symbols.
the units for margin
This function saves the information from self to file-name.
Passed: a <GtkPageSetup>.
Passed: a file name, as a string.
the file to save to
Returned: a boolean.
#t on success
Serialize page setup to an a{sv} variant.
Passed: a <GtkPageSetup>.
Returned: a <GVariant>.
a new, floating, <GVariant>
This function adds the page setup from self to key-file.
Passed: a <GtkPageSetup>.
Passed: a <GKeyFile>.
the <GKeyFile> to save the page setup to
Passed, or left out: a string, or #f.
the group to add the settings to in key-file, or #f to use
the default name “Page Setup”