Re: Are windows just ordinary widgets?

Axel Simon <[email protected]>
Newsgroups gmane.comp.lang.haskell.gui
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.