Re: gtk_container_real_check_resize
- From: "Nickolay V. Shmyrev" <nshmyrev yandex ru>
- To: "ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN" <apaprocki bloomberg net>
- Cc: gtk-devel-list gnome org
- Subject: Re: gtk_container_real_check_resize
- Date: Sun, 20 Nov 2005 16:26:57 +0300
В Птн, 18/11/2005 в 11:49 -0500, ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN
пишет:
> A bit of code in this function is confusing me:
>
> if (requisition.width > widget->allocation.width ||
> requisition.height > widget->allocation.height)
> {
> if (GTK_IS_RESIZE_CONTAINER (container))
> gtk_widget_size_allocate (GTK_WIDGET (container),
> >K_WIDGET (container)->allocation);
> else
> gtk_widget_queue_resize (widget);
> }
>
> I'm trying to understand the logic behind the GTK_IS_RESIZE_CONTAINER case. If
> it is known that the requisition is greater than the allocation, why is the
> widget allocated with insufficient space? Are container implementations supposed
> to do something special to handle this case?
>
> Andrew Paprocki
> Bloomberg LP
>
Hi Andrew
Since this code is badly documented, you might want to look at annotated
CVS history on cvs.gnome.org
Here is the change you are interested in:
http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtkcontainer.c?r1=1.31&r2=1.32
And comment to it:
> * gtk/gtkcontainer.c:
> (gtk_container_real_check_resize): only requeue ourselves if we are not
> a resize container.
> (gtk_container_clear_resize_widgets): care for automatic deletion of our
> resize_widgets list on size_allocate through a handler connection.
So it's an optimization. Not sure if it have sense still, it look _very_
old. But I suspect at least check_resize signal should be documented.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]