gtk2/docs/reference/gtk/tmpl/gtkpagesetup.sgml

294 lines
4.2 KiB
Plaintext
Raw Normal View History

Merge the gtk-printing branch. For more detailed ChangeLog entries, see 2006-04-21 Alexander Larsson <alexl@redhat.com> Merge the gtk-printing branch. For more detailed ChangeLog entries, see the branch. * .cvsignore: * Makefile.am: * configure.in: * docs/tools/widgets.c: * gtk+-unix-print-2.0.pc.in: * gtk/Makefile.am: * gtk/gen-paper-names.c: * gtk/gtk.h: * gtk/gtk.symbols: * gtk/gtkenums.h: * gtk/gtkiconfactory.c: * gtk/gtkmarshalers.list: * gtk/gtkpagesetup.[ch]: * gtk/gtkpagesetupunixdialog.[ch]: * gtk/gtkpapersize.[ch]: * gtk/gtkprint-win32.[ch]: * gtk/gtkprintbackend.[ch]: * gtk/gtkprintcontext.[ch]: * gtk/gtkprinter-private.h: * gtk/gtkprinter.[ch]: * gtk/gtkprinteroption.[ch]: * gtk/gtkprinteroptionset.[ch]: * gtk/gtkprinteroptionwidget.[ch]: * gtk/gtkprintjob.[ch]: * gtk/gtkprintoperation-private.h: * gtk/gtkprintoperation-unix.c: * gtk/gtkprintoperation-win32.c: * gtk/gtkprintoperation.[ch]: * gtk/gtkprintsettings.[ch]: * gtk/gtkprintunixdialog.[ch]: * gtk/paper_names.c: * gtk/paper_names_offsets.c: Platform independent printing API and implementations for unix and windows. * gtk/gtkstock.h: * gtk/stock-icons/24/gtk-orientation-landscape.png: * gtk/stock-icons/24/gtk-orientation-portrait.png: * gtk/stock-icons/24/gtk-orientation-reverse-landscape.png: Add stock icons for page orientation. * modules/Makefile.am: * modules/printbackends/Makefile.am: * modules/printbackends/cups/Makefile.am: * modules/printbackends/cups/gtkcupsutils.[ch]: * modules/printbackends/cups/gtkprintbackendcups.[ch]: * modules/printbackends/cups/gtkprintercups.[ch]: Cups printing backend for unix. * modules/printbackends/lpr/Makefile.am: * modules/printbackends/lpr/gtkprintbackendlpr.[ch]: lpr printing backend for unix. * modules/printbackends/pdf/Makefile.am: * modules/printbackends/pdf/gtkprintbackendpdf.[ch]: print-to-pdf printing backend for unix. * tests/.cvsignore: * tests/Makefile.am: * tests/print-editor.c: Test application for printing. * gdk/gdk.symbols: * gdk/win32/gdkevents-win32.c: * gdk/win32/gdkwin32.h: Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the mainloop while displaying a win32 common dialog. * gdk/directfb/Makefile.am: Whitespace cleanup.
2006-04-21 15:09:32 +00:00
<!-- ##### SECTION Title ##### -->
GtkPageSetup
<!-- ##### SECTION Short_Description ##### -->
Stores page setup information
<!-- ##### SECTION Long_Description ##### -->
<para>
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
2006-09-22 16:32:49 +00:00
and then pass it to the #GtkPrintOperation when printing.
Merge the gtk-printing branch. For more detailed ChangeLog entries, see 2006-04-21 Alexander Larsson <alexl@redhat.com> Merge the gtk-printing branch. For more detailed ChangeLog entries, see the branch. * .cvsignore: * Makefile.am: * configure.in: * docs/tools/widgets.c: * gtk+-unix-print-2.0.pc.in: * gtk/Makefile.am: * gtk/gen-paper-names.c: * gtk/gtk.h: * gtk/gtk.symbols: * gtk/gtkenums.h: * gtk/gtkiconfactory.c: * gtk/gtkmarshalers.list: * gtk/gtkpagesetup.[ch]: * gtk/gtkpagesetupunixdialog.[ch]: * gtk/gtkpapersize.[ch]: * gtk/gtkprint-win32.[ch]: * gtk/gtkprintbackend.[ch]: * gtk/gtkprintcontext.[ch]: * gtk/gtkprinter-private.h: * gtk/gtkprinter.[ch]: * gtk/gtkprinteroption.[ch]: * gtk/gtkprinteroptionset.[ch]: * gtk/gtkprinteroptionwidget.[ch]: * gtk/gtkprintjob.[ch]: * gtk/gtkprintoperation-private.h: * gtk/gtkprintoperation-unix.c: * gtk/gtkprintoperation-win32.c: * gtk/gtkprintoperation.[ch]: * gtk/gtkprintsettings.[ch]: * gtk/gtkprintunixdialog.[ch]: * gtk/paper_names.c: * gtk/paper_names_offsets.c: Platform independent printing API and implementations for unix and windows. * gtk/gtkstock.h: * gtk/stock-icons/24/gtk-orientation-landscape.png: * gtk/stock-icons/24/gtk-orientation-portrait.png: * gtk/stock-icons/24/gtk-orientation-reverse-landscape.png: Add stock icons for page orientation. * modules/Makefile.am: * modules/printbackends/Makefile.am: * modules/printbackends/cups/Makefile.am: * modules/printbackends/cups/gtkcupsutils.[ch]: * modules/printbackends/cups/gtkprintbackendcups.[ch]: * modules/printbackends/cups/gtkprintercups.[ch]: Cups printing backend for unix. * modules/printbackends/lpr/Makefile.am: * modules/printbackends/lpr/gtkprintbackendlpr.[ch]: lpr printing backend for unix. * modules/printbackends/pdf/Makefile.am: * modules/printbackends/pdf/gtkprintbackendpdf.[ch]: print-to-pdf printing backend for unix. * tests/.cvsignore: * tests/Makefile.am: * tests/print-editor.c: Test application for printing. * gdk/gdk.symbols: * gdk/win32/gdkevents-win32.c: * gdk/win32/gdkwin32.h: Add gdk_win32_set_modal_dialog_libgtk_only so that we can pump the mainloop while displaying a win32 common dialog. * gdk/directfb/Makefile.am: Whitespace cleanup.
2006-04-21 15:09:32 +00:00
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.
</para>
<para id="print-margins">
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 <emphasis>minimal</emphasis> size for the layout
margins.
</para>
<para>
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.
</para>
<example>
<title>A page setup dialog</title>
<programlisting>
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;
}
</programlisting>
</example>
<para>
Printing support was added in GTK+ 2.10.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkPageSetup ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_page_setup_new ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_page_setup_copy ##### -->
<para>
</para>
@other:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_orientation ##### -->
<para>
</para>
@setup:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_orientation ##### -->
<para>
</para>
@setup:
@orientation:
<!-- ##### FUNCTION gtk_page_setup_get_paper_size ##### -->
<para>
</para>
@setup:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_paper_size ##### -->
<para>
</para>
@setup:
@size:
<!-- ##### FUNCTION gtk_page_setup_get_top_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_top_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_get_bottom_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_bottom_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_get_left_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_left_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_get_right_margin ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_set_right_margin ##### -->
<para>
</para>
@setup:
@margin:
@unit:
<!-- ##### FUNCTION gtk_page_setup_set_paper_size_and_default_margins ##### -->
<para>
</para>
@setup:
@size:
<!-- ##### FUNCTION gtk_page_setup_get_paper_width ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_paper_height ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_page_width ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_get_page_height ##### -->
<para>
</para>
@setup:
@unit:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_new_from_file ##### -->
<para>
</para>
@file_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_new_from_key_file ##### -->
<para>
</para>
@key_file:
@group_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_to_file ##### -->
<para>
</para>
@setup:
@file_name:
@error:
@Returns:
<!-- ##### FUNCTION gtk_page_setup_to_key_file ##### -->
<para>
</para>
@setup:
@key_file:
@group_name: