>> The problem is that Fitaly needs to handle some of the events, while the
>> application handles most of them; Fitaly doesn't remain in control all the time
>> (the way the built-in keyboard does)
>
>   Well, if Fitaly needs _that_ much control perhaps you should consider
>rolling your own event loop (or do you already?) and keeping more control
>over the system as the user is inputting letters.

Fitaly is designed to "overlay" the screen and app with the keyboard; rather
than popping up a screen-obscuring dialog as the built-in keyboard does, Fitaly
is a floating keyboard displayed on top of the existing app.  It leaves the
app's field to display the text as it's entered.

It doesn't need a *tremendous* amount of control, but it does need accurate pen
events, and since it's designed to allow rapid typing (some people get 50
words/minute on it - not me, but others do...  :)  the pen events come in
quickly.  Most events are just passed through to the application; only the pen
events that occur on top of the floating keyboard are scarfed up and processed.
(and a few other things like keyboardChr...)

Rather than our own event loop we intercept EvtGetEvent.  While the keyboard is
on-screen, we process the required events; while the keyboard is inactive we
just check to see if the keyboardChr was entered so we should pop the keyboard
up.  Any events Fitaly shouldn't handle are passed back to the application.

If we just had our own event loop, we wouldn't know what to do with pen taps
outside of the keyboard, and we couldn't pass them on to the application.


>   You could also try to read the pen value from the globals, a la
>     SysEvtMgrGlobalsPtr gP = (SysEvtMgrGlobalsPtr) GSysEvtMgrGlobalsP;
>     myPen.x = gP->penX;
>     myPen.y = gP->penY;
>and see if it yields the same errors as getting values from the pen
>queue does.  Of course, the usual caveats with checking the OS version,
>etc., apply.  And Poser will scream its head off.  ;)

Same problem applies - by the time Fitaly gets the cached penDown event, the
pen's already been up and then down somewhere else, so the system globals will
reflect the wrong coordinates...

I did think of using the EvtDequeuePenStrokeInfo / EvtDequeuePenPoint calls, but
I'm not clear that'll help, and I'm almost positive that'll mess up Graffiti
recognition.   (you can still enter Graffiti chars while Fitaly is active)


Oh, Poser already complains - we go direct to video hardware...   <grin>

- Al -

-- 
--  Alan Weiner  --  [EMAIL PROTECTED]  --  http://www.ajw.com


Reply via email to