summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjoye <joye>2014-02-19 22:05:14 (GMT)
committerjoye <joye>2014-02-19 22:05:14 (GMT)
commit3235bb172a71442d0d0704ef4ce6f269a050c79f (patch)
tree6bbfb6437a52b6bfbc127e8f4c518436d8a28e12 /tests
parent515702b8eeee7c2b8d7342e893ca8bcfb59537fc (diff)
downloadblt-3235bb172a71442d0d0704ef4ce6f269a050c79f.zip
blt-3235bb172a71442d0d0704ef4ce6f269a050c79f.tar.gz
blt-3235bb172a71442d0d0704ef4ce6f269a050c79f.tar.bz2
*** empty log message ***
Diffstat (limited to 'tests')
-rw-r--r--tests/bargraph.tcl2
-rw-r--r--tests/base.tcl32
-rw-r--r--tests/legend.tcl34
-rw-r--r--tests/linegraph.tcl22
4 files changed, 64 insertions, 26 deletions
diff --git a/tests/bargraph.tcl b/tests/bargraph.tcl
index 993646c..ed2c61b 100644
--- a/tests/bargraph.tcl
+++ b/tests/bargraph.tcl
@@ -51,5 +51,5 @@ bltTest $graph -plotwidth 300
bltTest $graph -plotheight 300
echo "done"
-#bltPlotDestroy $w
+bltPlotDestroy $w
diff --git a/tests/base.tcl b/tests/base.tcl
index e4de658..bfd12db 100644
--- a/tests/base.tcl
+++ b/tests/base.tcl
@@ -41,11 +41,24 @@ proc bltTest2 {graph which option value} {
after $sleep
}
-proc bltCmd {graph cmd value} {
+proc bltTest3 {graph which item option value} {
global sleep
- echo " $graph $cmd $value"
- $graph $cmd $value
+ echo " $item $option $value"
+ set org [$graph $which cget $item $option]
+ $graph $which configure $item $option $value
+ update
+ after $sleep
+ $graph $which configure $item $option $org
+ update
+ after $sleep
+}
+
+proc bltCmd {graph args} {
+ global sleep
+
+ echo " $graph $args"
+ eval $graph $args
update
after $sleep
}
@@ -93,13 +106,16 @@ proc bltLineGraph {w} {
pack $graph -expand yes -fill both
$graph element create data1 \
- -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \
- -ydata { 13 25 36 46 55 64 70 75 80 90} \
+ -xdata {0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0} \
+ -ydata {13 25 36 46 55 64 70 75 80 90} \
-color blue
$graph element create data2 \
- -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \
- -ydata { 26 50 72 92 110 128 140 150 160 180} \
- -color red
+ -xdata {0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0} \
+ -ydata {26 50 72 92 110 128 140 150 160 180} \
+ -yerror {10 10 10 10 10 10 10 10 10 10 10} \
+ -color red \
+ -dashes {10 20 10} \
+ -showvalues y
$graph legend configure -title "Legend"
update
diff --git a/tests/legend.tcl b/tests/legend.tcl
index b3cffdf..85edeca 100644
--- a/tests/legend.tcl
+++ b/tests/legend.tcl
@@ -1,6 +1,6 @@
source base.tcl
-set w .lgd
+set w .line
set graph [bltLineGraph $w]
#bltTest2 $graph legend -activebackground
@@ -45,21 +45,23 @@ bltTest2 $graph legend -title "Hello World"
##bltTest2 $graph legend -titlecolor red
bltTest2 $graph legend -titlefont "times 24 bold italic"
-#$graph active
-#$graph bind
-#$graph curselection
-#$graph deactive
-#$graph focus
-#$graph get
-#$graph selection anchor
-#$graph selection clear
-#$graph selection clearall
-#$graph selection includes
-#$graph selection mark
-#$graph selection present
-#$graph selection set
-#$graph selection toggle
+#bltCmd $graph legend active
+#bltCmd $graph legend bind
+#bltCmd $graph legend curselection
+#bltCmd $graph legend deactive
+bltCmd $graph legend focus data1
+bltCmd $graph legend get data1
+bltCmd $graph legend selection anchor data1
+bltCmd $graph legend selection mark data1
+bltCmd $graph legend selection includes data2
+bltCmd $graph legend selection present
+bltCmd $graph legend selection set data1 data2
+bltCmd $graph legend selection clear data1 data2
+bltCmd $graph legend selection set data1 data2
+bltCmd $graph legend selection toggle data1 data2
+bltCmd $graph legend selection set data1 data2
+bltCmd $graph legend selection clearall
echo "done"
-#bltPlotDestroy $w
+bltPlotDestroy $w
diff --git a/tests/linegraph.tcl b/tests/linegraph.tcl
index b33afe4..41e288c 100644
--- a/tests/linegraph.tcl
+++ b/tests/linegraph.tcl
@@ -49,6 +49,26 @@ bltTest $graph -width 300
bltTest $graph -plotwidth 300
bltTest $graph -plotheight 300
+#bltCmd $graph axis
+#bltCmd $graph bar (elem)
+#bltCmd $graph cget
+#bltCmd $graph configure
+#bltCmd $graph crosshairs (Blt_CrosshairsOp)
+#bltCmd $graph element (elem)
+#bltCmd $graph extents
+#bltCmd $graph inside
+#bltCmd $graph invtransform
+#bltCmd $graph legend (Blt_LegendOp)
+#bltCmd $graph line (elem)
+#bltCmd $graph marker (Blt_MarkerOp)
+#bltCmd $graph pen (Blt_PenOp)
+#bltCmd $graph postscript (Blt_PostscriptOp)
+#bltCmd $graph transform
+#bltCmd $graph x2axis (axis)
+#bltCmd $graph xaxis (axis)
+#bltCmd $graph y2axis (axis)
+#bltCmd $graph yaxis (axis)
+
echo "done"
-#bltPlotDestroy $w
+bltPlotDestroy $w