]> Pileus Git - ~andy/gtk/commitdiff
Merge docs inline
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 29 Dec 2008 02:36:39 +0000 (02:36 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 29 Dec 2008 02:36:39 +0000 (02:36 +0000)
svn path=/trunk/; revision=21959

ChangeLog
docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtkscale.sgml
gtk/gtkscale.c

index 1e7c8f2ca44ba9e7f5dc546035f3e1aa984df75d..0f154a12ae537c12559a61aa527c4da8a1844f84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-28  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkscale.c: Merge docs inline.
+
 2008-12-28  Ryan Lortie  <desrt@desrt.ca>
 
        small fix for "Paned Window Widgets" example
index 9045bbe7a8a0ab0ab13cdace03b66408b99c213b..797dee09441567887174b60824901872b98968e3 100644 (file)
@@ -1,6 +1,10 @@
 2008-12-28  Matthias Clasen <mclasen@redhat.com>
 
-       * docs/reference/gtk/gtk-sections.txt: Remove overridden INCLUDEs
+       * gtk/tmpl/gtkscale.sgml: Merge docs inline.
+
+2008-12-28  Matthias Clasen <mclasen@redhat.com>
+
+       * docs/reference/gtk/gtk-sections.txt: Remove overridden INCLUDE
 
        * gtk/tmpl/gtkfontsel.sgml:
        * gtk/tmpl/gtkeditable.sgml: Merge docs inline.
index 6503d5b70bfba30882bbc96d9375ed9820c62cf2..ff13e6dcd988ce3a72371131616407f503cb0fc5 100644 (file)
@@ -29,53 +29,20 @@ call gtk_hscale_new_with_range() or gtk_vscale_new_with_range().
 
 <!-- ##### STRUCT GtkScale ##### -->
 <para>
-The #GtkScale-struct struct contains the following fields.
-(These fields should be considered read-only. They should never be set by
-an application.)
-
-<informaltable pgwide="1" frame="none" role="struct">
-<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
-<tbody>
+The fields of the #GtkScale-struct struct should only be accessed via
+the accessor functions.
+</para>
 
-<row>
-<entry>#guint <structfield>draw_value</structfield>;</entry>
-<entry>non-zero if the scale's current value is displayed next to the
-slider.</entry>
-</row>
 
-<row>
-<entry>#guint <structfield>value_pos</structfield>;</entry>
-<entry>the position in which the textual value is displayed, selected from
-#GtkPositionType.</entry>
-</row>
+<!-- ##### SIGNAL GtkScale::format-value ##### -->
+<para>
 
-</tbody></tgroup></informaltable>
 </para>
 
+@scale: 
+@value: 
+@Returns: 
 
-<!-- ##### SIGNAL GtkScale::format-value ##### -->
-<para>
-Signal which allows you to change how the scale value is displayed.  Connect a
-signal handler which returns an allocated string representing @value.
-That string will then be used to display the scale's value.
-Here's an example signal handler which displays a value 1.0 as
-with "--&gt;1.0&lt;--".
-<informalexample><programlisting>
-static gchar*
-format_value_callback (GtkScale *scale,
-                       gdouble   value)
-{
-  return g_strdup_printf ("--&gt;&percnt;0.*g&lt;--",
-                          gtk_scale_get_digits (scale), value);
-}
-</programlisting></informalexample>
-</para>
-
-@scale: the object which received the signal.
-@arg1: 
-@Returns: allocated string representing @value
-<!-- # Unused Parameters # -->
-@value: value to format
 
 <!-- ##### ARG GtkScale:digits ##### -->
 <para>
@@ -104,61 +71,56 @@ format_value_callback (GtkScale *scale,
 
 <!-- ##### FUNCTION gtk_scale_set_digits ##### -->
 <para>
-Sets the number of decimal places that are displayed in the value.  Also causes
-the value of the adjustment to be rounded off to this number of digits, so the
-retrieved value matches the value the user saw.
+
 </para>
 
-@scale: a #GtkScale.
-@digits: the number of decimal places to display, e.g. use 1 to display 1.0,
-2 to display 1.00 etc.
+@scale: 
+@digits: 
 
 
 <!-- ##### FUNCTION gtk_scale_set_draw_value ##### -->
 <para>
-Specifies whether the current value is displayed as a string next to the
-slider.
+
 </para>
 
-@scale: a #GtkScale.
-@draw_value: a boolean.
+@scale: 
+@draw_value:
 
 
 <!-- ##### FUNCTION gtk_scale_set_value_pos ##### -->
 <para>
-Sets the position in which the current value is displayed.
+
 </para>
 
-@scale: a #GtkScale.
-@pos: the position in which the current value is displayed.
+@scale:
+@pos: 
 
 
 <!-- ##### FUNCTION gtk_scale_get_digits ##### -->
 <para>
-Gets the number of decimal places that are displayed in the value.
+
 </para>
 
-@scale: a #GtkScale.
-@Returns: the number of decimal places that are displayed.
+@scale:
+@Returns:
 
 
 <!-- ##### FUNCTION gtk_scale_get_draw_value ##### -->
 <para>
-Returns whether the current value is displayed as a string next to the
-slider.
+
 </para>
 
-@scale: a #GtkScale.
-@Returns: whether the current value is displayed as a string.
+@scale: 
+@Returns: 
 
 
 <!-- ##### FUNCTION gtk_scale_get_value_pos ##### -->
 <para>
-Gets the position in which the current value is displayed.
+
 </para>
 
-@scale: a #GtkScale.
-@Returns: the position in which the current value is displayed.
+@scale:
+@Returns:
 
 
 <!-- ##### FUNCTION gtk_scale_get_layout ##### -->
index 929bb645299577bdf8d8abbd73b2684096958493..f8a114fcd5bff3aeec7d8cce93c316607f9ffaae 100644 (file)
@@ -138,6 +138,29 @@ gtk_scale_class_init (GtkScaleClass *class)
 
   class->get_layout_offsets = gtk_scale_real_get_layout_offsets;
 
+  /**
+   * GtkScale::format-value:
+   * @scale: the object which received the signal
+   * @value: the value to format
+   *
+   * Signal which allows you to change how the scale value is displayed.
+   * Connect a signal handler which returns an allocated string representing 
+   * @value. That string will then be used to display the scale's value.
+   *
+   * Here's an example signal handler which displays a value 1.0 as
+   * with "--&gt;1.0&lt;--".
+   * |[
+   * static gchar*
+   * format_value_callback (GtkScale *scale,
+   *                        gdouble   value)
+   * {
+   *   return g_strdup_printf ("--&gt;&percnt;0.*g&lt;--",
+   *                           gtk_scale_get_digits (scale), value);
+   *  }
+   * ]|
+   *
+   * Return value: allocated string representing @value
+   */
   signals[FORMAT_VALUE] =
     g_signal_new (I_("format-value"),
                   G_TYPE_FROM_CLASS (gobject_class),
@@ -477,6 +500,16 @@ gtk_scale_new_with_range (GtkOrientation orientation,
                        NULL);
 }
 
+/**
+ * gtk_scale_set_digits:
+ * @scale: a #GtkScale
+ * @digits: the number of decimal places to display, 
+ *     e.g. use 1 to display 1.0, 2 to display 1.00, etc
+ * 
+ * Sets the number of decimal places that are displayed in the value.
+ * Also causes the value of the adjustment to be rounded off to this
+ * number of digits, so the retrieved value matches the value the user saw.
+ */
 void
 gtk_scale_set_digits (GtkScale *scale,
                      gint      digits)
@@ -502,6 +535,14 @@ gtk_scale_set_digits (GtkScale *scale,
     }
 }
 
+/**
+ * gtk_scale_get_digits:
+ * @scale: a #GtkScale
+ *
+ * Gets the number of decimal places that are displayed in the value.
+ *
+ * Returns: the number of decimal places that are displayed
+ */
 gint
 gtk_scale_get_digits (GtkScale *scale)
 {
@@ -510,6 +551,14 @@ gtk_scale_get_digits (GtkScale *scale)
   return scale->digits;
 }
 
+/**
+ * gtk_scale_set_draw_value:
+ * @scale: a #GtkScale
+ * draw_value: %TRUE to draw the value
+ * 
+ * Specifies whether the current value is displayed as a string next 
+ * to the slider.
+ */
 void
 gtk_scale_set_draw_value (GtkScale *scale,
                          gboolean  draw_value)
@@ -534,6 +583,15 @@ gtk_scale_set_draw_value (GtkScale *scale,
     }
 }
 
