On 06.02.2012 12:14, M3taSpl0it wrote:

>> handle() and callback() are very different beasts indeed. The handle()
>> methods are used by the underlying fltk/OS system to propagate and
>> "handle" window events (for the most part) whereas the callback()
>> functions are attached to "user events", e.g. widgets being "pressed",
>> timers firing, etc.
>
> Still didn't get, please help me visualize the things :(

Maybe my other post can help, since I wrote more about the details
and usage (but maybe not).

>> Though you'd (generally) never call either in your own code, as the>fltk
> core calls them at the appropriate times for you.
>
> Then why Handle() is exposed to user i.e FL_win.handle()?

Think of handle() being a protected method (it should probably be),
but FLTK (the kernel code) must call it internally for all widgets.
I'm not sure that this is the (only) reason, though. Anyway, the
rule is: don't call it, unless you're subclassing a widget - and
if you do, call only the parent class's handle() method from your
own handle() method, as explained in the docs.

Albrecht
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to