Class ::tycho::Alonger


Inherits: ::tycho::Follower - Source File - Contents: public variables - protected methods
A class that implements moving behaviour along the vertical or horizontal axis. The region of movement is constrained by an option or to the size of the slate; it can also be specified by the target picture.

Public constructs

Public Variables

-along x
The axis to move along. The option be either ``x'' or ``y''. This option cannot be changed in the middle of a click-drag- release sequence, or it won't work properly.
-bounds
The bounds to move the object between. Note that these bounds are for the object being moved, not for the cursor. The bounds can be two co-ordinates, denoting the movement limits in the appropriate axis, or four coordinates, denoting the rectangular region in which to move.

If null, the bounds are the width or the height of the slate.


Protected constructs

Protected Methods

click x y args
Start the interaction. To find the bounds within which to move the picture, the interactor first examines its -bounds option. If that it is null, then it tries to see if the picture responds to "query bounds"; if that doesn't work, then use the size of the slate.
drag x y
Move the cursor along the -along axis. If the new point is outside the bounds, then move to the boundary. Otherwise, move to the new point.

Index of classes



Author: H. John Reekie
Version: @(#)Alonger.itcl 1.9 21 Oct 1996
Copyright: (c) 1996 The Regents of the University of California.