Back to Seed Clases

Gtk


Classes

Interfaces

Structs

Unions

Enums

GObject.Object
parent-child marker Gtk.PageSetup

Class Gtk.PageSetup

Import line: Gtk = imports.gi.Gtk;
GIR File: Gtk-3.0.gir
C documentation: GtkPageSetup
Class : PageSetup
Extends: GObject.Object
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 gtk_page_setup_new() to get the defaults,
or use gtk_print_run_page_setup_dialog() to show the page setup dialog
and receive the resulting page setup.

A page setup dialog

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;
}


Printing support was added in GTK+ 2.10.
Properties
None
Methods / Constructors
Method / Constructor Defined By
 
new Gtk.PageSetup ()
Create a new Gtk.PageSetup
Create a new Gtk.PageSetup
 
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
EvinceView.PrintOperation
Method
set_default_page_setup (PageSetup page_setup) : none
Gtk
Method
Gtk.print_run_page_setup_dialog (Window parent, PageSetup page_setup, PrintSettings settings) : Gtk.PageSetup
Runs a page setup dialog, letting the user modify the values from
is identical to the passed in page_setup, otherwise it contains the
modifications done in the dialog.
Gtk
Method
Gtk.print_run_page_setup_dialog_async (Window parent, PageSetup page_setup, PrintSettings settings, Function done_cb, void* data) : none
Runs a page setup dialog, letting the user modify the values from page_setup.
Gtk.PrintContext
Method
get_page_setup () : Gtk.PageSetup
Obtains the GtkPageSetup that determines the page
dimensions of the GtkPrintContext.
Gtk.PrintOperation
Property
default_page_setup : Gtk.PageSetup
The GtkPageSetup used by default.
Gtk.PrintOperation
Signal
request_page_setup (PrintOperation self, PrintContext context, gint32 page_nr, PageSetup setup) : none
Emitted once for every page that is printed, to give
the application a chance to modify the page setup.
Gtk.PrintOperation
Signal
update_custom_widget (PrintOperation self, Widget widget, PageSetup setup, PrintSettings settings) : none
Emitted after change of selected printer.
Gtk.PrintOperation
Method
get_default_page_setup () : Gtk.PageSetup
Returns the default page setup, see
gtk_print_operation_set_default_page_setup().
Gtk.PrintOperation
Method
set_default_page_setup (PageSetup default_page_setup) : none
Makes default_page_setup the default page setup for op.
Gtk.PrintOperationPreview
Signal
got_page_size (PrintOperationPreview self, PrintContext context, PageSetup page_setup) : none
The ::got-page-size signal is emitted once for each page
that gets rendered to the preview.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:13:27 GMT+0800 (HKT)