Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31952
Modified Files: Tag: devel_0_39 desire.tk defaults.ddrc Log Message: fixed wire draw
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.509 retrieving revision 1.1.2.510 diff -C2 -d -r1.1.2.509 -r1.1.2.510 *** desire.tk 15 Oct 2006 21:41:02 -0000 1.1.2.509 --- desire.tk 16 Oct 2006 13:39:07 -0000 1.1.2.510 *************** *** 416,420 ****
#temporary ! set leet 0
proc say {k args} { --- 416,420 ----
#temporary ! set leet 1
proc say {k args} { *************** *** 1621,1626 **** set x [expr (abs($x2-$x1) / 2) + $x1] set y [expr (abs($y2-$y1) / 2) + $y1] - # $c create oval [list [expr $x-2] [expr $y-2] [expr $x+2] [expr $y+2]] \ - # -fill blue -tags "POO" pd .$self "obj" $x $y set @action insert --- 1621,1624 ---- *************** *** 1632,1635 **** --- 1630,1647 ----
+ def Canvas chain_object {} { + if {[llength $@selection] == 1} { + + mset {x1 y1 x2 y2} [$@selection bbox] + set height [expr $y2 - $y1] + pd .$self "obj" $x1 [expr $y2 + 10] + set @action chain_obj + + } else { + return + } + + } + def Canvas Object {} {$self new_object obj} def Canvas Message {} {$self new_object msg; global canvas; set canvas(msg_isnew) 1} ;# ??? *************** *** 2006,2009 **** --- 2018,2029 ---- $@canvas action= none } + if {[$@canvas action] == "chain_obj"} { + set obj1_idx [$@canvas children_idx [$@canvas selection]] + set obj2_idx [$@canvas children_idx $self] + $@canvas connect [list $obj1_idx 0 $obj2_idx 0] + $@canvas action= none + #puts " [lindex [$@canvas children] $obj2_idx]" + #$@canvas selection= [lindex [$@canvas children] $obj2_idx] + } }
*************** *** 2300,2303 **** --- 2320,2324 ---- } insert {} + chain_obj {} none {} default {$@action motion $x $y $f $target} *************** *** 2794,2797 **** --- 2815,2819 ---- none {} insert {} + chain_obj {} default {$@action unclick $x $y $f $target} } *************** *** 2825,2828 **** --- 2847,2851 ---- none {} insert {} + chain_obj {} default {$@action unclick $x $y $f $target} } *************** *** 3302,3306 **** def Box connect_in {} {}
! def Box draw {} {$self draw_box} def Box draw_box {} {} def Box edit {} {} --- 3325,3335 ---- def Box connect_in {} {}
! def Box draw {} { ! #if {[$@canvas action] == "chain_obj"} { ! # $@canvas deselect_all ! # $@canvas selection= $self ! #} ! $self draw_box ! } def Box draw_box {} {} def Box edit {} {}
Index: defaults.ddrc =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/defaults.ddrc,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** defaults.ddrc 13 Oct 2006 22:27:48 -0000 1.1.2.6 --- defaults.ddrc 16 Oct 2006 13:39:08 -0000 1.1.2.7 *************** *** 135,138 **** --- 135,140 ---- tidy_up {} undo Ctrl+z + insert_object Ctrl+i + chain_object Ctrl+6 } Client {