diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-04-21 01:32:55 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-04-21 01:32:55 -0400 |
commit | 9306a73dfd5f061326a584a6c11971361fa7095a (patch) | |
tree | 2dc39fea16ed0ab8f4a07b99fb2c0d39238933e8 /gtk/gtkbox.c | |
parent | 504ec365a7d8c513820c5f27eb7fc63cbce58ce8 (diff) | |
download | gtk+-9306a73dfd5f061326a584a6c11971361fa7095a.tar.gz |
Added documentation, implemented gtk_extended_layout_is_height_for_width() where needed.NATIVE_LAYOUT_INCUBATOR_BRANCHPOINT
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r-- | gtk/gtkbox.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 6d470352d4..96009696be 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -110,6 +110,7 @@ static GType gtk_box_child_type (GtkContainer *container); static void gtk_box_extended_layout_init (GtkExtendedLayoutIface *iface); +static gboolean gtk_box_is_height_for_width (GtkExtendedLayout *layout); static void gtk_box_get_desired_width (GtkExtendedLayout *layout, gint *minimum_size, gint *natural_size); @@ -765,18 +766,26 @@ gtk_box_pack (GtkBox *box, } - static void gtk_box_extended_layout_init (GtkExtendedLayoutIface *iface) { parent_extended_layout_iface = g_type_interface_peek_parent (iface); + iface->is_height_for_width = gtk_box_is_height_for_width; iface->get_desired_width = gtk_box_get_desired_width; iface->get_desired_height = gtk_box_get_desired_height; iface->get_height_for_width = gtk_box_get_height_for_width; iface->get_width_for_height = gtk_box_get_width_for_height; } +static gboolean +gtk_box_is_height_for_width (GtkExtendedLayout *layout) +{ + GtkBoxPrivate *private = GTK_BOX_GET_PRIVATE (layout); + + return (private->orientation == GTK_ORIENTATION_VERTICAL); +} + static void gtk_box_get_desired_size (GtkExtendedLayout *layout, GtkOrientation orientation, |