Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29486
Modified Files: Tag: devel_0_39 desire.tk Log Message: cleanup
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.305 retrieving revision 1.1.2.306 diff -C2 -d -r1.1.2.305 -r1.1.2.306 *** desire.tk 9 Aug 2006 07:06:42 -0000 1.1.2.305 --- desire.tk 9 Aug 2006 07:42:02 -0000 1.1.2.306 *************** *** 206,210 **** }
! # runs the restore procedure for the last item in the root undo_queue. def* History undo {} { global errorInfo --- 206,210 ---- }
! # runs the restore procedure for the last item in the root undo queue. def* History undo {} { global errorInfo *************** *** 831,841 **** set look(objectframe2) #668888 set look(objectframe3) #000000 ! set look(objectframe4) #0080ff set look(commentfg) #000000 set look(commentbg) #cccccc set look(commentframe1) #ffffff set look(commentframe2) #888888 ! set look(commentframe3) #000000 ! set look(commentframe4) #0080ff
set look(canvasbgrun) #ffffff --- 831,840 ---- set look(objectframe2) #668888 set look(objectframe3) #000000 ! set look(selectframe) #0080ff set look(commentfg) #000000 set look(commentbg) #cccccc set look(commentframe1) #ffffff set look(commentframe2) #888888 ! set look(commentframe3) #cccccc
set look(canvasbgrun) #ffffff *************** *** 1604,1608 **** super io_draw $self ! if {[$self selected?]} {set frcol [look objectframe4]} {set frcol [look objectframe3]} set c .$@canvas.c $c itemconfigure ${self}BASE -outline $frcol -dash [if {$@valid} {list 8 8 8 8} {list}] --- 1603,1607 ---- super io_draw $self ! if {[$self selected?]} {set frcol [look selectframe]} {set frcol [look objectframe3]} set c .$@canvas.c $c itemconfigure ${self}BASE -outline $frcol -dash [if {$@valid} {list 8 8 8 8} {list}] *************** *** 2148,2152 **** set @selection $@children set @selection_wire $@wires ! #foreach obj $@selection {.$self.c itemconfigure ${obj}BASE -outline [look objectframe4]} }
--- 2147,2151 ---- set @selection $@children set @selection_wire $@wires ! #foreach obj $@selection {.$self.c itemconfigure ${obj}BASE -outline [look selectframe]} }
*************** *** 2348,2352 **** puts "selected_objs:$selected_objs selection:$@selection selection_wire:$@selection_wire" # hilite objects ! #foreach obj $@selection {$c itemconfigure ${obj}BASE -outline [look objectframe4]} foreach obj $@selection {$obj selected?= 1} if {[llength $@selection] == 1} { --- 2347,2351 ---- puts "selected_objs:$selected_objs selection:$@selection selection_wire:$@selection_wire" # hilite objects ! #foreach obj $@selection {$c itemconfigure ${obj}BASE -outline [look selectframe]} foreach obj $@selection {$obj selected?= 1} if {[llength $@selection] == 1} { *************** *** 2466,2491 **** puts "current:::: $@keynav_current" set find [lsearch $@children $@keynav_current] ! set childrens [lreplace $@children $find $find] set off 0 set max 100 switch $direction { up { - set y1 $_($@keynav_current:y1) - while {![llength $group]} { set left [expr $_($@keynav_current:x1) - ($_($@keynav_current:xs) * $off)] set right [expr ($_($@keynav_current:x1) + $_($@keynav_current:xs)) + ($_($@keynav_current:xs) * $off)] ! ! foreach item $childrens { 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)] } } --- 2465,2487 ---- puts "current:::: $@keynav_current" set find [lsearch $@children $@keynav_current] ! set children [lreplace $@children $find $find] set off 0 set max 100 + set x1 $_($@keynav_current:x1) + set y1 $_($@keynav_current:y1) switch $direction { up { while {![llength $group]} { set left [expr $_($@keynav_current:x1) - ($_($@keynav_current:xs) * $off)] set right [expr ($_($@keynav_current:x1) + $_($@keynav_current:xs)) + ($_($@keynav_current: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)] } } *************** *** 2497,2516 **** } down { - set y1 $_($@keynav_current:y1) - while {![llength $group]} { set left [expr $_($@keynav_current:x1) - ($_($@keynav_current:xs) * $off)] set right [expr ($_($@keynav_current:x1) + $_($@keynav_current:xs)) + ($_($@keynav_current:xs) * $off)] ! ! foreach item $childrens { 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)] } } --- 2493,2507 ---- } down { while {![llength $group]} { set left [expr $_($@keynav_current:x1) - ($_($@keynav_current:xs) * $off)] set right [expr ($_($@keynav_current:x1) + $_($@keynav_current:xs)) + ($_($@keynav_current: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)] } } *************** *** 2522,2541 **** } right { - set x1 $_($@keynav_current:x1) - while {![llength $group]} { set top [expr $_($@keynav_current:y1) + ($_($@keynav_current:ys) * $off)] set bottom [expr ($_($@keynav_current:y1) - $_($@keynav_current:ys)) - ($_($@keynav_current:ys) * $off)] ! ! foreach item $childrens { 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)] } } --- 2513,2527 ---- } right { while {![llength $group]} { set top [expr $_($@keynav_current:y1) + ($_($@keynav_current:ys) * $off)] set bottom [expr ($_($@keynav_current:y1) - $_($@keynav_current:ys)) - ($_($@keynav_current: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)] } } *************** *** 2545,2567 **** if {$off == $max} {break} } - } left { - set x1 $_($@keynav_current:x1) - while {![llength $group]} { set top [expr $_($@keynav_current:y1) + ($_($@keynav_current:ys) * $off)] set bottom [expr ($_($@keynav_current:y1) - $_($@keynav_current:ys)) - ($_($@keynav_current:ys) * $off)] ! ! foreach item $childrens { 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)] } } --- 2531,2547 ---- if {$off == $max} {break} } } left { while {![llength $group]} { set top [expr $_($@keynav_current:y1) + ($_($@keynav_current:ys) * $off)] set bottom [expr ($_($@keynav_current:y1) - $_($@keynav_current:ys)) - ($_($@keynav_current: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)] } } *************** *** 2571,2575 **** if {$off == $max} {break} } - } } --- 2551,2554 ---- *************** *** 3139,3143 **** set points [list $x1 $y1 [expr $x2+4] $y1 $x2 [expr $y1+4] $x2 [expr $y2-4] \ [expr $x2+4] $y2 $x1 $y2 $x2 $y2 $x1 $y2] ! $self item BASE polygon $points -fill [look objectbg] -outline [look objectframe3] }
--- 3118,3123 ---- set points [list $x1 $y1 [expr $x2+4] $y1 $x2 [expr $y1+4] $x2 [expr $y2-4] \ [expr $x2+4] $y2 $x1 $y2 $x2 $y2 $x1 $y2] ! if {[$self selected?]} {set frcol [look selectframe]} {set frcol [look objectframe3]} ! $self item BASE polygon $points -fill [look objectbg] -outline $frcol }
*************** *** 3145,3150 **** super io_draw $self - if {[$self selected?]} {set frcol [look objectframe4]} {set frcol [look objectframe3]} - .$@canvas.c itemconfigure ${self}BASE -outline $frcol super #comment out the following to see what happens with the q...... --- 3125,3128 ---- *************** *** 3182,3189 **** set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2] .$@canvas.c canvasx $x1 - $self item BASE polygon $points -fill [look objectbg] -outline [look objectframe3] - io_draw $self if {[$self selected?]} {set frcol [look objectframe4]} {set frcol [look objectframe3]} ! .$@canvas.c itemconfigure ${self}BASE -outline $frcol }
--- 3160,3166 ---- set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2] .$@canvas.c canvasx $x1 if {[$self selected?]} {set frcol [look objectframe4]} {set frcol [look objectframe3]} ! $self item BASE polygon $points -fill [look objectbg] -outline $frcol ! io_draw $self }
*************** *** 3218,3222 **** set xyb [l+ [list $x2 $y1 $x1 $y1 $x1 $y2] [list -1 +1 +1 +1 +1 -1]] set xyc [l+ [list $x2 $y1 $x2 $y2 $x1 $y2] [list -1 +1 -1 -1 +1 -1]] ! $self item BASE rectangle $xya -fill [look commentbg] $self item BASE1 line $xyb -fill [look commentframe1] $self item BASE2 line $xyc -fill [look commentframe2] --- 3195,3200 ---- set xyb [l+ [list $x2 $y1 $x1 $y1 $x1 $y2] [list -1 +1 +1 +1 +1 -1]] set xyc [l+ [list $x2 $y1 $x2 $y2 $x1 $y2] [list -1 +1 -1 -1 +1 -1]] ! if {[$self selected?]} {set frcol [look selectframe]} {set frcol [look commentframe3]} ! $self item BASE rectangle $xya -fill [look commentbg] -outline $frcol $self item BASE1 line $xyb -fill [look commentframe1] $self item BASE2 line $xyc -fill [look commentframe2] *************** *** 3233,3242 **** set xyc [list [expr $x2-1] [expr $y1+1] [expr $x2-1] [expr $y2-1] [expr $x1+1] [expr $y2-1]] set color [bluify [parse_color $@bcol]] ! $self item BASE rectangle $xya -fill $color $self item BASE2 line $xyb -fill #ffffff $self item BASE3 line $xyc -fill [darker $color] io_draw $self - if {[$self selected?]} {set frcol [look objectframe4]} {set frcol [look objectframe3]} - .$@canvas.c itemconfigure ${self}BASE -outline $frcol $self draw_wires } --- 3211,3219 ---- set xyc [list [expr $x2-1] [expr $y1+1] [expr $x2-1] [expr $y2-1] [expr $x1+1] [expr $y2-1]] set color [bluify [parse_color $@bcol]] ! if {[$self selected?]} {set frcol [look selectframe]} {set frcol [look objectframe3]} ! $self item BASE rectangle $xya -fill $color -outline $frcol $self item BASE2 line $xyb -fill #ffffff $self item BASE3 line $xyc -fill [darker $color] io_draw $self $self draw_wires } *************** *** 3268,3289 **** set props2 {} foreach var [lrange $fields($class) 5 end] { ! ! #puts "$var --from-- $_($@of:$var) --to-- $@$var" ! lappend orig $_($@of:$var) ! lappend props2 $@$var ! ! switch $var { ! is_log {if {$@$var == "linear"} {set val 1} else { set val 0}} ! isa {if {$@$var == "yes"} {set val 1} else { set val 0}} ! steady {if {$@$var == "jump"} {set val 1} else { set val 0}} ! fstyle {if {$@$var == "yes"} {set val 1} else { set val 0}} ! default {set val $@$var} ! } ! if {[regexp -nocase {^([a-z])col$} $var]} {set val [unparse_color $val]; puts "color ---- > $val"} ! switch -- $val { {} {set val "empty"}} ! set props "$props $val" ! ! } ! puts "orig props:: $orig" puts "inter props:: $props2" --- 3245,3265 ---- set props2 {} foreach var [lrange $fields($class) 5 end] { ! #puts "$var --from-- $_($@of:$var) --to-- $@$var" ! lappend orig $_($@of:$var) ! lappend props2 $@$var ;# does $@$ really work or not? if not, fix objective.tcl ... ! switch $var { ! is_log {set val [expr $@$var == "linear"]} ! isa {set val [expr $@$var == "yes" ]} ! steady {set val [expr $@$var == "jump" ]} ! fstyle {set val [expr $@$var == "yes" ]} ! default {set val $@$var} ! } ! if {[regexp -nocase {^([a-z])col$} $var]} { ! set val [unparse_color $val] ! puts "color ---- > $val" ! } ! switch -- $val { {} {set val "empty"}} ! set props "$props $val" ! } puts "orig props:: $orig" puts "inter props:: $props2"