Ruby-FLTK FAQ
Last updated: May 1, 2002

[General]
1. Why another Ruby GUI toolkit?
2. What are the best features of Ruby-FLTK?
3. What platforms does it work on?
4. How stable is it?
5. How can I help?
6. What are the weaknesses of Ruby-FLTK?

[Development]
1. Can I use x, y, w and h as local variables?
2. Why don't blocks of Group/Window.new work?

-----------------------------------------------------------
[General]

1. Why another Ruby GUI toolkit?

None of the choices out there quite met our needs. They each 
have a place, and are useful to many people, but each one had 
drawbacks in our eyes. Without intending to bash any of them, 
here are some of our concerns:

Tk:
    odd API
    old-fashioned look and feel
    
FOX:
    "heavy" feel, e.g. the application class
    event handling is more like C++ than Ruby (currently)
    
Qt:
    restrictive licensing
    "more heavy" feel, e.g. the application class, list classes
    
GTK:
    not well supported on Win32
    ruby bindings not very mature
    
2. What are the best features of Ruby-FLTK?
    
The API is very clean, object-oriented, and simple. The event, 
color, and font models are very easy to understand and work 
with. FLTK is supported very well on X and Win32 (with a Beta 
version on the Mac). It also has a very small footprint, on disk 
and in RAM.
    
3. What platforms does it work on?
    
At this time, we only fully support Linux on intel processors. 
It should all work on any platform, but we have not tested it.
    
4. How stable is it?

It is still in the "alpha" stage. Basic functionality is solid, 
but if you try to use all the features you will probably get 
crashes and other strange problems. Obviously, we hope to fix 
these problems quickly.

5. How can I help?

Our most urgent need is for testers and feedback. We want 
people to experiment with the software, and let us know what 
they like and don't like. We want bug reports and feature 
requests.

Second, we could use someone to help document and package 
the software.

Third, we could use developers who could create new custom 
controls, like Tree and ComboBox. These can be created in 
Ruby, so you don't even need to know C++. 

Fourth, we could use additional C++ developers to help us 
debug and enhance the binding layer itself.

6. What are the weaknesses of Ruby-FLTK?

Immaturity. It's a new project, so we're still finding and 
fixing bugs, and continuing to add features. We don't have 
a simple Windows package yet.

The widget set is a bit small. It doesn't yet support cool 
widgets like Tree and Tooltips. The support for images is 
limited.

The orientation is toward pixel-placement of widgets, 
rather than modern layout managers. This will be changing 
in a future version of FLTK, and Ruby-FLTK itself provides 
some features that help ease the pain.

It doesn't support high color depths well. Because it uses 
a very simple color model, it really only supports 256 
colors at a time, at least for the built-in widgets. For 
most apps, this is fine.

----------------------------------------------------------
[Development]

1. Can I use x, y, w and h as local variables?

No, you should not use those in a class definition, since
those are instance methods of FLTK::Widget. "w = 10" in a
class which inherits FLTK::Widget make the width of a target
widget 10.

2. Why don't blocks of Group/Window.new work?

Those blocks are actually handled by the initialize method.
In case that you redefine the initialize method in a custom
class which inherits FLTK::Group and you call super() in the
method, you should call yield() as follows:

  class MyWindow < FLTK::Window
    def initialize(....)
      super(){|win|
        # your code
        yield(win)
      }
    end
  end
