def handle(e)
case e
when Fltk::PUSH
return true
when Fltk::DRAG
if( @cur )
@cur.position(Fltk.event_x, Fltk.event_y)
end
redraw
return true
else
return false
end
end
All events created inside the MyCanvas are passed to the handle.
It accepts FLTK::PUSH and FLTK::DRAG events. When it accepts drag event,
change the position of the child widget @cur, and redraw.
We must return true, if accepting an event. If we reject an event and
return the false, the event is passed to the handle method defined in
child widget.