simon wrote:
>>> =20
>>> Hello,  I'm trying to get the position of my mouse with=20
>>> respect to a push button on the screen.  I used event_x() and=20
>>> event_y() but I was able to get one but not the other.
>>> =20
>> http://www.seriss.com/people/erco/fltk/#DrawCoords
> 
> Thank you for the link.  I'm trying to implement it and I see that the 
> handle(e) is linked to the screen by Fl_Group, and Fl_Group is a class.  
> Since I'm working with a Fl_Button, maybe I need to make a separate class to 
> pass the handle.  I'm not sure...

        If you're trying to find mouse positions with respect to some
        point on the button, then make a group with the above handle()
        stuff, and put your button in that group.

        Then your handle() can do the necessary math to compute the
        distances between the mouse (event_x() and event_y()) and
        the button->x() and button->y() positions.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to