]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkpagesetup.c
GtkStyleContext: Use correct type for animation duration.
[~andy/gtk] / gtk / gtkpagesetup.c
index 0e8c153b7749c1ee11b308e5ccc6c6d17e6f800b..a00177efd6a30034ac22806abf133d2fd0cedd08 100644 (file)
 #include "gtkprintoperation.h" /* for GtkPrintError */
 #include "gtkintl.h"
 #include "gtktypebuiltins.h"
-#include "gtkalias.h"
+
+/**
+ * SECTION:gtkpagesetup
+ * @Short_description: Stores page setup information
+ * @Title: GtkPageSetup
+ *
+ * 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.
+ *
+ * <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>
+ *
+ * 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.
+ *
+ * <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>
+ *
+ * Printing support was added in GTK+ 2.10.
+ */
 
 #define KEYFILE_GROUP_NAME "Page Setup"
 
@@ -99,10 +150,10 @@ gtk_page_setup_new (void)
 /**
  * gtk_page_setup_copy:
  * @other: the #GtkPageSetup to copy
- * 
+ *
  * Copies a #GtkPageSetup.
- * 
- * Return value: a copy of @other
+ *
+ * Return value: (transfer full): a copy of @other
  *
  * Since: 2.10
  */
@@ -782,6 +833,3 @@ gtk_page_setup_to_key_file (GtkPageSetup *setup,
                         "Orientation", orientation);
   g_free (orientation);
 }
-
-#define __GTK_PAGE_SETUP_C__
-#include "gtkaliasdef.c"