Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4221
Modified Files: Tag: desiredata desire.tk Log Message: added def to return implicit wires in selection
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.384 retrieving revision 1.1.2.600.2.385 diff -C2 -d -r1.1.2.600.2.384 -r1.1.2.600.2.385 *** desire.tk 16 Aug 2007 20:11:09 -0000 1.1.2.600.2.384 --- desire.tk 17 Aug 2007 00:28:45 -0000 1.1.2.600.2.385 *************** *** 3923,3926 **** --- 3923,3951 ----
def Canvas outlet_expand {k outlet} {set reconnect [$self broken_wires o $k $inlet]} + def Canvas include_wires {} {$self find_include_wires [$@objectsel values]} + + def Canvas find_include_wires {objs} { + set l {}; set h $@objects + foreach obj $objs { + set k [$h search $obj] + for {set i 0} {$i < [$obj ninlets]} {incr i} { + set ws [$self com_wires i $k $i]; if {[llength $ws]} {foreach w $ws {lappend l $w}} + } + for {set o 0} {$o < [$obj noutlets]} {incr o} { + set ws [$self com_wires o $k $o]; if {[llength $ws]} {foreach w $ws {lappend l $w}} + } + } + puts [lsort -unique $l] + } + + def Canvas com_wires {type k port} { + set h $@objectsel; set obj [$@objects get $k]; set wires [$obj wires2]; set l {} + foreach wire $wires { + mset {f2 o2 t2 i2} [$wire connects] + if {$t2==$k && $i2==$port && $type=="i" && [$h exists $f2]} {lappend l $wire} + if {$f2==$k && $o2==$port && $type=="o" && [$h exists $t2]} {lappend l $wire} + } + return $l + }
def Canvas broken_wires {type k port canvas} {