[PD-cvs] pd/src desire.tk,1.1.2.112,1.1.2.113
chunlee
chunlee at users.sourceforge.net
Tue Nov 8 14:17:55 CET 2005
- Previous message: [PD-cvs] abstractions/footils/list-abs list-lastx-help.pd, NONE, 1.1 list-lastx.pd, NONE, 1.1 README, 1.5, 1.6 last-x.pd, 1.1, 1.2
- Next message: [PD-cvs] pd/src desire.tk,1.1.2.113,1.1.2.114
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5569
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.112
retrieving revision 1.1.2.113
diff -C2 -d -r1.1.2.112 -r1.1.2.113
*** desire.tk 8 Nov 2005 02:54:32 -0000 1.1.2.112
--- desire.tk 8 Nov 2005 13:17:53 -0000 1.1.2.113
***************
*** 1172,1188 ****
$self update_size
$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
--- 1172,1186 ----
$self update_size
$self changed
! text $t -height 1 -width [expr [string length $@text]+1] -relief flat \
! -bg ${look(objectbg)} -borderwidth 0 -highlightthickness 0\
-font [format -*-courier-medium--normal--%d-* $font(size)]
+ #text $t -height 1 -width $@textchars -relief flat \
+ # -bg ${look(objectbg)} -borderwidth 0 -highlightthickness 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+2] \
-window $t -anchor nw -tags "${self}text $self"
$self draw
***************
*** 1206,1222 ****
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 | \
! outlet = $@noutlets/$@bottomwidth | \
! text = [string length $@text]/$@textwidth | \
! objectwidth = $@xs"
}
--- 1204,1220 ----
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 | \
! # outlet = $@noutlets/$@bottomwidth | \
! # text = [string length $@text]/$@textwidth | \
! # objectwidth = $@xs"
}
***************
*** 1318,1322 ****
def objectbox unclickedit {args} {
! puts "$self is being unclicked in edit mode"
}
--- 1316,1335 ----
def objectbox unclickedit {args} {
! puts "$self is being unclicked in edit mode $args"
! set x [lindex $args 0]
! set y [lindex $args 1]
! mset {type id} [$@canvas identify_target $x $y [expr $x-1] [expr $y-1] "unclick"]
! mset {x1 y1 x2 y2} [$id bbox]
! set ins 0; set ins [$id ninlets]
! if {abs($y1+3-$y)<=3 && $ins} {
! set in [expr int(($x-$x1)*$ins/($x2-$x1))]
! set @wire_to [list $id $in]
!
! #mset {x1 y1 x2 y2} [$c bbox ${id}o${out}]
! #$c create line [expr ($x1+$x2)/2] [expr ($y1+$y2)/2] $x $y -dash {4 4 4 4} -tags lnew
! #set @wire_from [list $self $out]
! #set @action wire
! #return
! }
}
- Previous message: [PD-cvs] abstractions/footils/list-abs list-lastx-help.pd, NONE, 1.1 list-lastx.pd, NONE, 1.1 README, 1.5, 1.6 last-x.pd, 1.1, 1.2
- Next message: [PD-cvs] pd/src desire.tk,1.1.2.113,1.1.2.114
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list