Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5609
Modified Files: Tag: devel_0_39 desire.c desire.tk Log Message: all object ids are now prefixed by x
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.109 retrieving revision 1.1.2.110 diff -C2 -d -r1.1.2.109 -r1.1.2.110 *** desire.tk 7 Nov 2005 01:09:44 -0000 1.1.2.109 --- desire.tk 7 Nov 2005 01:26:53 -0000 1.1.2.110 *************** *** 635,639 ****
def view item {suffix type coords args} { ! set c .x$@canvas.c set ss $self$suffix if {![llength [$c gettags $ss]]} { --- 635,639 ----
def view item {suffix type coords args} { ! set c .$@canvas.c set ss $self$suffix if {![llength [$c gettags $ss]]} { *************** *** 646,650 **** }
! def view item_delete {} {.x$@canvas.c delete $self} def* view delete {} {$self erase; $self _delete; io_erase $self} def* view erase {} {$self item_delete} --- 646,650 ---- }
! def view item_delete {} {.$@canvas.c delete $self} def* view delete {} {$self erase; $self _delete; io_erase $self} def* view erase {} {$self item_delete} *************** *** 700,704 **** set filename [tk_getSaveFile -initialfile pd.ps -defaultextension .ps \ -filetypes { {{postscript} {.ps}} }] ! if {$filename != ""} {.x$self.c postscript -file $filename} }
--- 700,704 ---- set filename [tk_getSaveFile -initialfile pd.ps -defaultextension .ps \ -filetypes { {{postscript} {.ps}} }] ! if {$filename != ""} {.$self.c postscript -file $filename} }
*************** *** 807,814 **** }
! # .xc47f00d.c -> c47f00d (tk canvas to $_ canvas) proc c2self {name} { regsub {.c$} $name "" name ! regsub {^.x} $name "" name return $name } --- 807,814 ---- }
! # .xc47f00d.c -> xc47f00d (tk canvas to $_ canvas) proc c2self {name} { regsub {.c$} $name "" name ! regsub {^.} $name "" name return $name } *************** *** 819,826 **** def canvas editmode= {mode} { global look ! .x$self.m.edit entryconfigure "Edit mode" -indicatoron $mode set @editmode $mode ! catch {.x$self.bbar.edit configure -image icon_mode_$mode} ! .x$self.c configure -background [if $@editmode {list $look(canvasbgedit)} {list $look(canvasbgrun)}] }
--- 819,826 ---- def canvas editmode= {mode} { global look ! .$self.m.edit entryconfigure "Edit mode" -indicatoron $mode set @editmode $mode ! catch {.$self.bbar.edit configure -image icon_mode_$mode} ! .$self.c configure -background [if $@editmode {list $look(canvasbgedit)} {list $look(canvasbgrun)}] }
*************** *** 832,837 **** super global pd_opendir pd_tearoff OS cmdline canvasmenu focus ! set name .x$self ! set c .x$self.c set focus(canvas) $self toplevel $name -menu $name.m --- 832,837 ---- super global pd_opendir pd_tearoff OS cmdline canvasmenu focus ! set name .$self ! set c .$self.c set focus(canvas) $self toplevel $name -menu $name.m *************** *** 889,893 ****
def canvas bind {eventtype selector args} { ! set c .x$self.c bind $c $eventtype [concat [list $self $selector] $args ; $self statusbar_draw %x %y] } --- 889,893 ----
def canvas bind {eventtype selector args} { ! set c .$self.c bind $c $eventtype [concat [list $self $selector] $args ; $self statusbar_draw %x %y] } *************** *** 895,899 **** def canvas new_binds {} { global OS ! set c .x$self.c $self bind <Button> click %x %y %b 0 $self bind <Shift-Button> click %x %y %b 1 --- 895,899 ---- def canvas new_binds {} { global OS ! set c .$self.c $self bind <Button> click %x %y %b 0 $self bind <Shift-Button> click %x %y %b 1 *************** *** 945,952 **** }
! def canvas scroll {axis diff} {.x$self.c [list $axis]view scroll $diff units}
def canvas new_menubar {editable} { ! set name .x$self global pd_opendir pd_tearoff OS cmdline canvasmenu _ set m $name.m --- 945,952 ---- }
! def canvas scroll {axis diff} {.$self.c [list $axis]view scroll $diff units}
def canvas new_menubar {editable} { ! set name .$self global pd_opendir pd_tearoff OS cmdline canvasmenu _ set m $name.m *************** *** 1004,1008 **** # to switch between edit/run mode with ctrl+1 -chun def canvas editmodeswitch {args} { ! set name .x$self if {$@editmode} { set @editmode 0; --- 1004,1008 ---- # to switch between edit/run mode with ctrl+1 -chun def canvas editmodeswitch {args} { ! set name .$self if {$@editmode} { set @editmode 0; *************** *** 1018,1022 **** # LATER also cut/copy/paste def canvas fix_edit_menu {} { ! set e .x$self.m.edit if {$name==$@undocanvas && $@undoaction!="no"} { $e entryconfigure "Undo*" -state normal -label "Undo $@undoaction" --- 1018,1022 ---- # LATER also cut/copy/paste def canvas fix_edit_menu {} { ! set e .$self.m.edit if {$name==$@undocanvas && $@undoaction!="no"} { $e entryconfigure "Undo*" -state normal -label "Undo $@undoaction" *************** *** 1034,1039 **** def* canvas ctrlkey {key shift} { global accels focus ! set top .x$self ! set name .x$self.c set key [string tolower $key] # for quit/save/undo --- 1034,1039 ---- def* canvas ctrlkey {key shift} { global accels focus ! set top .$self ! set name .$self.c set key [string tolower $key] # for quit/save/undo *************** *** 1064,1069 **** def canvas altkey {key iso} { global accels ! set name .x$self.c ! set topname .x$self set key [string tolower $key] if {[info exists accels(alt+$key)]} { --- 1064,1069 ---- def canvas altkey {key iso} { global accels ! set name .$self.c ! set topname .$self set key [string tolower $key] if {[info exists accels(alt+$key)]} { *************** *** 1106,1110 **** set nplus [expr $n==1 ? 1 : $n-1] mset {x1 y1} [$self xy] ! set c .x$@canvas.c for {set i 0} {$i<$n} {incr i} { set onset [expr $x1 + ($@xs-$look(iowidth)) * $i / $nplus] --- 1106,1110 ---- set nplus [expr $n==1 ? 1 : $n-1] mset {x1 y1} [$self xy] ! set c .$@canvas.c for {set i 0} {$i<$n} {incr i} { set onset [expr $x1 + ($@xs-$look(iowidth)) * $i / $nplus] *************** *** 1128,1132 **** }
! def io erase {} {.x$@canvas.c delete ${self}i ${self}o}
#-----------------------------------------------------------------------------------# --- 1128,1132 ---- }
! def io erase {} {.$@canvas.c delete ${self}i ${self}o}
#-----------------------------------------------------------------------------------# *************** *** 1148,1152 **** if {$@edit} {
! set t .x$@canvas.c.${self}text $t configure -width [expr [string length $@text]+1] } { --- 1148,1152 ---- if {$@edit} {
! set t .$@canvas.c.${self}text $t configure -width [expr [string length $@text]+1] } { *************** *** 1167,1173 **** $@canvas obj_in_edit= $self set @selected? 1 ! .x$@canvas.c delete ${self}TEXT set @oldtext $@text ! set t .x$@canvas.c.${self}text $self update_size $self changed --- 1167,1173 ---- $@canvas obj_in_edit= $self set @selected? 1 ! .$@canvas.c delete ${self}TEXT set @oldtext $@text ! set t .$@canvas.c.${self}text $self update_size $self changed *************** *** 1178,1184 **** bind $t <Control-Return> "$self key %W %x %y 10 %A 0" bind $t <Return> "$self unedit" ! set t .x$@canvas.c.${self}text mset {cx cy} [$self xy] ! .x$@canvas.c create window [expr $cx+1] [expr $cy+1] \ -window $t -anchor nw -tags "${self}text $self" $self draw --- 1178,1184 ---- bind $t <Control-Return> "$self key %W %x %y 10 %A 0" bind $t <Return> "$self unedit" ! set t .$@canvas.c.${self}text mset {cx cy} [$self xy] ! .$@canvas.c create window [expr $cx+1] [expr $cy+1] \ -window $t -anchor nw -tags "${self}text $self" $self draw *************** *** 1233,1237 **** # } # foreach obj $_($canvas:selection) { ! # .x$canvas.c itemconfigure ${obj}BASE -outline $look(objectframe3) # } # set _($canvas:selection) {} --- 1233,1237 ---- # } # foreach obj $_($canvas:selection) { ! # .$canvas.c itemconfigure ${obj}BASE -outline $look(objectframe3) # } # set _($canvas:selection) {} *************** *** 1266,1270 **** io_draw $self if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} ! set c .x$@canvas.c $c itemconfigure ${self}BASE -outline $frcol -dash \ [if {$@valid} {list 8 8 8 8} {list}] --- 1266,1270 ---- io_draw $self if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)} ! set c .$@canvas.c $c itemconfigure ${self}BASE -outline $frcol -dash \ [if {$@valid} {list 8 8 8 8} {list}] *************** *** 1277,1281 **** if {!$@edit} {return} set @edit 0 ! set c .x$@canvas.c set t $c.${self}text set @text [$t get 1.0 1.end] --- 1277,1281 ---- if {!$@edit} {return} set @edit 0 ! set c .$@canvas.c set t $c.${self}text set @text [$t get 1.0 1.end] *************** *** 1284,1288 **** set l {} foreach char [split $@text ""] {lappend l [scan $char %c]} ! pd .x$@canvas text_setto !$self $l focus $c } --- 1284,1288 ---- set l {} foreach char [split $@text ""] {lappend l [scan $char %c]} ! pd .$@canvas text_setto !$self $l focus $c } *************** *** 1338,1342 ****
#-----------------------------------------------------------------------------------# ! def* canvas window_title {title} {wm title .x$self $title} #def* canvas add {i obj} {lset @children $i $obj} #def* canvas del {i} {lset @children $i ""} --- 1338,1342 ----
#-----------------------------------------------------------------------------------# ! def* canvas window_title {title} {wm title .$self $title} #def* canvas add {i obj} {lset @children $i $obj} #def* canvas del {i} {lset @children $i ""} *************** *** 1393,1397 **** set @y1 [expr $@y1+$dy] mset {u v} [$self xy] ! .x$@canvas.c move $self [expr $u-$x] [expr $v-$y] }
--- 1393,1397 ---- set @y1 [expr $@y1+$dy] mset {u v} [$self xy] ! .$@canvas.c move $self [expr $u-$x] [expr $v-$y] }
*************** *** 1400,1404 **** global look mset {cx cy} [$self xy] ! set c .x$@canvas.c set ports 0; catch {switch $type {i {set ports $@ninlets} o {set ports $@noutlets}}} if {$ports==0} return --- 1400,1404 ---- global look mset {cx cy} [$self xy] ! set c .$@canvas.c set ports 0; catch {switch $type {i {set ports $@ninlets} o {set ports $@noutlets}}} if {$ports==0} return *************** *** 1417,1421 **** global font global tooltip look ! set c .x$self.c set x [$c canvasx $x] set y [$c canvasy $y] --- 1417,1421 ---- global font global tooltip look ! set c .$self.c set x [$c canvasx $x] set y [$c canvasy $y] *************** *** 1485,1489 **** #-----------------------------------------------------------------------------------# def canvas identify_target {x y b f label} { ! set c .x$self.c set stack [lreverse [$c find overlapping \ [expr $x-2] [expr $y-2] [expr $x+2] [expr $y+2]]] --- 1485,1489 ---- #-----------------------------------------------------------------------------------# def canvas identify_target {x y b f label} { ! set c .$self.c set stack [lreverse [$c find overlapping \ [expr $x-2] [expr $y-2] [expr $x+2] [expr $y+2]]] *************** *** 1511,1515 **** class_new statusbar {view}
! def statusbar widget {} {return .x$@canvas.stat}
def statusbar addw {row a b text args} { --- 1511,1515 ---- class_new statusbar {view}
! def statusbar widget {} {return .$@canvas.stat}
def statusbar addw {row a b text args} { *************** *** 1541,1545 ****
def statusbar draw {x y} { ! set c .x$@canvas.c set f [$self widget] set x [$c canvasx $x] --- 1541,1545 ----
def statusbar draw {x y} { ! set c .$@canvas.c set f [$self widget] set x [$c canvasx $x] *************** *** 1573,1577 **** #-----------------------------------------------------------------------------------# def* canvas click_on_wire {x y b f id} { ! set c .x$self.c if {$f&8} {post "rightclick wire"} #$c create line $xys -tags $self -width $thick \ --- 1573,1577 ---- #-----------------------------------------------------------------------------------# def* canvas click_on_wire {x y b f id} { ! set c .$self.c if {$f&8} {post "rightclick wire"} #$c create line $xys -tags $self -width $thick \ *************** *** 1594,1598 ****
def* canvas clickedit {x y b f} { ! set c .x[$self canvas].c mset {type id} [$self identify_target $x $y $b $f "click"] puts "object_in_edit: $@obj_in_edit id:$id" --- 1594,1598 ----
def* canvas clickedit {x y b f} { ! set c .[$self canvas].c mset {type id} [$self identify_target $x $y $b $f "click"] puts "object_in_edit: $@obj_in_edit id:$id" *************** *** 1636,1640 **** def* canvas click {x y b f} { global look focus ! set c .x$self.c focus $c set x [$c canvasx $x] --- 1636,1640 ---- def* canvas click {x y b f} { global look focus ! set c .$self.c focus $c set x [$c canvasx $x] *************** *** 1653,1657 **** def canvas unclick {x y b} { global font look offset_wire ! set c .x$self.c set cx [$c canvasx $x] set cy [$c canvasy $y] --- 1653,1657 ---- def canvas unclick {x y b} { global font look offset_wire ! set c .$self.c set cx [$c canvasx $x] set cy [$c canvasy $y] *************** *** 1769,1773 ****
def canvas adjust_scrollbars {} { ! set c .x$self.c set size [$c bbox all] if {$size != ""} { --- 1769,1773 ----
def canvas adjust_scrollbars {} { ! set c .$self.c set size [$c bbox all] if {$size != ""} { *************** *** 1795,1799 ****
def canvas checkgeometry {} { ! set topname .x$self set boo [winfo geometry $topname.c] set boo2 [wm geometry $topname] --- 1795,1799 ----
def canvas checkgeometry {} { ! set topname .$self set boo [winfo geometry $topname.c] set boo2 [wm geometry $topname] *************** *** 1810,1814 **** def canvas key {x y key iso shift} { global OS ! set c .x$self.c $self hide_tooltip switch $OS { --- 1810,1814 ---- def canvas key {x y key iso shift} { global OS ! set c .$self.c $self hide_tooltip switch $OS { *************** *** 1840,1844 ****
def canvas keyup {x y key iso shift} { ! set canvas .x$self.c if {$iso != ""} {scan $iso %c key} if {[string length $@focus] > 0} { --- 1840,1844 ----
def canvas keyup {x y key iso shift} { ! set canvas .$self.c if {$iso != ""} {scan $iso %c key} if {[string length $@focus] > 0} { *************** *** 2825,2829 **** set border 4 set x [expr $x+$border+4] ! set c .x$self.c $c create text $x $y -text $text -anchor w -tags tooltip_fg mset {x1 y1 x2 y2} [$c bbox tooltip_fg] --- 2825,2829 ---- set border 4 set x [expr $x+$border+4] ! set c .$self.c $c create text $x $y -text $text -anchor w -tags tooltip_fg mset {x1 y1 x2 y2} [$c bbox tooltip_fg] *************** *** 2844,2848 **** def canvas hide_tooltip {} { global tooltip ! set c .x$self.c $c delete tooltip_bg tooltip_fg set tooltip(visible) 0 --- 2844,2848 ---- def canvas hide_tooltip {} { global tooltip ! set c .$self.c $c delete tooltip_bg tooltip_fg set tooltip(visible) 0
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.49 retrieving revision 1.1.2.50 diff -C2 -d -r1.1.2.49 -r1.1.2.50 *** desire.c 6 Nov 2005 21:09:24 -0000 1.1.2.49 --- desire.c 7 Nov 2005 01:26:53 -0000 1.1.2.50 *************** *** 673,676 **** --- 673,677 ---- { char namebuf[MAXPDSTRING]; + char foo[MAXPDSTRING]; t_canvasenvironment *env = canvas_getenv(x); if (env->ce_argc) *************** *** 690,696 **** } else namebuf[0] = 0; - char foo[666]; sprintf(foo,"%s%c%s - %s",x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf, ! canvas_getdir(x)->s_name); sys_mgui(x,"window_title","s",gensym(foo)); } --- 691,696 ---- } else namebuf[0] = 0; sprintf(foo,"%s%c%s - %s",x->gl_name->s_name, (x->gl_dirty? '*' : ' '), namebuf, ! canvas_getdir(x)->s_name); sys_mgui(x,"window_title","s",gensym(foo)); } *************** *** 12015,12019 **** t_text *o; int i; ! if (sscanf(atom_getsymbol(argv)->s_name,"!%lx",(long*)&o)<1) {error("gargamel was here"); return;} for (i=0; i<argc-1; i++) str[i] = atom_getfloat(argv+i+1); str[argc-1]=0; --- 12015,12019 ---- t_text *o; int i; ! if (sscanf(atom_getsymbol(argv)->s_name,"!x%lx",(long*)&o)<1) {error("gargamel was here"); return;} for (i=0; i<argc-1; i++) str[i] = atom_getfloat(argv+i+1); str[argc-1]=0; *************** *** 12259,12263 **** } binbuf_gettext(buf,&s,&n); ! sys_vgui("update_object %lx {%.*s}\n", (long)self,n,s); sys_mgui(self,"ninlets=","i", obj_ninlets((t_text *)self)); sys_mgui(self,"noutlets=","i",obj_noutlets((t_text *)self)); --- 12259,12263 ---- } binbuf_gettext(buf,&s,&n); ! sys_vgui("update_object x%lx {%.*s}\n", (long)self,n,s); sys_mgui(self,"ninlets=","i", obj_ninlets((t_text *)self)); sys_mgui(self,"noutlets=","i",obj_noutlets((t_text *)self)); *************** *** 12269,12273 **** char *bar = foo; t_gobj *y; ! glist_each(y,(t_canvas *)self) bar+=sprintf(bar,"%lx ",(long)y); sys_mgui((t_gobj *)self,"children=","S",foo); } --- 12269,12273 ---- char *bar = foo; t_gobj *y; ! glist_each(y,(t_canvas *)self) bar+=sprintf(bar,"x%lx ",(long)y); sys_mgui((t_gobj *)self,"children=","S",foo); } *************** *** 12280,12284 **** va_list val; va_start(val,fmt); ! i+=snprintf(buf+i,n-i,"%x %s", (unsigned)self, sel); if (i>=n) goto over; while (*fmt) { --- 12280,12284 ---- va_list val; va_start(val,fmt); ! i+=snprintf(buf+i,n-i,"x%x %s", (unsigned)self, sel); if (i>=n) goto over; while (*fmt) {