[gtk+/wip/baseline2] Document gtk_grid_set/get_baseline_row
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baseline2] Document gtk_grid_set/get_baseline_row
- Date: Tue, 26 Mar 2013 15:06:50 +0000 (UTC)
commit 0fca2a0f82d81d72ad430d05b355455d0cfbaf68
Author: Alexander Larsson <alexl redhat com>
Date: Tue Mar 26 15:40:52 2013 +0100
Document gtk_grid_set/get_baseline_row
gtk/gtkgrid.c | 25 +++++++++++++++++++++----
gtk/gtkgrid.h | 2 ++
2 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index ea274bc..5ff8257 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -2411,6 +2411,18 @@ gtk_grid_get_row_baseline_position (GtkGrid *grid,
return props->baseline_position;
}
+/**
+ * gtk_grid_set_baseline_row:
+ * @grid: a #GtkGrid
+ * @row: the row index
+ *
+ * Sets which row defines the global baseline for the entire grid.
+ * Each row in the grid can have its own local baseline, but only
+ * one of those is global, meaning it will be the baseline in the
+ * parent of the @grid.
+ *
+ * Returns: the row index defining the global baseline
+ */
void
gtk_grid_set_baseline_row (GtkGrid *grid,
gint row)
@@ -2426,14 +2438,19 @@ gtk_grid_set_baseline_row (GtkGrid *grid,
priv->baseline_row = row;
if (gtk_widget_get_visible (GTK_WIDGET (grid)))
- {
- gtk_widget_queue_resize (GTK_WIDGET (grid));
- //gtk_widget_queue_resize (gtk_widget_get_parent (GTK_WIDGET (grid)));
- }
+ gtk_widget_queue_resize (GTK_WIDGET (grid));
g_object_notify (G_OBJECT (grid), "baseline-row");
}
}
+/**
+ * gtk_grid_set_baseline_row:
+ * @grid: a #GtkGrid
+ *
+ * Returns which row defines the global baseline of @grid.
+ *
+ * Returns: the row index defining the global baseline
+ */
gint
gtk_grid_get_baseline_row (GtkGrid *grid)
{
diff --git a/gtk/gtkgrid.h b/gtk/gtkgrid.h
index c469704..0016c79 100644
--- a/gtk/gtkgrid.h
+++ b/gtk/gtkgrid.h
@@ -110,8 +110,10 @@ void gtk_grid_set_row_baseline_position (GtkGrid *grid,
GDK_AVAILABLE_IN_3_10
GtkBaselinePosition gtk_grid_get_row_baseline_position (GtkGrid *grid,
gint row);
+GDK_AVAILABLE_IN_3_10
void gtk_grid_set_baseline_row (GtkGrid *grid,
gint row);
+GDK_AVAILABLE_IN_3_10
gint gtk_grid_get_baseline_row (GtkGrid *grid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]