which also works for offscreen windows and their embedder.
Also add gdk_window_get_effective_parent() and
gdk_window_get_effective_toplevel() which are offscreen aware.
Added a function to update sizegroups in multiple passes, this
way the width and height can be updated in the sizegroups after
querying the extended layout implementor for these.
Implemented this in GtkExtendedLayout, sizegroups should be working reasonably now.
This commit changes gtk_extended_layout_get_desired_size() for
per dimension variants. Furthermore this commit reverts the actions
done in size-groups for now as it needs a different approach.
The natural width/height parameters added to aux_info have been changed
for a per width cache for heights and a per height cache for widths.
gtk-demo is still working, currently sizegroups are not taken
into account as mentioned above - size groups need to be alerted both
when the widths and heights are updated independantly and then that
information needs to repropagate also to other extended layout implementors.
GtkWindow now requests the minimum width for the natural height
of its child, or the opposite; depending on ->get_height_for_width.
Currently its not done for GTK_WINDOW_POPUP windows as the menushells
aren't working right yet.
This patch adds another commented algorythm to find the collective
minimum and natural height for a said width of a horizontally oriented
box (or the opposite). The algorithm works quite well and can be optimized
a bit more - currently its commented because GtkLabel cannot effectively
do width-for-height calculations (doh).
Further, this patch returns an is_height_for_width() preference depending
on the boxes orientation (vertical boxes are width-for-height).
Added an indicator telling whether a widget prefers to be allocated
as height-for-width or width-for-height. Usually this depends on the
orientation of a container or the nature of a content widget like GtkLabel.
This indicator is only used in the seldom case where a parent is allocating
free space to the child and the child can flow in either direction, GtkWindow
and GtkScrolledWindow are users of this api.
In order for natural size information to cascade correctly up through
the ancestry GtkBox needs to report height-for-width and width-for-height,
this patch includes an implementation for both in both orientations, one
of them is commented for now as its much too cpu intensive to actually use.
Merged in fixes from the old branch in a patch prepared by Matthias Clasen,
added some fixes of my own to make sure that label wrapping follows allocation
and not requisition at show time (allocate time).
It doesn't make sense to determine an index into an array, if
you are going to sort the array afterwards...pointed out in
bug 615128 by Florian Scandella.
Instead of implementing ->get_desired_size() on GtkBin, which
cant really be done because border widths are in the domain of
the concrete subclasses; here we implement only the get_height_for_width
and get_width_for_height apis - GtkBin subclasses whom might have a
variable border width depending on allocations need to write their
own height-for-width implementations.
Fixed gtksizegroup.c:do_size_request() to never force an initial requisition
as some widgets expect it to remain unchanged across resizes (GtkImage
with pixbufs/filenames assigned is one of these cases).
gtk_box_size_allocate() was forgetting to fetch the minimum
size for children when allocating in homogeneous mode and then
accessing the uninitialized allocated values in that case, fixed.
With this commit it is possible to use ellipsizing text
in the combobox's cell renderers and have them desire to
expand to natural size when placed in a GtkBox.
Ever since size groups gtk_widget_size_request() can be used in place
of gtk_widget_get_child_requisition(), deprecating both now in favor
of gtk_extended_layout_get_desired_size().
collapse get_fast_child_requisition && get_fast_natural_size into
a single get_fast_size() function which uses the possibly hard coded
minimum request as a minimum value for the returned desired size
(this fixes cases where widgets unwarily return height-for-width
with minimum size > natural size).
Added gtk_cell_view_get_desired_size_of_row() to report full
extended layout information for a said row, this obsoletes
gtk_cell_view_get_size_of_row(). Also make GtkCellView queue
a resize on itself when cell renderers are added/removed.