From 3235bb172a71442d0d0704ef4ce6f269a050c79f Mon Sep 17 00:00:00 2001 From: joye Date: Wed, 19 Feb 2014 22:05:14 +0000 Subject: *** empty log message *** --- tests/bargraph.tcl | 2 +- tests/base.tcl | 32 ++++++++++++++++++++++++-------- tests/legend.tcl | 34 ++++++++++++++++++---------------- tests/linegraph.tcl | 22 +++++++++++++++++++++- 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 -- cgit v0.12