gtk_container_real_check_resize



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),
                                  &GTK_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






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]