# the next line restarts using wish \
exec wish "$0" "$@"
# square --
# This script generates a demo application containing only
# a "square" widget. It's only usable if Tk has been compiled
# with tkSquare.c and with the -DSQUARE_DEMO compiler switch.
# This demo arranges the following bindings for the widget:
#
#
# SCCS: @(#) square 1.6 96/02/16 10:49:21
square .s
focus .s
# The procedure below centers the square on a given position.
set a [.s size]
}
# The procedures below provide a simple form of animation where
# the box changes size in a pulsing pattern: larger, smaller, larger,
# and so on.
set inc 0
if {$inc == 0} {
set inc 3
} else {
set inc 0
}
}
set s [.s size]
if {$inc == 0} return
if {$s >= 40} {set inc -3}
if {$s <= 10} {set inc 3}
}