Re: Gtk containers

Nils Philippsen <> el día Fri, 16 Jul 
1999 01:31:34 +0200 (CEST), escribió:

>Caution. The statements herein were made in a condition of extreme
>tiredness. Handle with care.


>On Thu, 15 Jul 1999, Sergio A. Kessler wrote:
>> For example, take a GtkFixed, now put a button inside, now you
>> expect that setting the x & y (gtk_widget_set_uposition) 
>> properties of the button, this widget is relocated inside 
>> the container, no ? No.
>> Why on earth I must use gtk_fixed_move() to change the position
>> of a button ?
>Because the developers did it that way.

that's out of discussion

>> The position of a children is a children's property, not of anyone else.
>> Why on earth a container has the properties of their childrens ?
>Because gtk pretty much seems to have a top down concept when it comes to
>layout positions. With dimensions it's the exact opposite.

don't you see a "little" inconsistency here ... ?

>> If I want to change a button's property I must talk with the
>> button, not with the container..
>It's in the eye of the beholder if this is a property of the parent or the

are you saying me that the position (x, y) of the button doesn't
belong to the button ?
if this is the case, I think this broke all my years behind

>> I'm begining to understand why there are dozens of containers
>> in Gtk ...
>The other way would be to program constraints *vomit*.

I don't understand you on this

>> What about having a minimalist container, then for example
>> add a button inside and do gtk_widget_set_uposition() or
>> gtk_widget_set_alignment( my_btn, my_gtk_alignment) and
>> then the button positiones or align itself inside the parent ??
>For example: How would you make a horizontal/vertical box or a table with
>all cells of an equal size (since size and position would be properties of
>the widgets)? Should they talk to each other? What if they disagree ("I
>want to be the same size as you -- No. I want to be half in width and
>double in height as you.")?

this can be worked out with positions, alignment and anchors properties
on the button and talking with the parent.

>> (btw, this is how the libraries I work behave, from Borland wich
>> have a long experience on GUI libraries)
>As you cann easily see at the price tag and the source code you may read,
>this is NOT Borland.

what's bad on taking good ideas from outside ?
(btw, I can read /all/ the source code from the Visual Component Library)


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