Re: Gtk containers

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.

> 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.

> 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

> I'm begining to understand why there are dozens of containers
> in Gtk ...

The other way would be to program constraints *vomit*.

> 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.")?

> (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.

> I think this would obsolete all the containers and make
> things more easy, cleaner and consistent, no ?


Bye, Nils
Nils Philippsen                  @college:
Vogelsangstrasse 115             @home:
D 70197 Stuttgart                phone:    +49-711-6599405
The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offence.                          -- Edsger W. Dijkstra

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