+/**
+ * gtk_scale_get_draw_value:
+ * @scale: a #GtkScale
+ *
+ * Returns whether the current value is displayed as a string 
+ * next to the slider.
+ *
+ * Returns: whether the current value is displayed as a string
+ */
 gboolean
 gtk_scale_get_draw_value (GtkScale *scale)
 {
@@ -542,6 +600,13 @@ gtk_scale_get_draw_value (GtkScale *scale)
   return scale->draw_value;
 }
 
+/**
+ * gtk_scale_set_value_pos:
+ * @scale: a #GtkScale
+ * @pos: the position in which the current value is displayed
+ * 
+ * Sets the position in which the current value is displayed.
+ */
 void
 gtk_scale_set_value_pos (GtkScale        *scale,
                         GtkPositionType  pos)
@@ -560,6 +625,14 @@ gtk_scale_set_value_pos (GtkScale        *scale,
     }
 }
 
+/**
+ * gtk_scale_get_value_pos:
+ * @scale: a #GtkScale
+ *
+ * Gets the position in which the current value is displayed.
+ *
+ * Returns: the position in which the current value is displayed
+ */
 GtkPositionType
 gtk_scale_get_value_pos (GtkScale *scale)
 {
@@ -831,7 +904,7 @@ gtk_scale_real_get_layout_offsets (GtkScale *scale,
  * if no user signal handlers, falls back to a default format.
  * 
  * Return value: formatted value
- **/
+ */
 gchar*
 _gtk_scale_format_value (GtkScale *scale,
                          gdouble   value)
@@ -873,7 +946,7 @@ gtk_scale_finalize (GObject *object)
  *    if the #GtkScale:draw-value property is %FALSE.
  *   
  * Since: 2.4
- **/
+ */
 PangoLayout *
 gtk_scale_get_layout (GtkScale *scale)
 {
@@ -914,7 +987,7 @@ gtk_scale_get_layout (GtkScale *scale)
  * values are undefined.
  *
  * Since: 2.4
- **/
+ */
 void 
 gtk_scale_get_layout_offsets (GtkScale *scale,
                               gint     *x,