Hello, I'm trying to get the position of my mouse with respect to a push
button on the screen. I used event_x() and event_y() but I was able to get one
but not the other.
I also tried using the get_mouse(x,y) function. This works fine except it
returns the position of the mouse relative to the screen as a whole, not the
gui itself.
Someone mentioned I was missign the Fl_ENTER and Fl_LEAVE, but I'm not quite
sure how to use these last two. If anyone can point me to an example I can
follow, it would be great. Here a peice of code in case someone wants to look
at it.
*********************************************************************
void VisionInMain_Callback(Fl_Widget*,void*) {
//// SendCommand('e');
//x = Fl::event_x();
//y = Fl::event_y();
Fl::get_mouse(x,y);
xroot = 1016 - x;
xroot;
ofstream myfile;
myfile.open ("coordinates.txt");
myfile << "X: " << x << "Y: " << y;
myfile.close();
}
**********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk