Is a ctlEnterEvent issued for a tap in a gadget,
or only for a tap in a button? If it is, all this
talk about bounds testing is overkill.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi./sec ... not just a good idea, it's the LAW!
> -----Original Message-----
> From: David Fedor [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 18, 1999 10:23 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Gadgets and events - followup question
>
>
> >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
>
>
>