Class ::tycho::Follower


Inherits: ::tycho::Interactor - Source File - Contents: protected methods
The simplest interactor: follow the mouse. This interactor implements the activate and deactivate methods so that clicking and dragging on a target picture causes corresponding actions on the target -- in other words, with the default moving behavior, the picture is moved by clicking and dragging.

It seems like this class goes to a lot of trouble to perform a simple function. However, its real power comes from inheritance, where click-and-drag behavior can be customized for more sophistictaed interaction -- see Gridder, Bounder, and Alonger for examples.


Protected constructs

Protected Methods

activate t x y args
Activate the interactor on a picture object. Motion and release events are bound to the current picture so that the picture can be dragged and so on. After setting up bindings and calling the activatecommand option, this method calls the click method -- subclasses therefore need only to override click (and drag and release) to alter the interaction behavior.
deactivate args
Deactivate the interactor from the target. This method must be called by the script bound to the release event.

Index of classes



Author: H. John Reekie
Version: @(#)Follower.itcl 1.11 18 Oct 1996
Copyright: (c) 1996 The Regents of the University of California.