[GUI] Are windows just ordinary widgets?

Axel Simon A.Simon@ukc.ac.uk
Thu, 1 May 2003 10:04:31 +0100


On Thu, May 01, 2003 at 03:11:28AM +0100, Glynn Clements wrote:
> 
> Axel Simon wrote:
> 
> > IMHO the classes should just reflect the object hierarchy. If we have e.g.
> > 
> > class Button b where...
> > class ToggleButton b where...
> > instance Button ToggleButton where...
> 
> Different toolkits have different hierarchies; e.g.:
[..]

Yes, I expected that. But perhaps we can create a (rather flat) object 
hierarchy which maps onto all backends.

> Anyhow, to get back to the original issue, the key problem isn't the
> relative positions of push-buttons etc, but the fact that top-level
> windows are effectively subclasses of "widget" on some toolkits but
> not on others. If you're assuming that "widget" is the topmost level
> of the object hierarchy, this is likely to be a problem.

I would be happy with just a hierarchy for widgets. To answer Wolfgang's 
question:

> Could somebody who has an opinion on these issues knock up a concrete
> example; I'm not thinking of code, just some class declarations and
> signatures...

This was my proposal:
http://haskell.org/pipermail/gui/2003-April/000459.html

As far as I can tell this is equivalent to the

class IsWidget Button

approach.

Axel.