[fxruby-users] FXScrollArea messages

Lyle Johnson lyle at knology.net
Wed May 18 22:24:39 EDT 2005


On May 18, 2005, at 3:14 PM, Jannis Pohlmann wrote:

> Hey Lyle, didn't you see that message?

Yes. Sorry I didn't drop everything and respond immediately.

> I don't want to be impatient, but this problem is really important for 
> a project
> of mine. I browsed the FOX source and FXRuby's SWIG interfaces and 
> noticed
> that FXScrollArea doesn't implement the SEL_MOTION handler as FXCanvas
> does.

Correct. If you look at the message map for the FXScrollArea class 
(which appears near the top of FXScrollArea.cpp in the FOX source code) 
you'll see that the FXScrollArea widget isn't "listening" for 
SEL_MOTION events from the FOX event loop.

> Obviously, FXTable (derived from FXScrollArea) is able to react on 
> SEL_MOTION.

Yes, also correct. If you look at the message map for FXTable (at the 
top of FXTable.cpp), that widget *is* listening for SEL_MOTION events 
(and handling them in the FXTable::onMotion member function).

> FXScrollArea is a subclass of FXComposite which itself is a subclass of
> FXWindow so shouldn't classes derived from FXScrollArea be able to 
> handle
> SEL_MOTION?

FXScrollArea (and any other class derived from FXWindow) is certainly 
able to receive those messages, but I guess you could say it's choosing 
not to. That is, there's no entry for SEL_MOTION in FXScrollArea's 
message map and so it hasn't requested that those messages be sent to 
it. Jeroen presumably did this to avoid sending any possibly unneeded 
messages to that widget, and left it up to subclasses (like FXTable) to 
register their interest in receiving those events from the event loop.



More information about the fxruby-users mailing list