Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28135
Modified Files: Tag: devel_0_39 desire.tk Log Message: replacing some bugs by some others
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.50 retrieving revision 1.1.2.51 diff -C2 -d -r1.1.2.50 -r1.1.2.51 *** desire.tk 14 Sep 2005 00:29:27 -0000 1.1.2.50 --- desire.tk 14 Sep 2005 01:10:36 -0000 1.1.2.51 *************** *** 45,49 **** upvar $listvar lv set name ${class}_$selector ! if {[info procs $name} {lappend lv $name} foreach super $_($class:_super) {lookup_method $super $selector lv} } --- 45,49 ---- upvar $listvar lv set name ${class}_$selector ! if {[llength [info procs $name]]} {lappend lv $name} foreach super $_($class:_super) {lookup_method $super $selector lv} } *************** *** 945,951 **** toplevel $name -menu $name.m wm geometry $name $geometry ! canvas $name.c \ ! -width $width -height $height \ ! -background white \ -yscrollcommand "$name.scrollvert set" \ -xscrollcommand "$name.scrollhort set" \ --- 945,949 ---- toplevel $name -menu $name.m wm geometry $name $geometry ! canvas $name.c -width $width -height $height -background white \ -yscrollcommand "$name.scrollvert set" \ -xscrollcommand "$name.scrollhort set" \ *************** *** 1352,1360 **** def text create {canvas font_size text} { global look font ! set @name_len [string length $text] ! object_update_size $self objectbox_draw $self $canvas set t $canvas.${self}text ! text $t -height 1 -width $name_len -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ -font [format -*-courier-medium--normal--%d-* $font_size] \ --- 1350,1358 ---- def text create {canvas font_size text} { global look font ! set @text $text ! objectbox_update_size $self objectbox_draw $self $canvas set t $canvas.${self}text ! text $t -height 1 -width [llength $@text] -relief flat \ -bg ${look(objectbg)} -borderwidth 0 \ -font [format -*-courier-medium--normal--%d-* $font_size] \ *************** *** 1382,1392 **** def text key {canvas widget x y key iso shift} { global font ! set obj_name [$widget get 1.0 1.end] ! set name_len [string length $obj_name] ! regexp {(.x[0-9a-fA-F]+.c).([0-9a-fA-F]+)text(.*)} $widget full canvas self ! $widget configure -width [expr $name_len + 1] ! set @xs [expr ($font(width) * ($name_len+1) + $font(padx))] ! set @ys [expr $font(height) + $font(pady)] ! objectbox_draw $self $canvas }
--- 1380,1388 ---- def text key {canvas widget x y key iso shift} { global font ! set @text [$widget get 1.0 1.end] ! # regexp {(.x[0-9a-fA-F]+.c).([0-9a-fA-F]+)text(.*)} $widget full canvas self ! $widget configure -width [expr [llength $@text]+1] ! $self update_size ! $self draw $canvas }
*************** *** 1398,1408 **** set canvas $_(focus) set @class "" $self add $canvas - set @name_len 0 }
def objectbox update_size {} { global font ! set @xs [expr $font(padx)+$font(width)*($@name_len+$@isnew)] set @ys [expr $font(pady)+$font(height)] } --- 1394,1404 ---- set canvas $_(focus) set @class "" + set @text "" $self add $canvas }
def objectbox update_size {} { global font ! set @xs [expr $font(padx)+$font(width)*([llength $@text]+$@isnew)] set @ys [expr $font(pady)+$font(height)] } *************** *** 1438,1447 **** set @isnew 0 set obj_name [${canvas}.${self}text get 1.0 1.end] - set @name_len [string length $obj_name] destroy ${canvas}.${self}text $canvas delete ${self}text ! objectbox_erase $self $canvas ! objectbox_update_size $self ! objectbox_draw $self $canvas for {set x 0} {$x<$@inlets} {incr x} { if {[info exists _($self:0:$x)]} { --- 1434,1442 ---- set @isnew 0 set obj_name [${canvas}.${self}text get 1.0 1.end] destroy ${canvas}.${self}text $canvas delete ${self}text ! $self erase $canvas ! $self pdate_size ! $self draw $canvas for {set x 0} {$x<$@inlets} {incr x} { if {[info exists _($self:0:$x)]} { *************** *** 1555,1560 **** objectbox { #puts "move objectbox" ! set $_($obj:sx) [expr ($_($obj:name_len)*$font(width)) + $font(padx)] ! set $_($obj:sy) [expr $font(height) + $font(pady)] objectbox_draw $obj $canvas set text_pos [list [expr $_($obj:cx)+1] [expr $_($obj:cy)+1]] --- 1550,1554 ---- objectbox { #puts "move objectbox" ! $obj update_size objectbox_draw $obj $canvas set text_pos [list [expr $_($obj:cx)+1] [expr $_($obj:cy)+1]]