Article # 372, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
What is happening when ink is entered?
Q. What is happening when ink is entered? A. When the user clicks on an area of the screen that accepts ink input (for example, on a view that has its GVI_inkType field set to GVIT_PRESSES_ARE_INK), the object that is clicked on notifies the system that it should start drawing/collecting ink. Since the system will (in most cases) erase the ink after the user is done, it first saves as much of the screen as is possible (on the Casio Z-7000 and Tandy Z-PDA, the entire screen is saved) and restores it when the user is done entering ink, without requiring any redrawing by the application (this is why you do not get a MSG_META_EXPOSED after the user draws ink.) Ink delivery is one of the rare places in the system where you get a MSG_META_NOTIFY_WITH_DATA_BLOCK without being on any GCN list. There is no GWNT_INK GCN list (at least, no messages are ever sent to it), and so you need not worry about adding yourself to it. In your application, when the user has finished drawing ink in your GenView, the system erases the ink, and sends the ink (via MSG_META_NOTIFY_WITH_DATA_BLOCK) to the view, which sends it to the optr stored in its GVI_content field. Make sure to set the VI_bounds of your ink object. Its default is 0 pixels by 0 pixels, which would not allow the user to enter ink on it. Also, if you the ink object is the only child of the content, you will want to set the IF_ONLY_CHILD_OF_CONTENT flag on the ink object, which will cause the ink object to use some internal optimizations that can speed up ink entry.