In article <Pine.GSO.4.33.0108151338240.1533-100000 / solo.cs.auc.dk>,
Lars Christensen  <larsch / cs.auc.dk> wrote:
>On Wed, 15 Aug 2001, Dave Thomas wrote:
>
>
>Please don't forget what Ruby is all about in this discussion! I think
>that the basic principles and idioms of Ruby should be respected in the
>GUI that is made the "standard" for Ruby.
>

<snipped...>
>
>Gtk, I think, it a little cleaner about mapping concepts to the Ruby
>Language. I can do "class MyApp < Gtk::Window". Gtk/Ruby uses
>assignment methods so that you can do "@buttonbox.border = 10". This is
>very intuitive, and its the Ruby way. It also has very few methods
>that takes more tthan 1 or 2 arguments. Most things are configured
>through methods.
>
>Gtk is ported to windows. The Ruby/Gtk/Windows combo should be possible
>with a little effort.
>
>I wish for a GUI API that:
>
>- Assumes defaults for everything except the basic requirement. Everything
>else should be setable through methods. E.g. Label.new('Press me').
>Border, color, font, and everything else should not be arguments to
>constructors. Never.
>
>- Uses Ruby concepts to the full extends. No win.set_border(40) when
>you can handle it with win.border = 40. Use of attribute declerator
>methods whenever applicable in the line of attr_*.
>
>- Allows inheriting classes to create windows or other widgets with
>special keyboard/mouse handling.
>
>For now, I think Gtk is the best canditate (having not tried Qt). In any
>case, I want pure ruby style interfaces before portability.  With matz
>have designed such a great language, it would be a shame to waste it on
>ugly APIs.  A lot of Java's success comes from it's coherent,
>comprehensible and consistent API. There is "one way" to do things, and
>they stick to it.  I'd like the same thing to happen in the Ruby world.
>

These are good points.  Of these toolkits I've only played with TK (with 
Perl) in the past, but I was trying to decide on a toolkit to use with 
Ruby.  It's nice to see this comparison and it has me leaning toward GTK 
now (whereas I was leaning toward FOX).  The interesting thing here is 
that people who code in C++ probably would prefer FOX to GTK since FOX was 
developed from the ground up in C++, while GTK is in C - so from that 
standpoint I thought that perhaps FOX was more OO.  Now it appears to be 
important how the port was made to 'connect' the toolkit to Ruby.

Is it possible that the FOX toolkit for Ruby could borrow some of these 
ideas from the GTK toolkit and how much effort might it take? (my 
understanding is that the big advantage of FOX is it's ability to handle 
OpenGL widgets).

Phil