MacArthur, Ian (SELEX GALILEO, UK) schrieb:
>> I would like to cause a callback if I click anywhere on the 
>> background 
>> of my window . Not just if I click on the closing-x on the 
>> upper right 
>> corner.
>>
>> How do I do that?
> 
> Drive your own subclassed widget.
> In the handle method, call the base class handle method and check the
> return value:
> 
> - if it is non-zero, some widget has consumed the event so there is
> nothing more to do, simply return that value.
> 
> - if it is zero, no one used the event, so check if it is the event that
> you are looking for. If so, just use do_callback() or some similar
> mechanism to invoke the requisite actions. Then return 1 to stop the
> event from propagating any further (since you have used it.)
> 
> Something like that ought to work.
> 
I'm really new in C++, so how do I call the handle method in my subclass 
to get the return value?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to