Jane wrote:
> this and Fl::belowmouse() differ. Not sure what Fl::belowmouse() points to,
> probably the window itself.
"this" will be a pointer to your class (SpinnerM).
Fl::belowmouse() will be a pointer to the widget (Fl_Spinner or
Fl_Slider?),
so you should make efforts to be sure you're testing Fl::belowmouse()
against
the proper FLTK widget, not your wrapper.
I'm not sure which approach you took to make the class, but if you used
the technique where you have pointers inside your class to both FLTK
widgets,
eg.
class SpinnerM {
Fl_Slider *slider;
Fl_Spinner *spinner;
..
..then you could test against it this way in your handle() function:
Fl_Widget *w = (slider ? (Fl_Widget*)slider : (Fl_Widget*)spinner);
if ( ev == FL_MOUSEWHEEL && w == Fl::belowmouse() ) {
..
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk