[gtk+/wip/baseline2] Add docs for gtk_widget_get_preferred_height_and_baseline_for_width
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baseline2] Add docs for gtk_widget_get_preferred_height_and_baseline_for_width
- Date: Tue, 26 Mar 2013 15:07:26 +0000 (UTC)
commit 75fe9b5f57e75d1e33ecf8c8069248a6d8d58b5c
Author: Alexander Larsson <alexl redhat com>
Date: Tue Mar 26 15:47:50 2013 +0100
Add docs for gtk_widget_get_preferred_height_and_baseline_for_width
gtk/gtksizerequest.c | 21 +++++++++++++++++++++
gtk/gtkwidget.h | 1 +
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index 9c23af9..ed03f3c 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -555,6 +555,27 @@ gtk_widget_get_preferred_height_for_width (GtkWidget *widget,
NULL, NULL);
}
+/**
+ * gtk_widget_get_preferred_height_and_baseline_for_width:
+ * @widget: a #GtkWidget instance
+ * @width: the width which is available for allocation, or -1 if none
+ * @minimum_height: (out) (allow-none): location for storing the minimum height, or %NULL
+ * @natural_height: (out) (allow-none): location for storing the natural height, or %NULL
+ * @minimum_baseline: (out) (allow-none): location for storing the baseline for the minimum height, or %NULL
+ * @natural_baseline: (out) (allow-none): location for storing the baseline for the natural height, or %NULL
+ *
+ * Retrieves a widget's minimum and natural height and the corresponding baselines if it would be given
+ * the specified @width, or the default height if @width is -1. The baselines may be -1 which means
+ * that no baseline is requested for this widget.
+ *
+ * The returned request will be modified by the
+ * GtkWidgetClass::adjust_size_request and GtkWidgetClass::adjust_baseline_request virtual methods
+ * and by any #GtkSizeGroup<!-- -->s that have been applied. That is, the returned request
+ * is the one that should be used for layout, not necessarily the one
+ * returned by the widget itself.
+ *
+ * Since: 3.10
+ */
void
gtk_widget_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
gint width,
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index c74038e..f143fce 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -527,6 +527,7 @@ void gtk_widget_get_preferred_width_for_height (GtkWidget *w
gint height,
gint *minimum_width,
gint *natural_width);
+GDK_AVAILABLE_IN_3_10
void gtk_widget_get_preferred_height_and_baseline_for_width (GtkWidget *widget,
gint width,
gint *minimum_height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]