On 09 Mar 2001 09:50:04 +0900,  wrote:
> Hi all,
> 
> I bought the Gang of Four's "Design Patterns" book the other day,
> and, as probably has happened with many people, I was inspired.
> 
> Near the beginning, it talks about designing for easy portability
> between windowing systems, and thus introduces the Composite and
> Bridge patterns.  Anyhow, the basic idea is that you write a
> generic Window class, for instance, which acts as a wrapper to
> whatever GUI Toolkit is desired at the moment.
> 
> This way, the GUI programmer has a standard way of programming,
> and doesn't have to worry about the differences between GTK, TK,
> FOX, etc.
> 
> Has anybody thought about this?  It doesn't seem like it would be
> that hard to do.
> 


This is great except that you will have to go by the smallest subset of
what a gui-system can do.

If you for example wants to add three different toolkits to this kind of
system and one of them can't do buttons with images (I know.. stupid
example :) ), you have to not use buttons with images att all.

Anyone that has used awt for java knows that this is a problem.  One
example is that under unix/motif buttons get the same color as the
background while under windows they are grey.

There is a set of libraries named wxwindows that seams to have done a
really good job (alot better than awt :) ).  They have worked long and
hard in overcomming the problems in different toolkits. wxpython has
made lot of success and there is even talk about letting it be the
default window-system for python in the future.

I think ruby needs a good cross-platform window-system but I don't think
the solution is to create one ourself.  Use wxwindows which is "free,
well-established, well-documented, and very broad in its coverage of GUI
functionality" (quote from there website).  Designing such a beast from
the ground up will be alot of work.

See www.wxwindows.org and www.wxpython.org for more information.

Let tcl/tk die :)

/Erik

-- 
Erik BéČfors               | http://erik.bagfors.nu/    
erik / bagfors.nu            | Erik.Bagfors / engohol.se
Supporter of free software | GSM +46 733 279 273
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32