> In my program there is a window widget derived form Fl_Window 
> and its child, box widget, derived from Fl_Box. I would like 
> both of them to have their own handle() functions. However, 
> if I don't declare handle() for window, box gets events (so 
> everything's fine), but if I declare even empty (and always 
> returning 0) handle() for window, box doesn't get _any_ event.
> 
> So, what's the right way to have actually multiple handles()? 
> I would like the box widget to react on FL_ENTER and FL_MOVE, 
> and I would prefer not to send these events "manually" from 
> within window::handle() after checking whether mouse is above 
> the box widget.


This sounds, to me, a lot like what happens if the handle() method of
your Fl_Window subclass does not call the Fl_Window::handle() method of
its base class.

So, do your handle() methods explicitly call the ::handle() methods of
their base classes? 

They really must do so, unless you are certain that there is no base
class event processing that you need (and in this case, obviously, there
is - the window must propagate events to its children.)

-- 
Ian


SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to