Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29326
Modified Files: Tag: devel_0_39 desire.tk Log Message: morphing def Canvas key_nav
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.323 retrieving revision 1.1.2.324 diff -C2 -d -r1.1.2.323 -r1.1.2.324 *** desire.tk 13 Aug 2006 06:16:23 -0000 1.1.2.323 --- desire.tk 13 Aug 2006 08:09:29 -0000 1.1.2.324 *************** *** 2451,2518 **** set off 0 set max 100 ! set x1 $_($@keynav_current:x1); set xs $_($@keynav_current:xs) set y1 $_($@keynav_current:y1); set ys $_($@keynav_current:ys) while {![llength $group]} { ! switch $direction { ! up { ! set left [expr $x1 - ($xs * $off)] ! set right [expr ($x1 + $xs) + ($xs * $off)] ! foreach item $children { if {$_($item:y1) < $y1} { ! if {$_($item:x1) >= $left && $_($item:x1) <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } ! set x2 [expr $_($item:x1) + $_($item:xs)] ! if {$x2 >= $left && $x2 <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } ! } } ! } ! down { ! set left [expr $x1 - ($xs * $off)] ! set right [expr ($x1 + $xs) + ($xs * $off)] ! foreach item $children { if {$_($item:y1) > $y1} { ! if {$_($item:x1) >= $left && $_($item:x1) <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } ! set x2 [expr $_($item:x1) + $_($item:xs)] ! if {$x2 >= $left && $x2 <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } ! } } ! } ! right { ! set top [expr $y1 + ($ys * $off)] ! set bottom [expr ($y1 - $ys) - ($ys * $off)] ! foreach item $children { if {$_($item:x1) > $x1} { ! if {$_($item:y1) <= $top && $_($item:y1) >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } ! set y2 [expr $_($item:y1) - $_($item:ys)] ! if {$y2 <= $top && $y2 >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } ! } } ! } ! left { ! set top [expr $y1 + ($ys * $off)] ! set bottom [expr ($y1 - $ys) - ($ys * $off)] ! foreach item $children { if {$_($item:x1) < $x1} { ! if {$_($item:y1) <= $top && $_($item:y1) >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } ! set y2 [expr $_($item:y1) - $_($item:ys)] ! if {$y2 <= $top && $y2 >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } ! } } } } --- 2451,2511 ---- set off 0 set max 100 ! switch $direction { ! up {set axis y; set polarity -1} ! down {set axis y; set polarity +1} ! left {set axis x; set polarity -1} ! right {set axis x; set polarity +1} ! } set x1 $_($@keynav_current:x1); set xs $_($@keynav_current:xs) set y1 $_($@keynav_current:y1); set ys $_($@keynav_current:ys) while {![llength $group]} { ! set left [expr $x1 - $xs*$off]; set right [expr $x1 + $xs + $xs*$off] ! set top [expr $y1 + $ys*$off]; set bottom [expr $y1 - $ys - $ys*$off] ! foreach item $children { ! switch $direction { ! up { if {$_($item:y1) < $y1} { ! if {$_($item:x1) >= $left && $_($item:x1) <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } ! set x2 [expr $_($item:x1) + $_($item:xs)] ! if {$x2 >= $left && $x2 <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } } ! } ! down { if {$_($item:y1) > $y1} { ! if {$_($item:x1) >= $left && $_($item:x1) <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } ! set x2 [expr $_($item:x1) + $_($item:xs)] ! if {$x2 >= $left && $x2 <= $right} { ! lappend group $item; lappend distances [expr abs($_($item:y1) - $y1)] ! } } ! } ! right { if {$_($item:x1) > $x1} { ! if {$_($item:y1) <= $top && $_($item:y1) >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } ! set y2 [expr $_($item:y1) - $_($item:ys)] ! if {$y2 <= $top && $y2 >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } } ! } ! left { if {$_($item:x1) < $x1} { ! if {$_($item:y1) <= $top && $_($item:y1) >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } ! set y2 [expr $_($item:y1) - $_($item:ys)] ! if {$y2 <= $top && $y2 >= $bottom} { ! lappend group $item; lappend distances [expr abs($_($item:x1) - $x1)] ! } } + } } }