• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using Inkwell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Inkwell


  • Subject: Re: Using Inkwell
  • From: Jim Witte <email@hidden>
  • Date: Wed, 15 Jan 2003 22:56:29 -0500

But what if I wanted to bring a non-tablet device (but still pen based) to MacOSX. How can I get the system to enable InkWell when that device is installed.
What if I wanted to add my own custom gestures to the system for use in my own application? How would I do that?
There must be an API (and documentation) for doing these things.

I'd say that would be a matter of writing an appropriate driver for the device that looks like a tablet to the OS. But my wish for an API is the idea that the power of Inkwell is more likely to be used by developers to it's full extent if there's a full API - in ways that Apple may not even realize yet.

An example: I have an application that let's people enter their names (first, last, middle initial), their phone number, date of birth, and then scribble a signature and maybe draw a little "login logo" - a flower pot, a sketched cat, whatever.. A checkbox would let you change the middle name field from an intial to a full name. Here's an outline of how I'd do it in NewtonScript:

firstLineView:{
_proto: protoInputLine,
'viewFlags: vClickable + vStrokesAllowed + vGuesturesAllowed + vCharsAllowed + vNameField}

middleNameView and lastNameView follow definitions for firstLineView

middleNameCheck:{
_proto: protoCheckBox,
viewChangedScript: func(s) {
// change the strokeDone script for middleNameView and it's viewFlags to allow/disallow words and names
}

phoneNumberView:{
'viewFlags: vClickable+vPhoneField}

loginLogoView:{
_proto: clView
viewFlags: vClickable+vStrokesAllowed+vShapesAllowed}

The middleNameView would have a StrokeDone script that would interpret one character, and if it's a character (not a word), then put it in there and mark the view as non-clickable via viewFlags. Or a custom dictionary attached to the viewFlags might be more efficient. the loginLogoView would have a StrokeDone script that would take the stoke and stick it in a piece of digital ink instead of trying to interpret it (I haven't poked around in ViewFrame or the Apple demos enough to know exactly how to do that)

Can I eve *get* the basic stroke coorinate information out of InkWell (as with a StrokeDone script and repeated calls to GetPoint in NS)? What If I want to implement something based on Inkwell that has little to do with character recognition mainly, but could benefit from a lot of the algorithms that go into InkWell, like a drafting program, that could use InkWell's shape-recognition ability (I'm assuming that's still in the code..), or look at individual strokes to identify whether they are close to already established "waypoints" on a blueprint? Without an API, I might well be forced to reinvent the wheel.

Jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Using Inkwell (From: Daryl Thachuk <email@hidden>)

  • Prev by Date: iPhoto Data Files
  • Next by Date: sending release to nil
  • Previous by thread: Re: Using Inkwell
  • Next by thread: Deferred window error?
  • Index(es):
    • Date
    • Thread