Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 2 - Newton Works Draw Application / Draw Application Reference
Proto / protoDrawTool


CanvasClickScript

protoDrawTool:CanvasClickScript(unit)

Called when user taps in the canvas and your tool is selected.

unit
Stroke unit passed to this method by the recognition system. For information on stroke units, see Chapter 9, "Recognition," in Newton Programmer's Guide.

return value
Your must return one of the following values:

true Tool has handled click completely.

nil Tool has failed, click will turn into tap or highlight.

'continue Tool wants default shape creation behavior. That is, tapping or dragging out a shape. All of the tool methods (such as *MakeObject, *AdjustBounds, etc.) are called normally.

graphicalObject Tool has created a graphical object to be added to the canvas. This object should be of the same type as returned by the tool's *MakeObject method.

DISCUSSION

This function is intended to provide additional control over the creation of shapes.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help