Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16538
Modified Files: Tag: devel_0_39 desire.tk Log Message: dash select rect also moves the connected wires wire hi-light color worx
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** desire.tk 21 Aug 2005 04:34:47 -0000 1.1.2.8 --- desire.tk 21 Aug 2005 17:42:21 -0000 1.1.2.9 *************** *** 53,57 **** set look(canvasbgedit) #dddddd set look(wirefg) #888888 ! set look(wirefg2) #777777 #set look(sliderbg) #bbe4ff set look(sliderbg) #ccebff --- 53,57 ---- set look(canvasbgedit) #dddddd set look(wirefg) #888888 ! set look(wirefg2) #ee0000 #set look(sliderbg) #bbe4ff set look(sliderbg) #ccebff *************** *** 1561,1564 **** --- 1561,1566 ---- puts "RIGHTCLICK WIRE" } + # my wire click select + #pd "[canvastosym $canvas] click-on-wire $id $cx $cy $b $f;" *************** *** 1570,1577 **** #$canvas itemconfigure ${obj}BASE -outline $look(wirefg2) ! $canvas itemconfigure $id -fill $look(objectframe3) set _($self:selection_wire) $id return } --- 1572,1580 ---- #$canvas itemconfigure ${obj}BASE -outline $look(wirefg2) ! $canvas itemconfigure $id -fill $look(wirefg2) set _($self:selection_wire) $id + # my wire click select end return } *************** *** 1596,1608 **** puts "dehightlight all!!!!!" - foreach obj $_($self:selection) { ! $canvas itemconfigure ${obj}BASE -outline $look(objectframe3) } - set _($self:selection) {} } focus $canvas --- 1599,1627 ---- puts "dehightlight all!!!!!" foreach obj $_($self:selection) { ! ! $canvas itemconfigure ${obj}BASE -outline $look(objectframe3) } + set _($self:selection) {} } + + if {[llength $_($self:selection_wire)] > 0} { + + puts "dehightlight all wires!!!!!" + + + foreach wire $_($self:selection_wire) { + + $canvas itemconfigure $wire -fill $look(wirefg) + } + set _($self:selection_wire) {} + + } + + + focus $canvas *************** *** 1776,1790 **** set ids {} foreach tag $element_tags { if {[regexp {^([a-f0-9]{6,8})} $tag id]} { lappend ids $id } } ! puts "ids in selrect --> $ids" set selected_objs [lsort -unique $ids] ! puts "selected_objs --> $selected_objs" foreach obj $selected_objs { --- 1795,1821 ---- set ids {} + set wires {} + foreach tag $element_tags { + if {[regexp {^([a-f0-9]{6,8})} $tag id]} { lappend ids $id } + + # this would make things shorter + # if {[regexp {^l([a-f0-9]{6,8})} [$canvas gettags $tag] id]} + + if {[regexp {^l([a-f0-9]{6,8})} $tag wire_id]} { + + lappend wires $wire_id + } } ! #puts "ids in selrect --> $ids" ! #puts "wires in selrect --> $wires" set selected_objs [lsort -unique $ids] ! #puts "selected_objs --> $selected_objs" foreach obj $selected_objs { *************** *** 1792,1802 **** if {$i<0} {lappend _($self:selection) $obj} } puts "self:selection --> $_($self:selection)" foreach obj $_($self:selection) { ! puts "${obj}BASE :: $canvas" ! $canvas itemconfigure ${obj}BASE -outline $look(objectframe4) } set _($self:select_by) "selrect" --- 1823,1845 ---- if {$i<0} {lappend _($self:selection) $obj} } + + foreach wire $wires { + set i [lsearch $_($self:selection_wire) $wire] + if {$i<0} {lappend _($self:selection_wire) $wire} + } + + #set _($self:selection_wire) $wires puts "self:selection --> $_($self:selection)" + puts "self:wire_selection --> $_($self:selection_wire)" foreach obj $_($self:selection) { ! #puts "${obj}BASE :: $canvas" ! $canvas itemconfigure ${obj}BASE -outline $look(objectframe4) } + + foreach wire $_($self:selection_wire) { + $canvas itemconfigure $wire -fill $look(wirefg2) + } set _($self:select_by) "selrect"