previous chapter contents page top page next chapter


Snapshot

February 29, 1996

inherits from Box;
inherits from Swallower;
inherits from HasDestination;

Class Description

Magic Cap defines snapshots as reduced images that represent scenes. Users can create snapshots with the snap command in the lamp. Touching a snapshot goes to the scene it represents, and dropping objects on the snapshot asks the scene to accept the object.

Programming information

Instantiate: rarely
Subclass: rarely
Call its methods: never

You might inherit from this class if you wanted to create your own custom kind of snapshot.

Methods defined by class Snapshot

Class Snapshot defines the following methods:

Method Description
AboutToShow Overridden to redraw contents if necessary.
Action Overridden to zoom to destination.
AutoMove Overridden to always return true.
CanContain Overridden to always return false.
CanDrawIn Overridden to always return false.
Draw Overridden to draw image of destination.
Swallow Overridden to swallow unless option key is down or no destination.

Fields defined by class Snapshot

Class Snapshot defines no fields.

Method Descriptions

AboutToShow

overrides AboutToShow

Call: rarely
Override: sometimes

Class Snapshot overrides AboutToShow to set itself to be redrawn if its destination scene no longer exists.

Action

overrides Action

Call: rarely
Override: sometimes

Class Snapshot overrides Action to go the snapshot's destination by calling ZoomToDestination when the user touches.

AutoMove

overrides AutoMove

Call: rarely
Override: sometimes

Class Snapshot overrides AutoMove to always return true, allowing the user to move the snapshot without the move tool.

CanContain

overrides CanContain

Call: rarely
Override: sometimes

Class Snapshot overrides CanContain to always return false, preventing the snapshot from accepting subviews.

CanDrawIn

overrides CanDrawIn

Call: rarely
Override: sometimes

Class Snapshot overrides CanDrawIn to always return false, preventing the user from drawing in the snapshot with drawing tools.

Draw

overrides Draw

Call: rarely
Override: sometimes

Class Snapshot overrides Draw to draw a reduced image of the snapshot's destination scene as its content.

Swallow

overrides Swallow

Call: rarely
Override: sometimes

Class Snapshot overrides Swallow to return false if the option key is down or the snapshot has no destination scene. Otherwise, Swallow calls its inherited implementation.