From cc223eeff6d60f1b4ab77b09d3d6cdede6372916 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Sun, 24 Jun 2001 15:34:48 +0000 Subject: Fix stupid error introduced last night that was making things decidedly Sun Jun 24 11:29:35 2001 Owen Taylor * gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error introduced last night that was making things decidedly not work. * gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters so that we have getter/setter pairing everywhere it makes sense. (#55767) * gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.: Rename gtk_radio_button_group to gtk_radio_button_get_group, add a deprecated compat macro. (#55516) * gtk/gtklabel.[ch]: Add functions gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(), gtk_label_set_label(), which mirror the property API for GtkLabel. Make gtk_label_get_attributes() only reflect the attributes set by gtk_label_set_attributes. * gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename from gtk_notebook_set_page(). --- gtk/gtktable.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) (limited to 'gtk/gtktable.c') diff --git a/gtk/gtktable.c b/gtk/gtktable.c index aa7206390c..5a3ac537b5 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -661,6 +661,26 @@ gtk_table_set_row_spacing (GtkTable *table, g_object_notify (G_OBJECT (table), "row_spacing"); } +/** + * gtk_table_get_row_spacing: + * @table: a #GtkTable + * @row: a row in the table, 0 indicates the first row + * + * Gets the amount of space between row @row, and + * row @row + 1. See gtk_table_set_row_spacing(). + * + * Return value: the row spacing + **/ +guint +gtk_table_get_row_spacing (GtkTable *table, + guint row) +{ + g_return_val_if_fail (GTK_IS_TABLE (table), 0); + g_return_val_if_fail (row < table->nrows - 1, 0); + + return table->rows[row].spacing; +} + void gtk_table_set_col_spacing (GtkTable *table, guint column, @@ -681,6 +701,26 @@ gtk_table_set_col_spacing (GtkTable *table, g_object_notify (G_OBJECT (table), "column_spacing"); } +/** + * gtk_table_get_col_spacing: + * @table: a #GtkTable + * @col: a column in the table, 0 indicates the first column + * + * Gets the amount of space between column @col, and + * column @col + 1. See gtk_table_set_col_spacing(). + * + * Return value: the column spacing + **/ +guint +gtk_table_get_col_spacing (GtkTable *table, + guint column) +{ + g_return_val_if_fail (GTK_IS_TABLE (table), 0); + g_return_val_if_fail (column < table->ncols, 0); + + return table->cols[column].spacing; +} + void gtk_table_set_row_spacings (GtkTable *table, guint spacing) @@ -698,6 +738,24 @@ gtk_table_set_row_spacings (GtkTable *table, gtk_widget_queue_resize (GTK_WIDGET (table)); } +/** + * gtk_table_get_default_row_spacing: + * @table: a #GtkTable + * + * Gets the default row spacing for the table. This is + * the spacing that will be used for newly added rows. + * (See gtk_table_set_row_spacings()) + * + * Returns value: the default row spacing + **/ +guint +gtk_table_get_default_row_spacing (GtkTable *table) +{ + g_return_val_if_fail (GTK_IS_TABLE (table), 0); + + return table->row_spacing; +} + void gtk_table_set_col_spacings (GtkTable *table, guint spacing) @@ -715,6 +773,24 @@ gtk_table_set_col_spacings (GtkTable *table, gtk_widget_queue_resize (GTK_WIDGET (table)); } +/** + * gtk_table_get_default_col_spacing: + * @table: a #GtkTable + * + * Gets the default column spacing for the table. This is + * the spacing that will be used for newly added columns. + * (See gtk_table_set_col_spacings()) + * + * Returns value: the default column spacing + **/ +guint +gtk_table_get_default_col_spacing (GtkTable *table) +{ + g_return_val_if_fail (GTK_IS_TABLE (table), 0); + + return table->column_spacing; +} + void gtk_table_set_homogeneous (GtkTable *table, gboolean homogeneous) @@ -732,6 +808,23 @@ gtk_table_set_homogeneous (GtkTable *table, } } +/** + * gtk_table_get_homogeneous: + * @table: a #GtkTable + * + * Returns whether the table cells are all constrained to the same + * width and height. (See gtk_table_set_homogenous ()) + * + * Return value: %TRUE if the cells are all constrained to the same size + **/ +gboolean +gtk_table_get_homogeneous (GtkTable *table) +{ + g_return_val_if_fail (GTK_IS_TABLE (table), FALSE); + + return table->homogeneous; +} + static void gtk_table_finalize (GObject *object) { -- cgit v1.2.1