>You can see where this becomes unwieldy if, say, I've written a "super
>input field" gadget, and I've got 16 of them on my form.

... which is precisely the reason for the extended gadgets in Palm OS 3.5.


>So my question is, how is it that pen events and such are automatically
>routed to the "built-in" UI elements?

It is done when you pass the event to FrmHandleEvent (or FrmDispatchEvent,
whatever).  You presumably want to write code in your app's event handler
to watch for penDown events, check their location against the location of
your gadgets, and then either handle them or pass them along to be handled
by FrmHandleEvent.


 Is there a way for my own "custom
>gadgets" to participate in this mechanism, such that my parent form handler
>logic does not have to manually route these events?

In 3.5, yes.  Before that, you just call FrmGetObjectBounds to get your
gadget's rectangle and then call RctPtInRectangle() - assuming that your
gadget is rectangular, of course.  There's nothing saying that a gadget's
hit-testing region has to be rectangular, since it is totally up to you.

-David Fedor
Palm Developer Support


Reply via email to