Intended behaviour of gtk_box_pack_{start,end}?




Looking at the documentation, I get the impression that
gtk_box_pack_start is supposed to add the widget at the topmost or
leftmost part of the box, and gtk_box_pack_end is supposed to add the
widget at the bottommost or rightmost part of the box.

What appears to happen right now is that gtk_box_pack_start puts the
new widget at the end of the list of widgets but puts a flag on it
saying that it belongs in the list of starting widgets.
gtk_box_pack_end does the same thing, but flags the widgets to be put
at the end.   Then, when the time comes to allocate the widgets, all
the widgets that were added using gtk_box_pack_start are displayed,
sorted in order of insertion, and then all the widgets that were added
using gtk_box_pack_end are displayed, sorted in order of insertion.
So there's no primitive that will reliably insert a new widget at the
beginning of the list.

There's also no primitive to insert a widget in the middle of the list
- widgets can be inserted and _then_ sorted (or so I assume - I
haven't tried it) but can't be given a specific initial position.

Is there anybody who can tell me what the actual intention is here?
What the widget is doing now doesn't make any sense to me - are people
actually using the existing behaviour, or are they just creating a box
once, counting on the first-inserted, first-displayed ordering, and
leaving it at that?

			       _MelloN_



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