Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27715
Modified Files: Tag: devel_0_39 desire.tk Log Message: item_delete added
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.41 retrieving revision 1.1.2.42 diff -C2 -d -r1.1.2.41 -r1.1.2.42 *** desire.tk 11 Sep 2005 11:31:49 -0000 1.1.2.41 --- desire.tk 13 Sep 2005 09:08:23 -0000 1.1.2.42 *************** *** 535,539 ****
pdtk_text_new \ ! $canvas.c ${object_id}TEXT [expr $_($object_id:cx)+2] [expr $_($object_id:cy)+2] \ $obj_name $font(size) #000000 } --- 535,539 ----
pdtk_text_new \ ! $canvas.c $object_id [expr $_($object_id:cx)+2] [expr $_($object_id:cy)+2] \ $obj_name $font(size) #000000 } *************** *** 1052,1057 **** set _($self:current_x) 30 set _($self:current_y) 30 ! set _($self:editable) $editable ! puts "pdtk_canvas_new::: $name $width $height $geometry $editable" }
--- 1052,1067 ---- set _($self:current_x) 30 set _($self:current_y) 30 ! #set _($self:editable) $editable ! ! #if {$editable == 1} { ! # puts "editable == 1" ! # set _($self:mode) "edit" ! #} else { ! # set _($self:mode) "run" ! #} ! ! puts "self = $self" ! ! #puts "pdtk_canvas_new::: $name $width $height $geometry $editable" }
*************** *** 1257,1261 **** $canvas coords ${self}i$i $points } { ! $canvas create rectangle $points -tags "${self}i ${self}i$i" -outline $look(inletfg) } } --- 1267,1271 ---- $canvas coords ${self}i$i $points } { ! $canvas create rectangle $points -tags "${self}i ${self}i$i $self" -outline $look(inletfg) } } *************** *** 1269,1273 **** $canvas coords ${self}o$i $points } { ! $canvas create rectangle $points -tags "${self}o ${self}o$i" -outline $look(outletfg) } } --- 1279,1283 ---- $canvas coords ${self}o$i $points } { ! $canvas create rectangle $points -tags "${self}o ${self}o$i $self" -outline $look(outletfg) } } *************** *** 1282,1290 **** #-----------------------------------------------------------------------------------# # create a new text object ! proc pdtk_text_new {canvas myname x y text font color} { $canvas create text $x $y \ -font [format -*-courier-medium--normal--%d-* $font] \ ! -tags $myname -text $text -fill $color -anchor nw ! foreach {x1 y1 x2 y2} [$canvas bbox $myname] {} }
--- 1292,1300 ---- #-----------------------------------------------------------------------------------# # create a new text object ! proc pdtk_text_new {canvas self x y text font color} { $canvas create text $x $y \ -font [format -*-courier-medium--normal--%d-* $font] \ ! -tags "${self}TEXT $self" -text $text -fill $color -anchor nw ! foreach {x1 y1 x2 y2} [$canvas bbox ${self}TEXT] {} }
*************** *** 1319,1323 **** text ${canvas}.${self}text -height 1 -width $name_len -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ ! -font [format -*-courier-medium--normal--%d-* $font_size]
set _(self) $self --- 1329,1333 ---- text ${canvas}.${self}text -height 1 -width $name_len -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ ! -font [format -*-courier-medium--normal--%d-* $font_size] \
set _(self) $self *************** *** 1330,1334 **** $canvas create window [expr $@cx+1] [expr $@cy+1] \ ! -window ${canvas}.${self}text -anchor nw -tags "${self}text" ${canvas}.${self}text configure -pady 0 ${canvas}.${self}text insert 1.0 $text --- 1340,1344 ---- $canvas create window [expr $@cx+1] [expr $@cy+1] \ ! -window ${canvas}.${self}text -anchor nw -tags "${self}text $self" ${canvas}.${self}text configure -pady 0 ${canvas}.${self}text insert 1.0 $text *************** *** 1364,1367 **** --- 1374,1378 ---- #proc object_new {} { class_new objectbox { + global offset _ set canvas $_(focus) *************** *** 1461,1465 **** } } ! pdtk_text_new $canvas ${self}TEXT [expr $@cx+2] [expr $@cy+2] \ $obj_name $font(size) #000000 } --- 1472,1479 ---- } } ! #pdtk_text_new $canvas ${self}TEXT [expr $@cx+2] [expr $@cy+2] \ ! # $obj_name $font(size) #000000 ! ! pdtk_text_new $canvas $self [expr $@cx+2] [expr $@cy+2] \ $obj_name $font(size) #000000 } *************** *** 1483,1491 **** set canvas_id [canvastosym $canvas] foreach obj $_($canvas_id:selection) { ! objectbox_delete $obj $canvas ! #$canvas delete ${obj}BASE ${obj}BASE2 ${obj}BASE3 ! #$canvas delete ${obj}i ${obj}o ! #$canvas delete ${obj}TEXT ${obj}text destroy ${canvas}.${obj}text } --- 1497,1503 ---- set canvas_id [canvastosym $canvas] foreach obj $_($canvas_id:selection) { ! item_delete $obj $canvas destroy ${canvas}.${obj}text + } *************** *** 2473,2477 **** proc item {self canvas suffix type coords args} { if {![llength [$canvas gettags ${self}${suffix}]]} { ! eval [concat [list $canvas create $type $coords -tags ${self}$suffix] $args] } { eval [concat [list $canvas itemconfigure ${self}$suffix] $args] --- 2485,2490 ---- proc item {self canvas suffix type coords args} { if {![llength [$canvas gettags ${self}${suffix}]]} { ! eval [concat [list $canvas create $type $coords -tags "${self}$suffix $self"] $args] ! #eval [concat [list $canvas create $type $coords -tags ${self}$suffix] $args] } { eval [concat [list $canvas itemconfigure ${self}$suffix] $args] *************** *** 2480,2483 **** --- 2493,2500 ---- }
+ proc item_delete {self canvas} { + $canvas delete $self + } + def shadow draw {canvas coords} { global look