[GUI] Dynamic ... something
Alastair Reid
alastair@reid-consulting-uk.ltd.uk
Thu, 10 Apr 2003 10:29:41 +0100
Glynn Clements <glynn.clements@virgin.net> writes:
> different GUI APIs have radically different approaches to layout [...]
>
> Win32 takes the simplistic approach; each widget has a specified
> position and size. The Xt approach is more involved. It has an
> open-ended set of container classes (subclasses of Composite), each
> of which is responsible for laying out its children. [...]
> The most common Motif container classes are XmRowColumn [(which lays
> out its children in rows/columns; menu bars and menus use this) and
> XmForm (a more generic class, which allows each widget to specify
> its position relative to its siblings or to the parent).
It sounds like all GUI APIs provide absolute positioning and may
provide automatic layout.
So, unfortunate and limited as using absolute positioning is, I
suggest that the core design should provide that as the base-level,
portable, API. This will be easy to implement and let us move
forward.
We can then experiment with ways of implementing our own container
classes in Haskell (for those platforms that lack them) and of making
the different styles of container class behave in a consistent way.
If it turns out that the best of the automatic layout APIs in common
use can be simulated on all platforms, we can then go ahead and add
that to the portable specification.
(Also, people can play with their own layout mechanisms and algorithms
if we give them the right base to build on. e.g., I think that TeX's
layout mechanism (e.g., 2\vfill + \vfil + 10pt) would be cool to use
for laying out windows. I may be wrong but it'd be fun to play with
it.)
--
Alastair Reid alastair@reid-consulting-uk.ltd.uk
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
ps What is the best automatic layout API out there these days?
Is there some online documentation for it?