previous chapter contents page top page next chapter


RestoresPreviousTool

February 29, 1996

mixes in with ChooseableTool;

Class Description

Magic Cap defines class RestoresPreviousTool as a mixin for creating tools that remember, then restore, the previous tool. Class RestoresPreviousTool is used exclusively by the Inspector's InspectObjectTool.

Programming information

Instantiate: never
Subclass: rarely
Call its methods: never

Although you'll probably never create a class that mixes in class RestoresPreviousTool, you might do so if you wanted a highly specialized tool that remembers and restores the previous tool.

Methods defined by class RestoresPreviousTool

Class RestoresPreviousTool defines the following methods:

Method Description
BeginTool Overridden to save the current tool before setting it to self.
RestorePreviousTool Sets the tool to the saved value of the previous tool.

Fields defined by class RestoresPreviousTool

Class RestoresPreviousTool defines the following fields:

Field Type Description
Defined by RestoresPreviousTool
previousTool Tool Saved value of previous tool

Method Descriptions

BeginTool

overrides BeginTool

Call: rarely
Override: sometimes

Class RestoresPreviousTool overrides BeginTool to record the current tool before setting it to self.

RestorePreviousTool

operation RestorePreviousTool()

Call: rarely
Override: rarely