Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4733
Modified Files: Tag: devel_0_39 desire.tk Log Message: fixed some bugs in [nbx] etc
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.134 retrieving revision 1.1.2.135 diff -C2 -d -r1.1.2.134 -r1.1.2.135 *** desire.tk 4 Dec 2005 11:59:28 -0000 1.1.2.134 --- desire.tk 4 Dec 2005 12:14:40 -0000 1.1.2.135 *************** *** 1895,1899 ****
def* box clickedit {x y butt key in_selection selection} { - global _ #handles the shift click #if {($f&1) && !$already} {post "add to selection?"; return} --- 1895,1898 ---- *************** *** 2213,2217 **** io_draw $self if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} ! $canvas itemconfigure ${self}BASE -outline $frcol }
--- 2212,2216 ---- io_draw $self if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} ! $@canvas itemconfigure ${self}BASE -outline $frcol }
*************** *** 2247,2250 **** --- 2246,2251 ---- class_new numbox {bluebox} def* numbox init {args} { + eval [concat [list super] $args] + set @clicking 0 set @buf "" } *************** *** 2260,2283 **** set outs [expr [string compare $@snd empty]==0] set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2] - set isnew [expr [llength [$canvas gettags ${self}BASE]] == 0] set font courier set xt [expr $x1+$ys/2+2] set yt [expr $y1+$ys/2+1+$xs/34] set points2 [list $x1 $y1 [expr $x1+$ys/2] [expr $y1+$ys/2] $x1 $y2] ! if {$isnew} {set @clicking 0} $self item BASE polygon $points -fill [parse_color $@bcol] -outline $look(objectframe3) $self item BASE4 polygon $points2 -fill $color4 -outline $look(objectframe3) $self item NUMBER text $xt $yt -anchor w -text [numbox_ftoa $self] -font [list $font $@fs bold] -fill [parse_color $@fcol] ! set focused [expr ![string compare $self [canvas_focuser $canvas]]] ! if {$focused} {set color4 #00ff00} {set color4 $look(objectbg)} ! $canvas delete ${self}CURS if {[string length $@buf]>0} { ! mset {blah blah x3 blah} [$canvas bbox ${self}NUMBER] ! $canvas create line $x3 $y1 $x3 $y2 -tags ${self}CURS -fill red } io_draw $self label_draw $self if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} ! $canvas itemconfigure ${self}BASE -outline $frcol }
--- 2261,2282 ---- set outs [expr [string compare $@snd empty]==0] set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2] set font courier set xt [expr $x1+$ys/2+2] set yt [expr $y1+$ys/2+1+$xs/34] set points2 [list $x1 $y1 [expr $x1+$ys/2] [expr $y1+$ys/2] $x1 $y2] ! set focused [expr ![string compare $self [canvas_focuser $@canvas]]] ! if {$focused} {set color4 #00ff00} {set color4 $look(objectbg)} $self item BASE polygon $points -fill [parse_color $@bcol] -outline $look(objectframe3) $self item BASE4 polygon $points2 -fill $color4 -outline $look(objectframe3) $self item NUMBER text $xt $yt -anchor w -text [numbox_ftoa $self] -font [list $font $@fs bold] -fill [parse_color $@fcol] ! $@canvas delete ${self}CURS if {[string length $@buf]>0} { ! mset {blah blah x3 blah} [$@canvas bbox ${self}NUMBER] ! $@canvas create line $x3 $y1 $x3 $y2 -tags ${self}CURS -fill red } io_draw $self label_draw $self if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} ! $@canvas itemconfigure ${self}BASE -outline $frcol }
*************** *** 2313,2317 ****
def numbox motion {x y mod} { ! set focused [expr ![string compare $self [canvas_focuser $canvas]]] if {!$focused} {return} mset {ox oy} $@mouse --- 2312,2316 ----
def numbox motion {x y mod} { ! set focused [expr ![string compare $self [canvas_focuser $@canvas]]] if {!$focused} {return} mset {ox oy} $@mouse *************** *** 2327,2331 **** set @clicking 0 if {$@oval!=$@val} { ! $canvas unfocus pd x$self float $@val } --- 2326,2330 ---- set @clicking 0 if {$@oval!=$@val} { ! $@canvas unfocus pd x$self float $@val } *************** *** 2341,2345 **** # Return catch {set @val [expr $@buf]} ! $canvas unfocus pd x$self float $@val } elseif {$key==8 || $key==127} { --- 2340,2344 ---- # Return catch {set @val [expr $@buf]} ! $@canvas unfocus pd x$self float $@val } elseif {$key==8 || $key==127} { *************** *** 2440,2444 **** $self item KNOB rectangle $x1 $y1 $x1 $y1 \ -outline #000000 -fill [darker $color] ! set pos [$canvas coords ${self}BASE] set span [expr $@max-$@min] set l [expr $orient?$@h:$@w] --- 2439,2443 ---- $self item KNOB rectangle $x1 $y1 $x1 $y1 \ -outline #000000 -fill [darker $color] ! set pos [$@canvas coords ${self}BASE] set span [expr $@max-$@min] set l [expr $orient?$@h:$@w] *************** *** 2449,2453 **** set y1 [expr [lindex $pos 3]-$value*($l-1)/$span-2] set y2 [expr $y1-2] ! $canvas coords ${self}KNOB \ [expr $x1+2] $y1 [expr $x1+$size-2] $y2 } { --- 2448,2452 ---- set y1 [expr [lindex $pos 3]-$value*($l-1)/$span-2] set y2 [expr $y1-2] ! $@canvas coords ${self}KNOB \ [expr $x1+2] $y1 [expr $x1+$size-2] $y2 } { *************** *** 2456,2460 **** set x2 [expr $x1+2] set y2 [expr $y1+$size] ! $canvas coords ${self}KNOB \ $x1 [expr $y1+2] $x2 [expr $y1+$size-2] } --- 2455,2459 ---- set x2 [expr $x1+2] set y2 [expr $y1+$size] ! $@canvas coords ${self}KNOB \ $x1 [expr $y1+2] $x2 [expr $y1+$size-2] } *************** *** 2474,2478 **** set coords [list $x1 $y3 [expr $x1+$xs] $y3] } ! $canvas create line $coords -dash [list 1 $eighth 1 $eighth] -width $thick -fill [darker $look(sliderbg)] }
--- 2473,2477 ---- set coords [list $x1 $y3 [expr $x1+$xs] $y3] } ! $@canvas create line $coords -dash [list 1 $eighth 1 $eighth] -width $thick -fill [darker $look(sliderbg)] }
*************** *** 2488,2492 **** set @clicking 0 if {[lindex $@first 1] != $y} { ! $canvas unfocus pd x$self float $@value } --- 2487,2491 ---- set @clicking 0 if {[lindex $@first 1] != $y} { ! $@canvas unfocus pd x$self float $@value } *************** *** 2494,2498 ****
def slider motion {x y mods} { ! set focused [expr ![string compare $self [canvas_focuser $canvas]]] if {!$focused} {return} set dx [expr $x-[lindex $@first 0]] --- 2493,2497 ----
def slider motion {x y mods} { ! set focused [expr ![string compare $self [canvas_focuser $@canvas]]] if {!$focused} {return} set dx [expr $x-[lindex $@first 0]] *************** *** 2637,2641 **** set x3 [expr $x1+$xs/4] set x4 [expr $x1+$xs-$xs/4] ! $canvas delete ${self}RMS for {set i 1} {$i<=40} {incr i} { set y [expr $y1 + ($led_size+1)*(41-$i) - ($led_size+1)/2] --- 2636,2640 ---- set x3 [expr $x1+$xs/4] set x4 [expr $x1+$xs-$xs/4] ! $@canvas delete ${self}RMS for {set i 1} {$i<=40} {incr i} { set y [expr $y1 + ($led_size+1)*(41-$i) - ($led_size+1)/2] *************** *** 2645,2649 **** $self item MASK rectangle $x3 $y1 $x4 $y1 -width 0 -fill [bluify $colour] if {!$@scale} {return} ! $canvas delete ${self}SCALE set lfont [list \ [lindex {courier helvetica times} $@fstyle] \ --- 2644,2648 ---- $self item MASK rectangle $x3 $y1 $x4 $y1 -width 0 -fill [bluify $colour] if {!$@scale} {return} ! $@canvas delete ${self}SCALE set lfont [list \ [lindex {courier helvetica times} $@fstyle] \ *************** *** 2674,2683 **** set x3 [expr $x1+$xs/4] set x4 [expr $x1+$xs-$xs/4] ! $canvas coords ${self}MASK $x3 $y1 $x4 $y ! $canvas delete ${self}PEAK set c [lindex $vu_col $j] if {!$j} {return} set y1 [expr $y1 + ($led_size+1)*(41-$j) - ($led_size+1)/2] ! $canvas create rectangle $x1 $y1 [expr $x1+$xs] [expr $y1+$led_size] \ -fill [parse_color $c] -tags ${self}PEAK -width 0 } --- 2673,2682 ---- set x3 [expr $x1+$xs/4] set x4 [expr $x1+$xs-$xs/4] ! $@canvas coords ${self}MASK $x3 $y1 $x4 $y ! $@canvas delete ${self}PEAK set c [lindex $vu_col $j] if {!$j} {return} set y1 [expr $y1 + ($led_size+1)*(41-$j) - ($led_size+1)/2] ! $@canvas create rectangle $x1 $y1 [expr $x1+$xs] [expr $y1+$led_size] \ -fill [parse_color $c] -tags ${self}PEAK -width 0 } *************** *** 2690,2694 **** class_new dropper {view} def dropper draw {} { ! set isnew [expr [llength [$canvas gettags ${self}BASE]] == 0] mset {x1 y1} [$self xy] set xs $@w --- 2689,2693 ---- class_new dropper {view} def dropper draw {} { ! set isnew [expr [llength [$@canvas gettags ${self}BASE]] == 0] mset {x1 y1} [$self xy] set xs $@w *************** *** 2703,2707 **** dnd bindtarget $@canvas.${self}DROP text/uri-list <Drop> "pd "x[list ${self}] symbol [ enquote %D ] ;"" } { ! $canvas coords $@canvas.${self}window [expr $x1 + 7] [expr $y1 - 2] $@canvas.${self}DROP configure -width $xs -height $xs -bg $colour -highlightbackground $lcolour -highlightcolor $colour } --- 2702,2706 ---- dnd bindtarget $@canvas.${self}DROP text/uri-list <Drop> "pd "x[list ${self}] symbol [ enquote %D ] ;"" } { ! $@canvas coords $@canvas.${self}window [expr $x1 + 7] [expr $y1 - 2] $@canvas.${self}DROP configure -width $xs -height $xs -bg $colour -highlightbackground $lcolour -highlightcolor $colour }