diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2005-01-27 14:42:55 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2005-01-27 14:42:55 +0000 |
commit | bfb359fd22e61faaca3a6e49ad3b7a81f2d71551 (patch) | |
tree | d070071515c7e7f53073da32046b24855e8307c8 /test | |
parent | 6435314717c5fb8fa062eb682c72c8df095b1be3 (diff) |
cyclone alpha52 and toxy alpha15 (see notes.txt for cyclone, toxy and shared)
svn path=/trunk/externals/miXed/; revision=2550
Diffstat (limited to 'test')
-rw-r--r-- | test/cyclone/cyclone-test.pd | 54 | ||||
-rw-r--r-- | test/cyclone/linedrive-test.pd | 11 | ||||
-rw-r--r-- | test/cyclone/matrix-test.pd | 165 | ||||
-rw-r--r-- | test/cyclone/maxmode-test.pd | 72 | ||||
-rw-r--r-- | test/toxy/kb.wid | 3 | ||||
-rw-r--r-- | test/toxy/multiscale.wid | 6 | ||||
-rw-r--r-- | test/toxy/setup.wid | 49 |
7 files changed, 296 insertions, 64 deletions
diff --git a/test/cyclone/cyclone-test.pd b/test/cyclone/cyclone-test.pd index f60a320..fefeb16 100644 --- a/test/cyclone/cyclone-test.pd +++ b/test/cyclone/cyclone-test.pd @@ -1,7 +1,7 @@ -#N canvas 150 47 650 459 12; +#N canvas 331 48 650 459 12; #X obj 37 419 cyclone; -#X msg 37 58 bang; -#X msg 66 24 import; +#X msg 76 133 bang; +#X msg 61 95 import; #X obj 41 240 forward texthelp; #X obj 61 302 r texthelp; #X msg 50 272 send binhelp; @@ -9,19 +9,30 @@ #X obj 88 329 r binhelp; #X obj 88 358 sprintf import ../../../ref/c74help/bin/%s.help; #X obj 61 389 sprintf import ../../../ref/c74help/text/%s.help; -#X msg 123 201 buffir~; -#X msg 41 197 record~; -#X msg 209 201 fffb~; -#X msg 284 201 pictctrl; +#X msg 130 203 buffir~; +#X msg 41 203 record~; +#X msg 220 203 fffb~; +#X msg 295 203 pictctrl; #X msg 41 168 universal; #X msg 138 168 funbuff; #X msg 220 168 prob; -#X obj 137 24 loadbang; -#X obj 137 126 cyclone; -#X msg 177 91 cd ../../../rob; -#X msg 137 53 cd ../../../../ref; -#X msg 213 126 pwd; -#X obj 72 126 print; +#X obj 137 16 loadbang; +#X obj 137 133 cyclone; +#X msg 183 95 cd ../../../rob; +#X obj 307 272 cyclone; +#X obj 390 240 loadbang; +#X msg 390 269 cd ../krzYszcz/max-help; +#X msg 393 203 import scope~; +#X obj 307 310 print result; +#X obj 394 168 print pwd; +#X obj 394 133 r \$0-pwd; +#X msg 321 133 pwd \$1; +#X msg 321 51 bang; +#X obj 321 95 symbol \$0-pwd; +#X msg 145 95 cd; +#X obj 206 133 print result; +#X msg 296 168 matrix~; +#X msg 137 55 cd ../../../ref; #X connect 1 0 18 0; #X connect 2 0 18 0; #X connect 4 0 9 0; @@ -37,8 +48,17 @@ #X connect 14 0 3 0; #X connect 15 0 3 0; #X connect 16 0 3 0; -#X connect 17 0 20 0; -#X connect 18 0 22 0; +#X connect 17 0 33 0; +#X connect 18 0 31 0; #X connect 19 0 18 0; -#X connect 20 0 18 0; -#X connect 21 0 18 0; +#X connect 20 0 24 0; +#X connect 21 0 22 0; +#X connect 22 0 20 0; +#X connect 23 0 20 0; +#X connect 26 0 25 0; +#X connect 27 0 18 0; +#X connect 28 0 29 0; +#X connect 29 0 27 0; +#X connect 30 0 18 0; +#X connect 32 0 3 0; +#X connect 33 0 18 0; diff --git a/test/cyclone/linedrive-test.pd b/test/cyclone/linedrive-test.pd new file mode 100644 index 0000000..2a1dc36 --- /dev/null +++ b/test/cyclone/linedrive-test.pd @@ -0,0 +1,11 @@ +#N canvas 204 82 318 300 12; +#X floatatom 34 39 5 0 0 0 - - -; +#X floatatom 34 118 0 0 0 0 - - -; +#X obj 34 76 linedrive 100 100 1.01 0; +#X obj 32 209 maxmode; +#X msg 124 171 set max; +#X msg 32 171 set none; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 3 0; diff --git a/test/cyclone/matrix-test.pd b/test/cyclone/matrix-test.pd new file mode 100644 index 0000000..23ba18a --- /dev/null +++ b/test/cyclone/matrix-test.pd @@ -0,0 +1,165 @@ +#N canvas 414 169 541 334 12; +#X obj 21 60 sig~; +#X floatatom 21 25 5 0 0 0 - - -; +#X floatatom 21 258 5 0 0 0 - - -; +#X obj 21 222 Snapshot~ 10; +#X floatatom 143 258 5 0 0 0 - - -; +#X obj 143 222 Snapshot~ 10; +#X obj 104 60 sig~; +#X floatatom 104 25 5 0 0 0 - - -; +#X obj 186 179 matrix~ 3 3; +#X floatatom 269 258 5 0 0 0 - - -; +#X obj 269 222 Snapshot~ 10; +#X obj 184 60 sig~; +#X floatatom 184 25 5 0 0 0 - - -; +#X msg 26 179 print; +#X msg 284 101 connect 1 2; +#X msg 283 138 connect 0 1; +#X msg 388 101 disconnect 1 2; +#X msg 390 138 disconnect 0 1; +#X msg 285 25 connect 2 2; +#X msg 389 25 disconnect 2 2; +#X msg 284 60 connect 1 1; +#X msg 391 60 disconnect 1 1; +#N canvas 172 110 546 362 bigblock 0; +#X obj 21 60 sig~; +#X floatatom 21 25 5 0 0 0 - - -; +#X floatatom 21 258 5 0 0 0 - - -; +#X obj 21 222 Snapshot~ 10; +#X floatatom 143 258 5 0 0 0 - - -; +#X obj 143 222 Snapshot~ 10; +#X obj 104 60 sig~; +#X floatatom 104 25 5 0 0 0 - - -; +#X floatatom 269 258 5 0 0 0 - - -; +#X obj 269 222 Snapshot~ 10; +#X obj 184 60 sig~; +#X floatatom 184 25 5 0 0 0 - - -; +#X msg 284 101 connect 1 2; +#X msg 283 137 connect 0 1; +#X msg 388 101 disconnect 1 2; +#X msg 390 137 disconnect 0 1; +#X msg 285 25 connect 2 2; +#X msg 389 25 disconnect 2 2; +#X msg 284 60 connect 1 1; +#X msg 391 60 disconnect 1 1; +#X obj 406 258 block~ 4096; +#X msg 62 181 print; +#X msg 62 143 debug; +#X obj 343 181 print; +#X obj 186 181 matrix~ 3 3 0.5; +#X msg 22 101 ramp 3000; +#X connect 0 0 24 0; +#X connect 1 0 0 0; +#X connect 3 0 2 0; +#X connect 5 0 4 0; +#X connect 6 0 24 1; +#X connect 7 0 6 0; +#X connect 9 0 8 0; +#X connect 10 0 24 2; +#X connect 11 0 10 0; +#X connect 12 0 24 0; +#X connect 13 0 24 0; +#X connect 14 0 24 0; +#X connect 15 0 24 0; +#X connect 16 0 24 0; +#X connect 17 0 24 0; +#X connect 18 0 24 0; +#X connect 19 0 24 0; +#X connect 21 0 24 0; +#X connect 22 0 24 0; +#X connect 24 0 3 0; +#X connect 24 1 5 0; +#X connect 24 2 9 0; +#X connect 24 3 23 0; +#X connect 25 0 24 0; +#X restore 413 258 pd bigblock; +#X msg 88 139 debug; +#X obj 306 179 print; +#X msg 26 138 dump; +#X msg 23 101 dumptarget; +#N canvas 179 79 698 356 lists 0; +#X obj 363 29 osc~ 220; +#X obj 450 29 osc~ 230; +#X obj 362 73 matrix~ 3 2 1; +#X obj 362 165 dac~; +#X obj 492 73 r \$0-mixer; +#X floatatom 30 213 5 0 0 0 - - -; +#X floatatom 112 213 5 0 0 0 - - -; +#X obj 30 297 s \$0-mixer; +#X msg 30 253 1 0 1 \$1; +#X msg 112 253 1 1 1 \$1; +#X msg 180 73 disconnect 0 0 1; +#X floatatom 33 73 5 0 0 0 - - -; +#X floatatom 115 73 5 0 0 0 - - -; +#X obj 33 165 s \$0-mixer; +#X msg 33 117 0 0 1 \$1; +#X msg 115 117 0 1 1 \$1; +#X msg 186 213 disconnect 1 0 1; +#X floatatom 361 213 5 0 0 0 - - -; +#X floatatom 443 213 5 0 0 0 - - -; +#X obj 361 297 s \$0-mixer; +#X msg 256 29 ramp 1000; +#X msg 361 253 2 0 1 \$1; +#X msg 443 253 2 1 1 \$1; +#X msg 511 213 disconnect 2 0 1; +#X msg 35 29 connect 0 0 1; +#X msg 188 165 connect 1 0 1; +#X msg 513 165 connect 2 0 1; +#X obj 540 29 osc~ 235; +#X obj 361 117 *~ 0.01; +#X obj 443 117 *~ 0.01; +#X msg 174 29 ramp 0; +#X connect 0 0 2 0; +#X connect 1 0 2 1; +#X connect 2 0 28 0; +#X connect 2 1 29 0; +#X connect 4 0 2 0; +#X connect 5 0 8 0; +#X connect 6 0 9 0; +#X connect 8 0 7 0; +#X connect 9 0 7 0; +#X connect 10 0 13 0; +#X connect 11 0 14 0; +#X connect 12 0 15 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 16 0 7 0; +#X connect 17 0 21 0; +#X connect 18 0 22 0; +#X connect 20 0 2 0; +#X connect 21 0 19 0; +#X connect 22 0 19 0; +#X connect 23 0 19 0; +#X connect 24 0 2 0; +#X connect 25 0 2 0; +#X connect 26 0 2 0; +#X connect 27 0 2 2; +#X connect 28 0 3 0; +#X connect 29 0 3 1; +#X connect 30 0 2 0; +#X restore 413 221 pd lists; +#X connect 0 0 8 0; +#X connect 1 0 0 0; +#X connect 3 0 2 0; +#X connect 5 0 4 0; +#X connect 6 0 8 1; +#X connect 7 0 6 0; +#X connect 8 0 3 0; +#X connect 8 1 5 0; +#X connect 8 2 10 0; +#X connect 8 3 24 0; +#X connect 10 0 9 0; +#X connect 11 0 8 2; +#X connect 12 0 11 0; +#X connect 13 0 8 0; +#X connect 14 0 8 0; +#X connect 15 0 8 0; +#X connect 16 0 8 0; +#X connect 17 0 8 0; +#X connect 18 0 8 0; +#X connect 19 0 8 0; +#X connect 20 0 8 0; +#X connect 21 0 8 0; +#X connect 23 0 8 0; +#X connect 25 0 8 0; +#X connect 26 0 8 0; diff --git a/test/cyclone/maxmode-test.pd b/test/cyclone/maxmode-test.pd index 75271e8..685814b 100644 --- a/test/cyclone/maxmode-test.pd +++ b/test/cyclone/maxmode-test.pd @@ -1,36 +1,38 @@ -#N canvas 356 180 524 287 12; -#X obj 310 29 r #compatibility; -#X obj 23 66 s #compatibility; -#X msg 23 29 bang; -#X obj 25 193 prepend test; -#X msg 136 122 set this; -#X msg 137 159 set that; -#X msg 25 122 x; -#X obj 310 66 print mode; -#X msg 78 29 set max; -#X msg 165 29 set barry; -#X msg 77 122 bang; -#X obj 25 228 print pp; -#X msg 366 122 set this; -#X msg 367 159 set that; -#X msg 255 122 x; -#X msg 307 122 bang; -#X obj 255 228 print aa; -#X obj 255 193 Append test; -#X msg 155 193 bang; -#X obj 155 228 maxmode; -#X connect 0 0 7 0; -#X connect 2 0 1 0; -#X connect 3 0 11 0; -#X connect 4 0 3 0; -#X connect 5 0 3 0; -#X connect 6 0 3 0; -#X connect 8 0 1 0; -#X connect 9 0 1 0; -#X connect 10 0 3 0; -#X connect 12 0 17 0; -#X connect 13 0 17 0; -#X connect 14 0 17 0; -#X connect 15 0 17 0; +#N canvas 289 109 635 329 12; +#X obj 31 245 prepend test; +#X msg 142 174 set this; +#X msg 143 211 set that; +#X msg 31 174 x; +#X obj 273 111 print mode; +#X msg 182 34 set max; +#X msg 273 34 set barry; +#X msg 83 174 bang; +#X obj 31 280 print pp; +#X msg 372 174 set this; +#X msg 373 211 set that; +#X msg 261 174 x; +#X msg 313 174 bang; +#X obj 261 280 print aa; +#X obj 261 245 Append test; +#X msg 397 34 bang; +#X obj 182 75 maxmode; +#X msg 112 34 set; +#X obj 127 111 print result; +#X msg 46 34 get; +#X connect 0 0 8 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 5 0 16 0; +#X connect 6 0 16 0; +#X connect 7 0 0 0; +#X connect 9 0 14 0; +#X connect 10 0 14 0; +#X connect 11 0 14 0; +#X connect 12 0 14 0; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 16 0 18 0; +#X connect 16 1 4 0; #X connect 17 0 16 0; -#X connect 18 0 19 0; +#X connect 19 0 16 0; diff --git a/test/toxy/kb.wid b/test/toxy/kb.wid index 901db15..b3bd051 100644 --- a/test/toxy/kb.wid +++ b/test/toxy/kb.wid @@ -208,9 +208,6 @@ proc ::toxy::kbset {path target remote args} { ::toxy::kb .- .| . .#oct .#size -# undo the "bind Canvas <1> {+focus %W}" from the setup.wid -bind .- <FocusIn> {focus .^.c} - #@ new set ::toxy::kbchord(.|) {} diff --git a/test/toxy/multiscale.wid b/test/toxy/multiscale.wid index bff9c4f..063146b 100644 --- a/test/toxy/multiscale.wid +++ b/test/toxy/multiscale.wid @@ -35,8 +35,7 @@ proc ::toxy::multiscale {path cvpath target remote count lo hi res dx dy bg} { } set id [$path create window $px $py -width $dx -height $dy \ -anchor nw -window $path.s$ndx -tags $path.s$ndx] -# ::toxy::master $path.s$ndx $path $cvpath $target - ::toxy::master $path.s$ndx $cvpath $target + ::toxy::subwidget $path.s$ndx $path $cvpath $target incr px $dx } } @@ -51,6 +50,3 @@ proc ::toxy::multiscale {path cvpath target remote count lo hi res dx dy bg} { #. @list ::toxy::multiscale_list .- .#n .#2 .#1 ::toxy::multiscale .- .^.c .| . .#n .#lo .#hi .#res .#dx .#dy .#bg - -# undo the "bind Canvas <1> {+focus %W}" from the setup.wid -bind .- <FocusIn> {focus .^.c} diff --git a/test/toxy/setup.wid b/test/toxy/setup.wid index 98fe7fb..1d544c9 100644 --- a/test/toxy/setup.wid +++ b/test/toxy/setup.wid @@ -1,4 +1,4 @@ -package provide toxywidgets 0.1.0.14 +package provide toxywidgets 0.1.0.15 # LATER keep standard widget setup in a .tcl file (transfered into a .wiq), and # glue separate .wid files with standard widget definitions into another .wiq @@ -81,8 +81,15 @@ proc ::toxy::item_destroy {path varname} { } proc ::toxy::item_getconfig {path target} { - pd $target.rp _config $target.rp [$path cget -bg] \ - [winfo reqwidth $path] [winfo reqheight $path] \ + set wd [winfo reqwidth $path] + set ht [winfo reqheight $path] + if {$wd < 2 || $ht < 2} { +# LATER rethink + update idletasks + set wd [winfo width $path] + set ht [winfo height $path] + } + pd $target.rp _config $target.rp [$path cget -bg] $wd $ht \ [catch {$path config -state normal}]\; } @@ -185,7 +192,6 @@ proc ::toxy::master_motion {target cvpath x y} { } proc ::toxy::master {path cvpath target} { -# FIXME subitem handling in megawidgets bind $path <ButtonRelease> "::toxy::master_release $target $cvpath %X %Y %b" bind $path <1> "::toxy::item_click $target $cvpath %X %Y %b 0" bind $path <Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 1" @@ -202,6 +208,41 @@ proc ::toxy::master {path cvpath target} { bind $path <B1-Motion> "::toxy::master_motion $target $cvpath %X %Y" bind $path <Enter> "::toxy::item_inout $target 1" bind $path <Leave> "::toxy::item_inout $target 0" + + if {[catch {$path config -state normal}] == 0} { + bind $path <<disable>> "$path config -state disabled" + bind $path <<enable>> "$path config -state normal" + } + + if {[winfo class $path] == "Canvas"} { +# undo the "bind Canvas <1> {+focus %W}" from above + bind $path <FocusIn> "focus $cvpath" + } +} + +# to be called explicitly from type initializer, LATER rethink +proc ::toxy::subwidget {path parent cvpath target} { + bind $path <ButtonRelease> "::toxy::master_release $target $cvpath %X %Y %b" + bind $path <1> "::toxy::item_click $target $cvpath %X %Y %b 0" + bind $path <Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 1" + bind $path <Control-1> "::toxy::item_click $target $cvpath %X %Y %b 2" + bind $path <Control-Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 3" + bind $path <Alt-1> "::toxy::item_click $target $cvpath %X %Y %b 4" + bind $path <Alt-Shift-1> "::toxy::item_click $target $cvpath %X %Y %b 5" + bind $path <Alt-Control-1> "::toxy::item_click $target $cvpath %X %Y %b 6" + bind $path <Alt-Control-Shift-1> \ + "::toxy::item_click $target $cvpath %X %Y %b 7" + bind $path <3> "::toxy::item_click $target $cvpath %X %Y %b 8" + + bind $path <Motion> "::toxy::master_motion $target $cvpath %X %Y" + bind $path <B1-Motion> "::toxy::master_motion $target $cvpath %X %Y" + bind $path <Enter> "::toxy::item_inout $target 1" + bind $path <Leave> "::toxy::item_inout $target 0" + + if {[catch {$path config -state normal}] == 0} { + bind $parent <<disable>> "+$path config -state disabled" + bind $parent <<enable>> "+$path config -state normal" + } } # standard widget types, LATER move to separate .wid files |