[PD-cvs] pd/src desire.tk,1.1.2.111,1.1.2.112

chunlee chunlee at users.sourceforge.net
Tue Nov 8 03:54:34 CET 2005


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11317

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.111
retrieving revision 1.1.2.112
diff -C2 -d -r1.1.2.111 -r1.1.2.112
*** desire.tk	8 Nov 2005 01:56:41 -0000	1.1.2.111
--- desire.tk	8 Nov 2005 02:54:32 -0000	1.1.2.112
***************
*** 1173,1192 ****
  	$self changed
  	#puts "................w:[expr [string length $@text]+1]"
! 	text $t -height 1 -width [expr [string length $@text]+1] -relief flat \
  		-bg ${look(objectbg)} -borderwidth 0 \
  		-font [format -*-courier-medium--normal--%d-* $font(size)]
- 	#puts "...............chars:$@textchars"
- 	#text $t -height 1 -width $@textchars -relief flat \
- 	#	-bg ${look(objectbg)} -borderwidth 0 \
- 	#	-font [format -*-courier-medium--normal--%d-* $font(size)]
  	bind $t <Key>            "$self key %W %x %y %K %A 0"
  	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
! 	$t configure -pady 0
          $t insert 1.0 $@text
  	focus $t
--- 1173,1191 ----
  	$self changed
  	#puts "................w:[expr [string length $@text]+1]"
! 	#text $t -height 1 -width [expr [string length $@text]+1] -relief flat \
! 	#	-bg ${look(objectbg)} -borderwidth 0 -border 0\
! 	#	-font [format -*-courier-medium--normal--%d-* $font(size)]
! 	puts "...............chars:$@textchars"
! 	text $t -height 1 -width $@textchars -relief flat \
  		-bg ${look(objectbg)} -borderwidth 0 \
  		-font [format -*-courier-medium--normal--%d-* $font(size)]
  	bind $t <Key>            "$self key %W %x %y %K %A 0"
  	bind $t <Control-Return> "$self key %W %x %y 10 %A 0"
  	bind $t <Return>         "$self unedit"
  	mset {cx cy} [$self xy]
! 	.$@canvas.c create window [expr $cx+2] [expr $cy+1] \
  		-window $t -anchor nw -tags "${self}text $self"
  	$self draw
! 	$t configure -pady 0 -padx 1
          $t insert 1.0 $@text
  	focus $t
***************
*** 1207,1217 ****
  def* textbox update_size {} {
  	global font look
! 	set @textwidth [expr $font(padx)+$font(width)*([string length $@text]+$@edit)]
  	set @topwidth [expr ($@ninlets + ($@ninlets - 1)) * $look(iowidth)]
  	set @bottomwidth [expr ($@noutlets + ($@noutlets - 1)) * $look(iowidth)]
! 	set @xs [max $@bottomwidth [max $@topwidth $@textwidth]]
! 	#set @textchars [expr int([max $@bottomwidth [max $@topwidth $@textwidth]]/$font(width)) + 1]
! 	#puts "roundoff:$@textchars"
! 	#set @xs [expr $@textchars * $font(width) - 2]
  	set @ys  [expr $font(pady)+$font(height)]
  	puts "inlet = $@ninlets/$@topwidth | \
--- 1206,1217 ----
  def* textbox update_size {} {
  	global font look
! 	#set @textwidth [expr $font(padx)+$font(width)*([string length $@text]+$@edit)]
! 	set @textwidth [expr $font(width)*([string length $@text]+$@edit)]
  	set @topwidth [expr ($@ninlets + ($@ninlets - 1)) * $look(iowidth)]
  	set @bottomwidth [expr ($@noutlets + ($@noutlets - 1)) * $look(iowidth)]
! 	#set @xs [max $@bottomwidth [max $@topwidth $@textwidth]]
! 	set @textchars [expr int([max $@bottomwidth [max $@topwidth $@textwidth]]/$font(width)) + 1]
! 	puts "roundoff:$@textchars"
! 	set @xs [expr $@textchars * $font(width)]
  	set @ys  [expr $font(pady)+$font(height)]
  	puts "inlet = $@ninlets/$@topwidth | \





More information about the Pd-cvs mailing list