Class ::tycho::Gridder


Inherits: ::tycho::Follower - Source File - Contents: public methods - public variable - protected variables
A class that implements moving behaviour with snapping to a grid. Note that this class snaps the cursor position, which is often not what is really wanted: what is really wanted is to quantize the amount of movement, which is done by the Stepper class.

Public constructs

Public Methods

click x y args
Forward the interaction to the proxy, and remember the starting position. The "slop" variables are relative to the nearest grid point.
drag x y
If the mouse has moved over a grid point (in either axis), then forward the drag command to the proxy.

Public Variable

-gridsize 12
The size of the grid.

Protected constructs

Protected Variables

slopX
Difference between the current position and the output position.
slopY
actualX
The current position to which the target/proxy has been moved.
actualY

Index of classes



Author: H. John Reekie
Version: @(#)Gridder.itcl 1.9 12/16/96
Copyright: (c) 1996 The Regents of the University of California.