Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31106
Modified Files:
Tag: devel_0_39
desire.tk desire.c
Log Message:
added a sys_mgui call in canvas_connect in desire.c
added def wire init, def* box init, def* box connect_out, def* box
connect_in in desire.tk
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.120
retrieving revision 1.1.2.121
diff -C2 -d -r1.1.2.120 -r1.1.2.121
*** desire.tk 12 Nov 2005 09:33:31 -0000 1.1.2.120
--- desire.tk 12 Nov 2005 19:46:33 -0000 1.1.2.121
***************
*** 875,878 ****
--- 875,879 ----
set @obj_in_edit {}
set @dehighlight {}
+ set @wires {}
global manager
post %s "canvas init: subscribing to $manager"
***************
*** 886,889 ****
--- 887,898 ----
def* canvas ninlets= {n} {}
def* canvas noutlets= {n} {}
+ #how can canvas_wires= know which list in $n is new?
+ #i mean, new connection does not seem to be added to the end or the beginning
+ #of $n, but ordered according the the wire_from order id
+ def* canvas wires= {n} {}
+ #so, maybe like this would work?
+ def* canvas wires_new {whoout outno whoin inno} {
+ wire_new $@children $whoout $outno $whoin $inno
+ }
def canvas focus {} {return $@focus}
***************
*** 1123,1127 ****
#-----------------------------------------------------------------------------------#
! class_new textbox {view}
def textbox ninlets= {v} {set @ninlets $v}
--- 1132,1136 ----
#-----------------------------------------------------------------------------------#
! class_new textbox {box}
def textbox ninlets= {v} {set @ninlets $v}
***************
*** 1692,1697 ****
mset {from outlet} $@wire_from
mset {to inlet} $@wire_to
! pd .$self connect [lsearch $@children $from] $inlet \
! [lsearch $@children $to] $outlet
}
puts "connect $@wire_from $@wire_to"
--- 1701,1706 ----
mset {from outlet} $@wire_from
mset {to inlet} $@wire_to
! pd .$self connect [lsearch $@children $from] $outlet \
! [lsearch $@children $to] $inlet
}
puts "connect $@wire_from $@wire_to"
***************
*** 1937,1942 ****
--- 1946,1973 ----
#-----------------------------------------------------------------------------------#
+ class_new box {view}
class_new wire {view}
+ def* box init {args} {
+ super
+ }
+
+ def* box connect_out {} {
+
+ }
+
+ def* box connect_in {} {
+
+ }
+
+ def* wire init {children from outno to inno} {
+ super
+ set from_obj [lindex $children $from]
+ set to_obj [lindex $children $to]
+ puts "......from:$from_obj outlet:$outno to:$to_obj inlet:$inno"
+ # no time to carry on for now......
+
+ }
+
def wire draw {} {
global look
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.52
retrieving revision 1.1.2.53
diff -C2 -d -r1.1.2.52 -r1.1.2.53
*** desire.c 12 Nov 2005 16:25:57 -0000 1.1.2.52
--- desire.c 12 Nov 2005 19:46:33 -0000 1.1.2.53
***************
*** 3532,3535 ****
--- 3532,3536 ----
{
int whoout = fwhoout, outno = foutno, whoin = fwhoin, inno = finno;
+ int whoout2 = fwhoout, whoin2 = fwhoin;
t_gobj *src = 0, *sink = 0;
t_object *objsrc, *objsink;
***************
*** 3555,3559 ****
--- 3556,3562 ----
while (inno >= obj_ninlets(objsink))
inlet_new(objsink, &objsink->ob_pd, &s_, &s_);
+ post ("%d %d %d %d", whoout2, outno, whoin2, inno);
post("canvas_connect: objsrc=%d outno=%d objsink=%d inno=%d",objsrc,outno,objsink,inno);
+ sys_mgui((t_canvas *)x,"wires_new","iiii", whoout2, outno, whoin2, inno);
gobj_changed(x,"");
if (!(oc = obj_connect(objsrc, outno, objsink, inno))) goto bad;