imacarthur schrieb:
>>
>>     int handle(int e) {                // Window's handle() method -- 
>> called by FLTK on any window event
>>         int ret = Fl_Window::handle(e);        // Pass all events to 
>> Fl_Window base class so it can process them
> 
> 
> I think for Michael's use-case I might add;
> 
>     if(ret) return ret;

Yes, you're right, for my cause this is necesary. The derived class 
works fine. Thanks guys, you're great!

> 
> at this point, my thinking being that, since Fl_Window is a container 
> widget, one of it's children may laready have consumed the event by this 
> point (test in Fl_Window::handle(e)) so we do not necessarily want to 
> handle it again in that case.
> Then, if the event was *not* used, e.g. the user did not click on a 
> widget in the window, but just on the window itself, we could then go on 
> the check the click event...
> 
>>         switch (e) {
>>             case FL_PUSH:            // A mouse button push event?
>>         MyPush();            // ..invoke MyPush() method
>>         ret=1;                // ..set ret=1 to indicate we 'handled' 
>> the event (see docs **)
>>         break;
>>             case FL_RELEASE:            // A mouse button release event?
>>         MyRelease();            // ..invoke MyRelease() method
>>         ret=1;                // ..set ret=1 to indicate we 'handled' 
>> the event (see docs **)
>>         break;
>>         }
>>         return(ret);                // maintain return value (IMPORTANT)
>>     }
> 
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to