[GUI] Dynamic sizing.

Axel Simon A.Simon@ukc.ac.uk
Sun, 27 Apr 2003 15:50:10 +0100


On Sat, Apr 26, 2003 at 11:23:32PM +0200, Wolfgang Thaller wrote:
> Glynn Clements wrote:
> 
> >Wolfgang Thaller wrote:
> >
> >>Question to all: Who is not familiar either with Java's GridBagLayout
> >>or with Tcl's "grid" geometry manager?  (BTW: Is XmRowColumn the same
> >>thing or something different?)
> >
> >Well, XmRowColumn is a widget class, whereas the other two are
> >"standalone" geometry managers.
> 
> Yes. I actually think we should be using specialized container widgets, 
> not "standalone" geometry managers, because the former can be 
> typechecked more easily (see my last e-mail for an example of what I'm 
> thinking).

Well, at least to get something running I would like to have container 
widgets first and then think about more alternatives. Maybe we should be 
content with one portable way of creating window contents on the fly (i.e. 
dynamically). I think Wolfgang's list is quite ambitious:

> So we could have several different types of containers:
>
> HBoxes, VBoxes for simple dynamic layout
> GridBoxes for complex dynamic layout
> FixedPlacementBox for crazy people, for strange situations and for
> implementing dynamic layout schemes on top of it.

What do you mean when you say HBoxes and VBoxes? In Gtk even HBoxes and
VBoxes are not as simple as putting things next to each other. You still
have to specify which and how widgets grow and shrink when the surrounding
container changes size. Actually the only way a grid layout is more
powerful seems to be the ability to put things into a matrix (e.g. a
tic-tac-toe playfield with 9 buttons with their borders all aligned).

I don't really know about grid layouts, Gtk has one, but I think every
cell is of the same size, so it's not nearly as universial (and
complicated) as Motiv's. As such, Gtk's grid is more like Window's dialog
units, albeit not fixed in its cell size. (I looked up dialog units: they
are horizontally 1/4 of the average character's width and vertically 1/8
of the font size.)

It is possible to change the font and size of a specific label in a
specific dialog box in Gtk by means of a resource file. If this feature is
combined with fixed layout (or one dynamic layout created in Haskell) it
will destroy Gtk's native look. Maybe I am missing something, but I don't 
see a way to start with a fixed layout specification and then but dynamic 
layout on top of it. 
 
Axel.