previous chapter contents page top page next chapter

TouchTool

January 21, 1993

Defined in Tool.Def 
Inherits from ChooseableTool

Class Description

The touch tool is the default tool. It's the tool that's active when no tools seem to be active. It's the tool you use when you want to reach out and touch someone. Or some object.

Remember that if the documentation and the software (especially the definition files) disagree, always trust the software.

Using the Touch Tool

You use the touch tool every time you tap on objects when no tool is selected. In fact, some tool is always the current toolwhen it seems that no tool is selected, the touch tool is the active tool.

Programming Information

Instantiate: never
Subclass: sometimes
Call its methods: rarely

You will rarely call any of the methods defined by the TouchTool class. You will probably also never subclass from the touch tool, unless you need to create a tool similar to the lesson tool. You won't instantiate it, since the system needs only one.

Methods you might call

The TouchTool class has the following methods you might call:

Method Description
ShouldFreezeScreen Returns false, so that animations can continue to move
IsWritingOrTouchTool Returns true, since this is a touch tool

Methods you might override

The TouchTool class has one methods you might Override:

Method When to override
TouchTarget If your touch tool needs to do more than simply touch the target

Description of fields

The TouchTool class doesn't define any fields of its own, though it inherits one from ChooseableTool:

Field Type Description
Inherited from ChooseableTool:
image Image The image depicting the tool

Method Descriptions

Since TouchTool defines only three methods, all are documented here.

TouchTarget

operation TouchTarget(target: Viewable; touchInput: TouchInput);
Call: rarely
Override: sometimes

By default, this method calls Touch on the target, thus simply passing along the touch from the user to the object touched.

IsWritingOrTouchTool

operation IsWritingOrTouchTool(): Boolean;
Call: rarely
Override: never

By default this method returns true. Since the TouchTool class and any potential subclasses define only touch tools, you will probably never need to override this method.

ShouldFreezeScreen

operation ShouldFreezeScreen(): Boolean;
Call: rarely
Override: never

By default this method returns false, since animations should continue to animate themselves while touch tools are active.