1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
GtkTable
<!-- ##### SECTION Short_Description ##### -->
2004-10-11 20:10:52 +00:00
Pack widgets in regular patterns
1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Long_Description ##### -->
<para>
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
The #GtkTable functions allow the programmer to arrange widgets in rows and
1999-08-16 18:51:52 +00:00
columns, making it easy to align many widgets next to each other,
horizontally and vertically.
</para>
<para>
Tables are created with a call to gtk_table_new(), the size of which can
later be changed with gtk_table_resize().
</para>
<para>
Widgets can be added to a table using gtk_table_attach() or the more
convenient (but slightly less flexible) gtk_table_attach_defaults().
</para>
<para>
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>
<para>
The gaps between <emphasis>all</emphasis> rows or columns can be changed by calling
gtk_table_set_row_spacings() or gtk_table_set_col_spacings() respectively.
</para>
<para>
gtk_table_set_homogeneous(), can be used to set whether all cells in the
table will resize themselves to the size of the largest widget in the table.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkVBox</term>
<listitem><para>For packing widgets vertically only.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkHBox</term>
<listitem><para>For packing widgets horizontally only.</para></listitem>
</varlistentry>
</variablelist>
</para>
2005-06-20 22:06:27 +00:00
<!-- ##### SECTION Stability_Level ##### -->
2010-05-08 05:18:53 +00:00
<!-- ##### SECTION Image ##### -->
1999-08-16 18:51:52 +00:00
<!-- ##### STRUCT GtkTable ##### -->
<para>
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
The <structname>GtkTable</structname> structure holds the data for the actual table itself.
1999-08-16 18:51:52 +00:00
<structfield>children</structfield> is a #GList of all the widgets the table contains. <structfield>rows</structfield> and <structfield>columns</structfield> are pointers to #GtkTableRowCol structures, which contain the default spacing and expansion details for the #GtkTable's rows and columns, respectively.
</para>
<para>
<structfield>nrows</structfield> and <structfield>ncols</structfield> are 16bit integers storing the number of rows and columns the table has.
</para>
2004-07-20 02:26:06 +00:00
<!-- ##### ARG GtkTable:column-spacing ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:homogeneous ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:n-columns ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:n-rows ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:row-spacing ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:bottom-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:left-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:right-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:top-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:x-options ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:x-padding ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:y-options ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:y-padding ##### -->
<para>
</para>
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_table_new ##### -->
<para>
2001-06-08 16:50:58 +00:00
Used to create a new table widget. An initial size must be given by
specifying how many rows and columns the table should have, although
this can be changed later with gtk_table_resize(). @rows and @columns
2010-07-10 01:40:46 +00:00
must both be in the range 1 .. 65535. For historical reasons, 0 is accepted
as well and is silently interpreted as 1.
1999-08-16 18:51:52 +00:00
</para>
@rows: The number of rows the new table should have.
@columns: The number of columns the new table should have.
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
@homogeneous: If set to %TRUE, all table cells are resized to the size of the cell
1999-08-16 18:51:52 +00:00
containing the largest widget.
@Returns: A pointer to the the newly created table widget.
<!-- ##### FUNCTION gtk_table_resize ##### -->
<para>
If you need to change a table's size <emphasis>after</emphasis> it has been created, this function allows you to do so.
</para>
@table: The #GtkTable you wish to change the size of.
@rows: The new number of rows.
@columns: The new number of columns.
2010-06-28 14:19:56 +00:00
<!-- ##### FUNCTION gtk_table_get_size ##### -->
<para>
</para>
@table:
@rows:
@columns:
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_table_attach ##### -->
<para>
Adds a widget to a table. The number of 'cells' that a widget will occupy is
specified by @left_attach, @right_attach, @top_attach and @bottom_attach.
These each represent the leftmost, rightmost, uppermost and lowest column
and row numbers of the table. (Columns and rows are indexed from zero).
</para>
@table: The #GtkTable to add a new widget to.
@child: The widget to add.
@left_attach: the column number to attach the left side of a child widget to.
@right_attach: the column number to attach the right side of a child widget to.
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
@top_attach: the row number to attach the top of a child widget to.
2003-09-22 08:30:26 +00:00
@bottom_attach: the row number to attach the bottom of a child widget to.
1999-08-16 18:51:52 +00:00
@xoptions: Used to specify the properties of the child widget when the table is resized.
@yoptions: The same as xoptions, except this field determines behaviour of vertical resizing.
@xpadding: An integer value specifying the padding on the left and right of the widget being added to the table.
@ypadding: The amount of padding above and below the child widget.
<!-- ##### FUNCTION gtk_table_attach_defaults ##### -->
<para>
2004-05-31 04:17:42 +00:00
As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. The values used for the #GtkAttachOptions are <literal>GTK_EXPAND | GTK_FILL</literal>, and the padding is set to 0.
1999-08-16 18:51:52 +00:00
</para>
@table: The table to add a new child widget to.
@widget: The child widget to add.
@left_attach: The column number to attach the left side of the child widget to.
@right_attach: The column number to attach the right side of the child widget to.
@top_attach: The row number to attach the top of the child widget to.
@bottom_attach: The row number to attach the bottom of the child widget to.
<!-- ##### FUNCTION gtk_table_set_row_spacing ##### -->
<para>
2006-08-15 15:49:41 +00:00
Changes the space between a given table row and the subsequent row.
1999-08-16 18:51:52 +00:00
</para>
@table: a #GtkTable containing the row whose properties you wish to change.
@row: row number whose spacing will be changed.
@spacing: number of pixels that the spacing should take up.
<!-- ##### FUNCTION gtk_table_set_col_spacing ##### -->
<para>
2006-08-15 15:49:41 +00:00
Alters the amount of space between a given table column and the following
column.
1999-08-16 18:51:52 +00:00
</para>
@table: a #GtkTable.
@column: the column whose spacing should be changed.
@spacing: number of pixels that the spacing should take up.
<!-- ##### FUNCTION gtk_table_set_row_spacings ##### -->
<para>
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
Sets the space between every row in @table equal to @spacing.
1999-08-16 18:51:52 +00:00
</para>
@table: a #GtkTable.
@spacing: the number of pixels of space to place between every row in the table.
<!-- ##### FUNCTION gtk_table_set_col_spacings ##### -->
<para>
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
Sets the space between every column in @table equal to @spacing.
1999-08-16 18:51:52 +00:00
</para>
@table: a #GtkTable.
@spacing: the number of pixels of space to place between every column in the table.
<!-- ##### FUNCTION gtk_table_set_homogeneous ##### -->
<para>
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.
1999-08-16 18:51:52 +00:00
</para>
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
@table: The #GtkTable you wish to set the homogeneous properties of.
@homogeneous: Set to %TRUE to ensure all table cells are the same size. Set
to %FALSE if this is not your desired behaviour.
1999-08-16 18:51:52 +00:00
2001-09-08 06:24:46 +00:00
<!-- ##### FUNCTION gtk_table_get_default_row_spacing ##### -->
<para>
</para>
@table:
@Returns:
<!-- ##### FUNCTION gtk_table_get_homogeneous ##### -->
<para>
</para>
@table:
@Returns:
<!-- ##### FUNCTION gtk_table_get_row_spacing ##### -->
<para>
</para>
@table:
@row:
@Returns:
<!-- ##### FUNCTION gtk_table_get_col_spacing ##### -->
<para>
</para>
@table:
@column:
@Returns:
<!-- ##### FUNCTION gtk_table_get_default_col_spacing ##### -->
<para>
</para>
@table:
@Returns: