[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: EVENT_FUNCS
- From: davidf7203(at)my-deja.com
- Date: Tue, 29 Jun 1999 02:27:29 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Deja.com - Share what you know. Learn what you don't.
- References: <firstname.lastname@example.org>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15430
Phil Aldis writes:
> Can anyone possibly describe exactly how event _funcs work.
Event handler functions work exactly like event handler procedures,
with this exception: they return a value. If that return value
is anything else besides a structure that has ID, TOP, and
HANDLER fields defined as long integers, the return value is ignored
and the event handler function acts *exactly* like an event handler
procedure. But if that return value is a structure with those
fields, the return value is treated as an event structure and it
is passed up the widget hierarchy just as all events are passed.
So you can take an event into a function event handler and either
pass it along untouched by human hands, or you can manipulate the
hell out of it and pass it along as anything your devious heart
desires. For example, I have a colored button compound widget that
is really a draw widget tricked up to *look* like a button. When
the user clicks on the button I take the draw widget event into
my event handler and repackage it to make it *look* like a
button event (heh, heh). The user doesn't know the difference.
They think (ho boy!) that they are using a colored button widget
because they get *button* events from it. :-)
P.S. Did I ever mention that I *love* IDL. :-)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.