[PD-cvs] pd/src desire.tk,1.1.2.538,1.1.2.539
chunlee
chunlee at users.sourceforge.net
Mon Oct 30 19:32:48 CET 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30661
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
some work on object insertion
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.538
retrieving revision 1.1.2.539
diff -C2 -d -r1.1.2.538 -r1.1.2.539
*** desire.tk 30 Oct 2006 16:41:28 -0000 1.1.2.538
--- desire.tk 30 Oct 2006 18:32:44 -0000 1.1.2.539
***************
*** 2438,2441 ****
--- 2438,2442 ----
def Canvas motion_move {oldpos x y} {
mset {ox oy} $oldpos
+ if {$@keynav} {$@active draw}
foreach obj $@selection {
if {[[$obj class] <= Box]} {
***************
*** 2449,2453 ****
def Canvas motion_imove {oldpos x y} {
mset {ox oy} $oldpos
! if {[llength $@selection] == 1} {set obj $@selection} else {return}
if {[[$obj class] <= Box]} {
if {[$obj class] == "Canvas"} {
--- 2450,2466 ----
def Canvas motion_imove {oldpos x y} {
mset {ox oy} $oldpos
! if {[llength $@selection] == 1} {
! set obj $@selection
! set in_objs $@selection
! set out_objs $@selection
! } else {
! if {![llength $@keynav_iosel_i] || ![llength $@keynav_iosel_o]} {
! return
! } else {
! set obj [lindex $@keynav_iosel_i 0]
! set in_objs $@keynav_iosel_i
! set out_objs $@keynav_iosel_o
! }
! }
if {[[$obj class] <= Box]} {
if {[$obj class] == "Canvas"} {
***************
*** 2458,2462 ****
mset {type id detail} [$self identify_target $x $y 0]
if {$type == "wire"} {
- #$self selection_wire= $id
set wire2 [$self get_wire $id]
mset {obj1 outlet obj2 inlet} [$id report]
--- 2471,2474 ----
***************
*** 2464,2478 ****
set obj1_idx [$self children_idx $obj1]
set obj2_idx [$self children_idx $obj2]
! set obj3_idx [$self children_idx $obj]
! set w1 [list $obj1_idx $outlet $obj3_idx 0]
! set w2 [list $obj3_idx 0 $obj2_idx $inlet]
! if {[lsearch $@wires $w1] == -1} {$self connect $w1}
! if {[lsearch $@wires $w2] == -1} {$self connect $w2}
! #$self connect [list $obj1_idx $outlet $obj3_idx 0]
! #$self connect [list $obj3_idx 0 $obj2_idx $inlet]
set @action move
}
! $obj move [expr $x-$ox] [expr $y-$oy]
} else {
puts "Canvas motion warning: trying to move non-Box explicitly"
--- 2476,2503 ----
set obj1_idx [$self children_idx $obj1]
set obj2_idx [$self children_idx $obj2]
! foreach obj $in_objs {
! set obj3_idx [$self children_idx $obj]
! if {![llength [$obj ioselect]]} {
! set port 0
! } else {
! set port [lindex [$obj ioselect] 0]
! }
! set w1 [list $obj1_idx $outlet $obj3_idx $port]
! if {[lsearch $@wires $w1] == -1} {$self connect $w1}
! }
! foreach obj $out_objs {
! set obj3_idx [$self children_idx $obj]
! if {![llength [$obj ioselect]]} {
! set port 0
! } else {
! set port [lindex [$obj ioselect] 0]
! }
! set w2 [list $obj3_idx $port $obj2_idx $inlet]
! if {[lsearch $@wires $w2] == -1} {$self connect $w2}
! }
set @action move
}
! foreach obj $@selection {$obj move [expr $x-$ox] [expr $y-$oy]}
} else {
puts "Canvas motion warning: trying to move non-Box explicitly"
***************
*** 3710,3713 ****
--- 3735,3742 ----
}
+
+ def Box ioselect= {type port} {set @ioselect [list $type $port]}
+ def Box ioselect {} {return $@ioselect}
+
def Box wires {} {return $@wires}
More information about the Pd-cvs
mailing list