From 155fa2c04c7e415803e1546dcde0a47442eef4b3 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 8 Dec 2004 15:45:27 +0000 Subject: *** empty log message *** svn path=/trunk/externals/miXed/; revision=2361 --- test/cyclone/maxmode-test.pd | 20 ++++++++++++++++++++ test/toxy/lbpict-test.pd | 3 +++ test/toxy/lbpict.wid | 7 +++++++ test/toxy/testmess-test.pd | 35 +++++++++++++++++++++++++++++++++++ test/toxy/testmess.wid | 34 ++++++++++++++++++++++++++++++++++ test/toxy/tot-color.pd | 27 +++++++++++++++++++++++++++ 6 files changed, 126 insertions(+) create mode 100644 test/cyclone/maxmode-test.pd create mode 100644 test/toxy/lbpict-test.pd create mode 100644 test/toxy/lbpict.wid create mode 100644 test/toxy/testmess-test.pd create mode 100644 test/toxy/testmess.wid create mode 100644 test/toxy/tot-color.pd (limited to 'test') diff --git a/test/cyclone/maxmode-test.pd b/test/cyclone/maxmode-test.pd new file mode 100644 index 0000000..1a4512a --- /dev/null +++ b/test/cyclone/maxmode-test.pd @@ -0,0 +1,20 @@ +#N canvas 356 180 524 263 12; +#X obj 310 29 r #compatibility; +#X obj 23 66 s #compatibility; +#X msg 23 29 bang; +#X msg 78 29 symbol max; +#X obj 24 173 prepend test; +#X msg 79 130 set this; +#X msg 184 130 set that; +#X msg 24 130 x; +#X obj 310 66 print mode; +#X obj 24 208 print output; +#X msg 178 29 symbol barry; +#X connect 0 0 8 0; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 4 0 9 0; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 4 0; +#X connect 10 0 1 0; diff --git a/test/toxy/lbpict-test.pd b/test/toxy/lbpict-test.pd new file mode 100644 index 0000000..b2214b6 --- /dev/null +++ b/test/toxy/lbpict-test.pd @@ -0,0 +1,3 @@ +#N canvas 0 0 756 516 12; +#X obj 47 50 widget lbpict p1 #fname /usr/lib/tk8.4/demos/images/earth.gif +; diff --git a/test/toxy/lbpict.wid b/test/toxy/lbpict.wid new file mode 100644 index 0000000..d7d5771 --- /dev/null +++ b/test/toxy/lbpict.wid @@ -0,0 +1,7 @@ +proc ::toxy::lbpict {path fname} { + $path config -image [image create photo -file $fname] +} + +#> lbpict label + +::toxy::lbpict .- .#fname diff --git a/test/toxy/testmess-test.pd b/test/toxy/testmess-test.pd new file mode 100644 index 0000000..712cbfc --- /dev/null +++ b/test/toxy/testmess-test.pd @@ -0,0 +1,35 @@ +#N canvas 235 56 752 558 12; +#X obj 326 23 widget testmess t; +#X obj 122 241 tow . testmess t; +#X msg 141 113 1; +#X msg 122 75 1 2 3 4 5 6 7 8 9 10; +#X msg 245 113 1 2 test; +#X floatatom 243 194 0 0 0 0 - - -; +#X obj 14 152 testmess 20; +#X msg 76 28 50; +#X msg 137 28 100; +#X msg 190 113 list; +#X msg 14 113 set \$1 \, bang; +#X msg 14 28 20; +#X floatatom 14 75 5 0 0 0 - - -; +#X obj 16 241 r lb; +#X obj 122 194 t b a; +#X obj 243 152 tow . testmess t; +#X msg 16 282; +#X msg 212 28 debug; +#X connect 2 0 14 0; +#X connect 3 0 14 0; +#X connect 4 0 14 0; +#X connect 6 0 14 0; +#X connect 7 0 12 0; +#X connect 8 0 12 0; +#X connect 9 0 14 0; +#X connect 10 0 6 0; +#X connect 11 0 12 0; +#X connect 12 0 10 0; +#X connect 13 0 16 0; +#X connect 14 0 1 0; +#X connect 14 1 1 0; +#X connect 15 0 5 0; +#X connect 17 0 15 0; +#X connect 17 0 0 0; diff --git a/test/toxy/testmess.wid b/test/toxy/testmess.wid new file mode 100644 index 0000000..3263fa4 --- /dev/null +++ b/test/toxy/testmess.wid @@ -0,0 +1,34 @@ +puts setup + +proc testmess_list {path target args} { + set sum 0 + foreach a $args { + incr sum $a + } + set lb [concat [lindex $args 0]] + foreach a [lrange $args 1 end] { + lappend lb + $a + } + lappend lb = $sum + set [$path cget -textvariable] $lb + pd [concat $target _cb $sum \;] +} + +proc testmess_command {path} { + pd [concat lb set [set [$path cget -textvariable]] \;] +} + +#> testmess button +#. -bg green -wraplength 350 -text test +#. -command [concat testmess_command .-] +#. @bang .- invoke +#. @float testmess_list .- .| .#args +#. @list testmess_list .- .| .#args + +puts initializer + +#@ new +puts constructor + +#@ free +puts destructor diff --git a/test/toxy/tot-color.pd b/test/toxy/tot-color.pd new file mode 100644 index 0000000..c799195 --- /dev/null +++ b/test/toxy/tot-color.pd @@ -0,0 +1,27 @@ +#N canvas 307 84 527 317 12; +#X obj 20 92 tot .; +#X msg 82 73 query winfo rgb . green; +#X obj 20 129 unpack 0 0 0; +#X obj 20 168 / 256; +#X obj 95 168 / 256; +#X obj 170 168 / 256; +#X obj 20 276 print; +#X obj 20 241 pack 0 0 0; +#X obj 20 205 int; +#X obj 95 205 int; +#X obj 170 205 int; +#X msg 20 22 query set cl [tk_chooseColor] .: if .($cl != "".) .(winfo +rgb . $cl.); +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 2 2 5 0; +#X connect 3 0 8 0; +#X connect 4 0 9 0; +#X connect 5 0 10 0; +#X connect 7 0 6 0; +#X connect 8 0 7 0; +#X connect 9 0 7 1; +#X connect 10 0 7 2; +#X connect 11 0 0 0; -- cgit v1.2.1