Re: Gtk containers



On Thu, 29 Jul 1999, Sergio A. Kessler wrote:

> Nils Philippsen wrote:
> > Last time I checked, interface builders couldn't cope with symbolic
> > values, e.g. a #define BORDER_SIZE 5 which could later be changed to 10.
> > Last time I checked colors and fonts were hardcoded inside the widgets
> 
> this is a flaw on the toolkit then, not of the interface builder.

I would blame it on the UI builder, then. Gtk+ has mechanisms (read
styles) to avoid this problem. It's the builder's fault if it doesn't use
them.

> where do you reorder ? to the left ? to the rigth ? to the top ?
> How Glade can read my mind and use gtk_box_pack_end instead of
> gtk_box_pack_start in some cases ?

It may retrieve this information by looking where in the box you dropped
the widget.

> ok, just let suppose for a second that the information reside in the
> children, isn't this simpler and more object-oriented-alike ?
> (working with an interface builder, that's it)

You can virtually have an unlimited number of methods to pack children in
containers, thus you can't have all information in the child, because at
the creation of the child's code it can't know about packing methods
developed afterwards. This is a mathematical problem, not a programming
problem.

> you are saying where !  you say children's positions/layout !
> so the natural thing is to put it in the children.
> (I've said the natural thing, not the easy thing)

It's the child's position IN THE PARENT. It's a property of both, or
better a relationship:

Child: I'm the first from the left in my parent.
Parnet: I have a child at the first position from the left.

Nils
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nils Philippsen                  @college: nils@fht-esslingen.de
Vogelsangstrasse 115             @home:    nils@wombat.dialup.fht-esslingen.de
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]