Commit 392c0dc1 authored by Benjamin Otte's avatar Benjamin Otte

paned: Implement get_width_for_height() and get_height_for_width()

parent a45c5995
......@@ -174,6 +174,16 @@ static void gtk_paned_get_preferred_width (GtkWidget *widget,
static void gtk_paned_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural);
static void gtk_paned_get_preferred_width_for_height
(GtkWidget *widget,
gint height,
gint *minimum,
gint *natural);
static void gtk_paned_get_preferred_height_for_width
(GtkWidget *widget,
gint width,
gint *minimum,
gint *natural);
static void gtk_paned_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
......@@ -284,6 +294,8 @@ gtk_paned_class_init (GtkPanedClass *class)
widget_class->get_preferred_width = gtk_paned_get_preferred_width;
widget_class->get_preferred_height = gtk_paned_get_preferred_height;
widget_class->get_preferred_width_for_height = gtk_paned_get_preferred_width_for_height;
widget_class->get_preferred_height_for_width = gtk_paned_get_preferred_height_for_width;
widget_class->size_allocate = gtk_paned_size_allocate;
widget_class->realize = gtk_paned_realize;
widget_class->unrealize = gtk_paned_unrealize;
......@@ -932,6 +944,24 @@ gtk_paned_get_preferred_height (GtkWidget *widget,
gtk_paned_get_preferred_size (widget, GTK_ORIENTATION_VERTICAL, -1, minimum, natural);
}
static void
gtk_paned_get_preferred_width_for_height (GtkWidget *widget,
gint height,
gint *minimum,
gint *natural)
{
gtk_paned_get_preferred_size (widget, GTK_ORIENTATION_HORIZONTAL, height, minimum, natural);
}
static void
gtk_paned_get_preferred_height_for_width (GtkWidget *widget,
gint width,
gint *minimum,
gint *natural)
{
gtk_paned_get_preferred_size (widget, GTK_ORIENTATION_VERTICAL, width, minimum, natural);
}
static void
flip_child (GtkWidget *widget,
GtkAllocation *child_pos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment