Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9366
Modified Files: Tag: desiredata desire.tk Log Message: fix for grabing Slider
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.164 retrieving revision 1.1.2.600.2.165 diff -C2 -d -r1.1.2.600.2.164 -r1.1.2.600.2.165 *** desire.tk 11 Jan 2007 18:38:18 -0000 1.1.2.600.2.164 --- desire.tk 11 Jan 2007 22:05:00 -0000 1.1.2.600.2.165 *************** *** 2755,2758 **** --- 2755,2759 ---- # outlet $id $outlet : an outlet of an object # wire $id : a wire + # label $id : a label # nothing : nothing def Canvas identify_target {x y f} { *************** *** 2787,2790 **** --- 2788,2798 ---- } mset {x1 y1 x2 y2} [$id bbox] + if {[regexp {^x[0-9a-f]{6,8}LABEL} $tags label]} { + if {$x>$x1 && $x<$x2 && $y>$y1 && $y<$y2} { + return [list "object" $id] + } else { + return [list "label" $id] + } + } set outs [$id noutlets] set ins [$id ninlets] *************** *** 3634,3637 **** --- 3642,3646 ---- wire {$self click_on_wire $id $f $x $y} nothing {$self click_on_nothing $f $target $x $y; return} + label {$self click_on_object $id $f} default {error "BORK: $type"} } *************** *** 5465,5469 **** set canvas [$self get_canvas] mset {type id detail} [$canvas identify_target $x $y $f] ! if {$type != "object"} {return} $canvas focus= $self set @click_at [list $x $y] --- 5474,5478 ---- set canvas [$self get_canvas] mset {type id detail} [$canvas identify_target $x $y $f] ! if {$type == "label"} {return} $canvas focus= $self set @click_at [list $x $y]