[gtk+] Move documentation to inline comments: GtkPrintUnixDialog



commit 138409faaea83d42576d10adcfef0af75026474f
Author: Javier Jardón <jjardon gnome org>
Date:   Mon Apr 18 00:07:41 2011 +0100

    Move documentation to inline comments: GtkPrintUnixDialog

 docs/reference/gtk/tmpl/.gitignore              |    1 +
 docs/reference/gtk/tmpl/gtkprintunixdialog.sgml |  317 -----------------------
 gtk/gtkprinter.h                                |   22 ++
 gtk/gtkprintunixdialog.c                        |   71 +++++
 4 files changed, 94 insertions(+), 317 deletions(-)
---
diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore
index 8bd6d8c..35d3e2a 100644
--- a/docs/reference/gtk/tmpl/.gitignore
+++ b/docs/reference/gtk/tmpl/.gitignore
@@ -85,6 +85,7 @@ gtkprinter.sgml
 gtkprintjob.sgml
 gtkprintoperation.sgml
 gtkprintsettings.sgml
+gtkprintunixdialog.sgml
 gtkprogressbar.sgml
 gtkradioaction.sgml
 gtkradiobutton.sgml
diff --git a/gtk/gtkprinter.h b/gtk/gtkprinter.h
index f2c18c1..a9e8736 100644
--- a/gtk/gtkprinter.h
+++ b/gtk/gtkprinter.h
@@ -34,6 +34,28 @@ G_BEGIN_DECLS
 /* Note, this type is manually registered with GObject in gtkprinter.c
  * If you add any flags, update the registration as well!
  */
+/**
+ * GtkPrintCapabilities:
+ * @GTK_PRINT_CAPABILITY_PAGE_SET: Print dialog will offer printing even/odd pages.
+ * @GTK_PRINT_CAPABILITY_COPIES: Print dialog will allow to print multiple copies.
+ * @GTK_PRINT_CAPABILITY_COLLATE: Print dialog will allow to collate multiple copies.
+ * @GTK_PRINT_CAPABILITY_REVERSE: Print dialog will allow to print pages in reverse order.
+ * @GTK_PRINT_CAPABILITY_SCALE: Print dialog will allow to scale the output.
+ * @GTK_PRINT_CAPABILITY_GENERATE_PDF: The program will send the document to
+ *   the printer in PDF format
+ * @GTK_PRINT_CAPABILITY_GENERATE_PS: The program will send the document to
+ *   the printer in Postscript format
+ * @GTK_PRINT_CAPABILITY_PREVIEW: Print dialog will offer a preview
+ * @GTK_PRINT_CAPABILITY_NUMBER_UP: Print dialog will offer printing multiple
+ *   pages per sheet. Since 2.12
+ * @GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT: Print dialog will allow to rearrange
+ *   pages when printing multiple pages per sheet. Since 2.14
+ *
+ * An enum for specifying which features the print dialog should offer.
+ * If neither %GTK_PRINT_CAPABILITY_GENERATE_PDF nor
+ * %GTK_PRINT_CAPABILITY_GENERATE_PS is specified, GTK+ assumes that all
+ * formats are supported.
+ */
 typedef enum
 {
   GTK_PRINT_CAPABILITY_PAGE_SET         = 1 << 0,
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index f4a5049..e3515a0 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -61,6 +61,77 @@
 #include "gtkprivate.h"
 #include "gtktypebuiltins.h"
 
+
+/**
+ * SECTION:gtkprintunixdialog
+ * @Short_description: A print dialog
+ * @Title: GtkPrintUnixDialog
+ * @See_also: #GtkPageSetupUnixDialog, #GtkPrinter, #GtkPrintJob
+ *
+ * GtkPrintUnixDialog implements a print dialog for platforms
+ * which don't provide a native print dialog, like Unix. It can
+ * be used very much like any other GTK+ dialog, at the cost of
+ * the portability offered by the
+ * <link linkend="gtk-High-level-Printing-API">high-level printing API</link>
+ *
+ * In order to print something with #GtkPrintUnixDialog, you need
+ * to use gtk_print_unix_dialog_get_selected_printer() to obtain
+ * a #GtkPrinter object and use it to construct a #GtkPrintJob using
+ * gtk_print_job_new().
+ *
+ * #GtkPrintUnixDialog uses the following response values:
+ * <variablelist>
+ *   <varlistentry><term>%GTK_RESPONSE_OK</term>
+ *     <listitem><para>for the "Print" button</para></listitem>
+ *   </varlistentry>
+ *   <varlistentry><term>%GTK_RESPONSE_APPLY</term>
+ *     <listitem><para>for the "Preview" button</para></listitem>
+ *   </varlistentry>
+ *   <varlistentry><term>%GTK_RESPONSE_CANCEL</term>
+ *     <listitem><para>for the "Cancel" button</para></listitem>
+ *   </varlistentry>
+ * </variablelist>
+ *
+ * <!-- FIXME example here -->
+ *
+ * Printing support was added in GTK+ 2.10.
+ *
+ * <refsect2 id="GtkPrintUnixDialog-BUILDER-UI">
+ * <title>GtkPrintUnixDialog as GtkBuildable</title>
+ * <para>
+ * The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
+ * @notebook internal children with the name "notebook".
+ *
+ * <example>
+ * <title>A <structname>GtkPrintUnixDialog</structname> UI definition fragment.</title>
+ * <programlisting><![CDATA[
+ * <object class="GtkPrintUnixDialog" id="dialog1">
+ *   <child internal-child="notebook">
+ *     <object class="GtkNotebook" id="notebook">
+ *       <child>
+ *         <object class="GtkLabel" id="tabcontent">
+ *         <property name="label">Content on notebook tab</property>
+ *         </object>
+ *       </child>
+ *       <child type="tab">
+ *         <object class="GtkLabel" id="tablabel">
+ *           <property name="label">Tab label</property>
+ *         </object>
+ *         <packing>
+ *           <property name="tab_expand">False</property>
+ *           <property name="tab_fill">False</property>
+ *         </packing>
+ *       </child>
+ *     </object>
+ *   </child>
+ * </object>
+ * ]]></programlisting>
+ * </example>
+ * </para>
+ * </refsect2>
+ */
+
+
 #define EXAMPLE_PAGE_AREA_SIZE 110
 #define RULER_DISTANCE 7.5
 #define RULER_RADIUS 2



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]