GtkScrollable: Improve the documentation text.

This commit is contained in:
Murray Cumming
2010-11-02 09:23:24 +01:00
parent c4714662b1
commit d3aa89fc11

View File

@ -22,37 +22,37 @@
* @Short_Description: An interface for scrollable widgets * @Short_Description: An interface for scrollable widgets
* @Title: GtkScrollable * @Title: GtkScrollable
* *
* #GtkScrollable is interface that is implemented by widgets with native * #GtkScrollable is an interface that is implemented by widgets with native
* scrolling ability. * scrolling ability.
* *
* To implement this interface, all one needs to do is to override * To implement this interface you should override the
* #GtkScrollable:hadjustment and #GtkScrollable:vadjustment properties. * #GtkScrollable:hadjustment and #GtkScrollable:vadjustment properties.
* *
* <refsect2> * <refsect2>
* <title>Creating a scrollable widget</title> * <title>Creating a scrollable widget</title>
* <para> * <para>
* There are some common things all scrollable widgets will need to do. * All scrollable widgets should do the following.
* *
* <orderedlist> * <orderedlist>
* <listitem> * <listitem>
* <para> * <para>
* When parent sets adjustments, widget needs to populate adjustment's * When a parent widget sets the scrollable child widget's adjustments, the widget should populate the adjustments'
* #GtkAdjustment:lower, #GtkAdjustment:upper, * #GtkAdjustment:lower, #GtkAdjustment:upper,
* #GtkAdjustment:step-increment, #GtkAdjustment:page-increment and * #GtkAdjustment:step-increment, #GtkAdjustment:page-increment and
* #GtkAdjustment:page-size properties and connect to * #GtkAdjustment:page-size properties and connect to the
* #GtkAdjustment::value-changed signal. * #GtkAdjustment::value-changed signal.
* </para> * </para>
* </listitem> * </listitem>
* <listitem> * <listitem>
* <para> * <para>
* When parent allocates space to child, scrollable widget needs to update * When the parent allocates space to the scrollable child widget, the widget should update
* properties listed under 1 with new values. * the adjustments' properties with new values.
* </para> * </para>
* </listitem> * </listitem>
* <listitem> * <listitem>
* <para> * <para>
* When any of the adjustments emits #GtkAdjustment::value-changed signal, * When any of the adjustments emits the #GtkAdjustment::value-changed signal,
* scrollable widget needs to scroll it's contents. * the scrollable widget should scroll its contents.
* </para> * </para>
* </listitem> * </listitem>
* </orderedlist> * </orderedlist>
@ -77,15 +77,15 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface)
/** /**
* GtkScrollable:hadjustment: * GtkScrollable:hadjustment:
* *
* Horizontal #GtkAdjustment of scrollable widget. This adjustment is * Horizontal #GtkAdjustment of the scrollable widget. This adjustment is
* shared between scrollable widget and it's parent. * shared between the scrollable widget and its parent.
* *
* Since: 3.0 * Since: 3.0
*/ */
pspec = g_param_spec_object ("hadjustment", pspec = g_param_spec_object ("hadjustment",
P_("Horizontal adjustment"), P_("Horizontal adjustment"),
P_("Horizontal adjustment that is shared " P_("Horizontal adjustment that is shared "
"between scrollable widget and it's " "between the scrollable widget and its "
"controller"), "controller"),
GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT); GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT);
@ -94,15 +94,15 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface)
/** /**
* GtkScrollable:vadjustment: * GtkScrollable:vadjustment:
* *
* Verical #GtkAdjustment of scrollable widget. This adjustment is shared * Verical #GtkAdjustment of the scrollable widget. This adjustment is shared
* between scrollable widget and it's parent. * between the scrollable widget and its parent.
* *
* Since: 3.0 * Since: 3.0
*/ */
pspec = g_param_spec_object ("vadjustment", pspec = g_param_spec_object ("vadjustment",
P_("Vertical adjustment"), P_("Vertical adjustment"),
P_("Vertical adjustment that is shared " P_("Vertical adjustment that is shared "
"between scrollable widget and it's " "between the scrollable widget and its "
"controller"), "controller"),
GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT); GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT);
@ -111,8 +111,8 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface)
/** /**
* GtkScrollable:hscroll-policy: * GtkScrollable:hscroll-policy:
* *
* Determines whether horizontal scrolling should commence once the scrollable * Determines whether horizontal scrolling should start once the scrollable
* widget is allocated less than it's minimum width or less than it's natural width. * widget is allocated less than its minimum width or less than its natural width.
* *
* Since: 3.0 * Since: 3.0
*/ */
@ -127,8 +127,8 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface)
/** /**
* GtkScrollable:vscroll-policy: * GtkScrollable:vscroll-policy:
* *
* Determines whether vertical scrolling should commence once the scrollable * Determines whether vertical scrolling should start once the scrollable
* widget is allocated less than it's minimum height or less than it's natural height. * widget is allocated less than its minimum height or less than its natural height.
* *
* Since: 3.0 * Since: 3.0
*/ */
@ -145,7 +145,7 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface)
* gtk_scrollable_get_hadjustment: * gtk_scrollable_get_hadjustment:
* @scrollable: a #GtkScrollable * @scrollable: a #GtkScrollable
* *
* Retrieves the #GtkAdjustment, used for horizontal scrolling. * Retrieves the #GtkAdjustment used for horizontal scrolling.
* *
* Return value: (transfer none): horizontal #GtkAdjustment. * Return value: (transfer none): horizontal #GtkAdjustment.
* *
@ -193,7 +193,7 @@ gtk_scrollable_set_hadjustment (GtkScrollable *scrollable,
* gtk_scrollable_get_vadjustment: * gtk_scrollable_get_vadjustment:
* @scrollable: a #GtkScrollable * @scrollable: a #GtkScrollable
* *
* Retrieves the #GtkAdjustment, used for vertical scrolling. * Retrieves the #GtkAdjustment used for vertical scrolling.
* *
* Return value: (transfer none): vertical #GtkAdjustment. * Return value: (transfer none): vertical #GtkAdjustment.
* *
@ -266,8 +266,8 @@ gtk_scrollable_get_hscroll_policy (GtkScrollable *scrollable)
* @policy: the horizontal #GtkScrollablePolicy * @policy: the horizontal #GtkScrollablePolicy
* *
* Sets the #GtkScrollablePolicy to determine whether * Sets the #GtkScrollablePolicy to determine whether
* horizontal scrolling should commence below minimum or * horizontal scrolling should start below the minimum width or
* below natural width. * below the natural width.
* *
* Since: 3.0 * Since: 3.0
**/ **/
@ -308,8 +308,8 @@ gtk_scrollable_get_vscroll_policy (GtkScrollable *scrollable)
* @policy: the vertical #GtkScrollablePolicy * @policy: the vertical #GtkScrollablePolicy
* *
* Sets the #GtkScrollablePolicy to determine whether * Sets the #GtkScrollablePolicy to determine whether
* vertical scrolling should commence below minimum or * vertical scrolling should start below the minimum height or
* below natural height. * below the natural height.
* *
* Since: 3.0 * Since: 3.0
**/ **/