Improve GtkBox and GtkTable docs a bit
This adds some details gleaned from the tutorial, before its impending demise.
This commit is contained in:
parent
17ffcb0cc6
commit
56e797397b
@ -22,8 +22,11 @@ convenient (but slightly less flexible) gtk_table_attach_defaults().
|
|||||||
To alter the space next to a specific row, use gtk_table_set_row_spacing(),
|
To alter the space next to a specific row, use gtk_table_set_row_spacing(),
|
||||||
and for a column, gtk_table_set_col_spacing().</para>
|
and for a column, gtk_table_set_col_spacing().</para>
|
||||||
<para>
|
<para>
|
||||||
The gaps between <emphasis>all</emphasis> rows or columns can be changed by calling
|
The gaps between <emphasis>all</emphasis> rows or columns can be changed by
|
||||||
gtk_table_set_row_spacings() or gtk_table_set_col_spacings() respectively.
|
calling gtk_table_set_row_spacings() or gtk_table_set_col_spacings()
|
||||||
|
respectively. Note that spacing is added <emphasis>between</emphasis> the
|
||||||
|
children, while padding added by gtk_table_atach() is added <emphasis>on
|
||||||
|
either side</emphasis> of the widget it belongs to.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
gtk_table_set_homogeneous(), can be used to set whether all cells in the
|
gtk_table_set_homogeneous(), can be used to set whether all cells in the
|
||||||
@ -169,6 +172,17 @@ specified by @left_attach, @right_attach, @top_attach and @bottom_attach.
|
|||||||
These each represent the leftmost, rightmost, uppermost and lowest column
|
These each represent the leftmost, rightmost, uppermost and lowest column
|
||||||
and row numbers of the table. (Columns and rows are indexed from zero).
|
and row numbers of the table. (Columns and rows are indexed from zero).
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
To make a button occupy the lower right cell of a 2x2 table, use
|
||||||
|
<informalexample><programlisting>
|
||||||
|
gtk_table_attach (table, button,
|
||||||
|
1, 2, /* left, right attach */
|
||||||
|
1, 2, /* top, bottom attach */
|
||||||
|
xoptions, yoptions,
|
||||||
|
xpadding, ypadding);
|
||||||
|
</programlisting></informalexample>
|
||||||
|
If you want to make the button span the entire bottom row, use @left_attach == 0 and @right_attach = 2 instead.
|
||||||
|
</para>
|
||||||
|
|
||||||
@table: The #GtkTable to add a new widget to.
|
@table: The #GtkTable to add a new widget to.
|
||||||
@child: The widget to add.
|
@child: The widget to add.
|
||||||
|
11
gtk/gtkbox.c
11
gtk/gtkbox.c
@ -63,7 +63,10 @@
|
|||||||
* of the GtkBox are forced to get the same amount of space.
|
* of the GtkBox are forced to get the same amount of space.
|
||||||
*
|
*
|
||||||
* Use gtk_box_set_spacing() to determine how much space will be
|
* Use gtk_box_set_spacing() to determine how much space will be
|
||||||
* minimally placed between all children in the GtkBox.
|
* minimally placed between all children in the GtkBox. Note that
|
||||||
|
* spacing is added <emphasis>between</emphasis> the children, while
|
||||||
|
* padding added by gtk_box_pack_start() or gtk_box_pack_end() is added
|
||||||
|
* <emphasis>on either side</emphasis> of the widget it belongs to.
|
||||||
*
|
*
|
||||||
* Use gtk_box_reorder_child() to move a GtkBox child to a different
|
* Use gtk_box_reorder_child() to move a GtkBox child to a different
|
||||||
* place in the box.
|
* place in the box.
|
||||||
@ -1256,9 +1259,9 @@ gtk_box_new (GtkOrientation orientation,
|
|||||||
* gtk_box_pack_start:
|
* gtk_box_pack_start:
|
||||||
* @box: a #GtkBox
|
* @box: a #GtkBox
|
||||||
* @child: the #GtkWidget to be added to @box
|
* @child: the #GtkWidget to be added to @box
|
||||||
* @expand: %TRUE if the new child is to be given extra space allocated to
|
* @expand: %TRUE if the new child is to be given extra space allocated
|
||||||
* @box. The extra space will be divided evenly between all children of
|
* to @box. The extra space will be divided evenly between all children
|
||||||
* @box that use this option
|
* that use this option
|
||||||
* @fill: %TRUE if space given to @child by the @expand option is
|
* @fill: %TRUE if space given to @child by the @expand option is
|
||||||
* actually allocated to @child, rather than just padding it. This
|
* actually allocated to @child, rather than just padding it. This
|
||||||
* parameter has no effect if @expand is set to %FALSE. A child is
|
* parameter has no effect if @expand is set to %FALSE. A child is
|
||||||
|
Loading…
Reference in New Issue
Block a user