From: David Brady Date: 2005-07-11T13:04:37+09:00 Subject: Re: A good TK Dibya Prakash wrote: >Hi, >I am working on a financial trading software.I need to create some >complex UI's.Can anyone help me with some good UI tools?Any other >suggestion is also welcome. > > I dabbled with Ruby about a year ago, and got defeated by this very problem. I picked Ruby up again a month ago, and I started back down the Ruby GUI rathole this week. Here's my trail of breadcrumbs. Hope it helps! :-) Ruby/Tk - Tk is a mature, script-driven set of UI components that has bindings for most popular scripting languages. It runs on Windows, Mac and Linux. Tk defines its own set of UI widgets, so the controls look exactly the same on all three platforms. But let's be honest: Tk looks like crap. Next to a well-polished UI, Tk looks pretty klunky. Because it's script-driven, Tk slows down with very complex UIs. Ruby/Tk's biggest feature is probably that it comes with the standard Ruby install: people who use your application will only need Ruby, and won't have to install another GUI toolkit. Tk is easy to learn and is ideally suited to simple applications where the important thing is to give someone an app with a functional UI without requiring them to install the toolkit. - Moderately well documented. If you know the tcl, perl, or python bindings to Tk you'll have no problem with Ruby/Tk. If you DON'T know those bindings, you'll have a tougher time: the Ruby/Tk approach seems to be "learn the differences between perl/Tk and Ruby/Tk and then get the perl/Tk manual." - There's an excellent tutorial at http://members.chello.nl/~k.vangelder/ruby/learntk/ - A good reference at http://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm. Ruby/Gtk, Gtk+, Gtk2 - Gtk is a linux-native Gui toolkit that produces beautiful UIs for Linux. I believe Windows and Mac ports exist, but I am not sure. The tutorial for Gtk is pretty minimal, but it gives you the feel of the toolkit and the reference manual is very thorough. The C-style bindings of Gtk2 feel better to my brain than the Tcl-style bindings of Tk, and I have had no trouble working with Gtk. - A barebones tutorial is at http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk - A superb reference is at http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk wxRuby Ruby has bindings to the wxWindows (now wxWidgets) libraries through wxRuby. I haven't looked into wxWidgets in about a year. At the time wxRuby was a hopeless endeavor: it had the same feel as Tk, "Learn the difference between wxRuby and the C bindings to wxWidgets, and then use the wxWidgets C reference", except the C reference didn't exist: you needed to sift through the header files, and then sift through the wxRuby source to find the discrepancies. wxRuby was infuriating: it was beautiful, it was fast, it used native widgets for Linux, Windows and Mac.... but the only way to learn wxRuby was to already know wxRuby. Now, the reason I use words like "infuriating" is because of all the cross-platform GUI toolkits, wxWidgets really does look like it's got the most potential, and it's the one I would most like to be able to use. If it was ugly or slow, I wouldn't care. :-) For all that I've blasted it, I will say that, if I can ever figure it out, it's the toolkit I intend to use. I will also note that, like most of the Ruby community, they have come a LONG way in the past year. There's a wiki with pretty robust-looking documentation and some decent tutorials at: http://wxruby.rubyforge.org/wiki/wiki.pl There are other GUI toolkits available, but I haven't explored them. Something called "FOX" exists. There's a Qt toolkit that appears to have gotten to a usable alpha state in 2002 and then been abandoned. There may be others. Good luck! -dB -- David Brady ruby-talk@shinybit.com I'm having a really surreal day... OR AM I?