Albrecht Schlosser wrote:

> Alvin wrote:
>> Hello all,
>> 
>> I am trying to display the coordinates of the mouse during a FL_MOVE
>> event. But the problem is, my widget never sees the FL_MOVE event!?
>> 
>> I have a widget that extends Fl_Scroll. Basically this widget allows the
>> view to be scrolled my dragging the contents around with the mouse.
>> 
>> What I would like to do is for one of the widgets inside my Fl_Scroll to
>> act on the FL_MOVE event (show the coords of the mouse). However, the
>> widget never receives a FL_MOVE event. The widget does get, FL_PUSH,
>> FL_ENTER, FL_LEAVE...just not FL_MOVE.
>> 
>> I tried catching a FL_MOVE event in my FL_Scroll before doing anything
>> with the event (i.e. passing it up to Fl_Scroll, etc.) but it seams it
>> doesn't get the FL_MOVE event either.
>> 
>> I tried returning 1 for FL_ENTER but that doesn't seem change anything.
>> 
>> Anyone have any ideas? Has a similar issue happened to anyone else? I
>> suspect the solution is trivial, but I just can't see it for some reason.
> 
> The following is a shortened handle() method of a working program.
> 
> I know for sure that the widget gets FL_DRAG events, but I'm not sure
> that it would also get FL_MOVE events.
> 
> Compare this to your handle() method. Maybe it has something to do with
> input FOCUS. I'm not sure, why I there is a take_focus() call on FL_PUSH,
> maybe that's the point.
> 
> I'd try first to test the behavior, if your widget has the focus.
> Sorry, I can't give you more info, because I don't know myself. Maybe
> you should look into the FLTK sources.

Thanks. I tested the widget and it gets FL_PUSH and if I return 1 for it,
then the widget gets the FL_DRAG. What I'm trying to do is get the FL_MOVE
which, IIRC, occurs when the mouse simply enters the bounds of the widget.
I tried returning 1 for the FL_ENTER event, but that didn't make FL_MOVE
appear.

-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to