Over the past month or so several people have expressed an interest in FOX
and FXRuby support for the Scintilla (http://www.scintilla.org) source code
editing component. With the recent progress on the FreeRIDE project
(http://www.rubyide.org/cgi-bin/wiki.pl?HomePage) this has become a more
pressing issue, since FOX's FXText widget doesn't support styled text or
some of the other features desirable in a source code editing component.

Gilles Filippini has been working on a FOX "port" of Scintilla and SciTE and
has produced several beta releases of his code; the latest beta is currently
available for download at:

    http://pini.free.fr/scite141fox4.tgz

Yesterday, after a long holiday break, I started looking at Gilles' code,
and how to incorporate a binding for the FXScintilla code into FXRuby. It
looks like Gilles has taken the sensible approach of making his FXScintilla
widget a very lightweight wrapper around the Scintilla component. Outside of
the C++ class constructor and destructor, the only two significant member
functions are:

    void setScintillaID(int id);

and

    sptr_t sendMessage(unsigned int iMsg, uptr_t wParam, sptr_t lParam);

The second one is the one I want to focus on for now. The gist of it is that
to do anything with the Scintilla component you're going to send it a
message, where each message has a unique integer identifier (the first
argument to sendMessage) as well as some associated message data (the wParam
and lParam arguments). This is of course very similar the approach used by
MFC, FOX and several other GUI toolkits, so no surprises there. But to make
the FXScintilla widget useful under Ruby, that means someone needs to
furthermore come up with a Ruby module that exposes all of the Scintilla
message identifiers, constants and whatever else comes along for the ride,
so that you could then do things like:

    scintillaWidget = FXScintilla.new(p, nil, 0,
LAYOUT_FILL_X|LAYOUT_FILL_Y)
    scintillaWidget.sendMessage(SCI_ZOOMIN, 0, 0)

So before I start looking at that -- and I'm starting at zero here, with
basically no experience with programming against Scintilla's API -- is
anyone else already working on something similar? Or does anyone want to
volunteer?

Lyle