#!/opt0/tcl/bin/wish
#
# turndial_test - a test program for the Tk turndial widget.
#
load /opt0/tcl/lib/libturndial.so
#
# (c) 1996, Pierre-Louis Bossart (bossart@redhook.llnl.gov)
# Based on the tkTurndial-1.8 copyrighted as follows
# (c) 1995, Marco Beijersbergen (beijersb@rulhm1.leidenuniv.nl)
#
# See the file "license.terms" for information on usage and redistribution,
# and for a DISCLAIMER OF ALL WARRANTIES.

source turndial.tcl

turndial .d
.d configure -resolution 0.00001 -from -0.1 -to 0.1 -showvalue 1 \
  -minortickinterval 0.01 -tickinterval 0.1 \
  -label "Volume" -beginangle -20 -endangle 260 \
  -knobcolor red3 -active red2 -variable speed
pack .d

turndial .d1
.d1 configure -resolution 0.1 -from 0 -to 10 \
  -knobcolor gray90 -markcolor black -showvalue 0 -tickinterval 0 \
  -minortickinterval 0 -active gray95 -variable volume
pack .d1

turndial .d2
.d2 configure -resolution 10 -from 20000 -to 10000 \
  -tickinterval 5000 -minortickinterval 1000
pack .d2

turndial .d3
.d3 configure -resolution 10 -from -10000 -to -20000 \
  -tickinterval 5000 -minortickinterval 1000 -showvalue 1 -variable x
pack .d3

turndial .d4
.d4 configure -radius 20 -resolution 10 -from -20000 -to -10000 \
  -tickinterval -5000 -minortickinterval -1000 -variable x
pack .d4

turndial .d5
pack .d5

turndial .d6
.d6 configure -showtags 0
pack .d6

turndial .d7
.d7 configure -font *-helvetica-medium-r-*-100-* -from 0 -to 10 \
   -resolution 0.05 -showvalue 1 -tickinterval 2 \
   -minortickinterval 0.5 -knobcolor red3 -active red2 -radius 16
pack .d7

turndial .d8
.d8 configure -font *-helvetica-medium-r-*-100-* -from 0 -to 10 \
   -resolution 0.05 -tickinterval 1 \
   -minortickinterval 0.25 -knobcolor red3 -active red3 -radius 40 \
   -beginangle -140 -endangle 140
pack .d8

proc s {} {
global speed t volume
set t [expr $t+$speed]
set volume [expr 3+4*sin($t)]
after 250 s
}

set t 0
set speed 0
s

