[PD-cvs] pd/src desire.tk,1.1.2.600.2.372,1.1.2.600.2.373
chunlee
chunlee at users.sourceforge.net
Wed Aug 15 08:00:57 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19778
Modified Files:
Tag: desiredata
desire.tk
Log Message:
[display] with multiple messages
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.372
retrieving revision 1.1.2.600.2.373
diff -C2 -d -r1.1.2.600.2.372 -r1.1.2.600.2.373
*** desire.tk 15 Aug 2007 03:16:11 -0000 1.1.2.600.2.372
--- desire.tk 15 Aug 2007 06:00:53 -0000 1.1.2.600.2.373
***************
*** 726,730 ****
-valgrind run pd server through valgrind
-novalgrind ... or don't
! -savemode run desiredata with all default settings
-dzinc use zinc emulation"
}
--- 726,730 ----
-valgrind run pd server through valgrind
-novalgrind ... or don't
! -safemode run desiredata with all default settings
-dzinc use zinc emulation"
}
***************
*** 2060,2064 ****
}
! #patch editing commands
def Canvas o {x y} {
set c [$self widget]
--- 2060,2064 ----
}
! #patch editing commandline shortcuts
def Canvas o {x y} {
set c [$self widget]
***************
*** 4099,4103 ****
set from_idx [[$@canvas objects] search $@from]
set to_idx [[$@canvas objects] search $@to]
- puts "from :: $@from || to :: $@to"
if {$from_idx >= 0 && $to_idx >= 0 && $@from != $@to} {
$@canvas connect [list $from_idx $@outlet $to_idx $@inlet]
--- 4099,4102 ----
***************
*** 4106,4110 ****
}
def FutureWire draw {} {
! $self item WIRE line [xys $@x1 $@y1 $@x2 $@y2] -dash {4 4 4 4} -fill [$self look dash] -smooth yes
}
--- 4105,4109 ----
}
def FutureWire draw {} {
! $self item WIRE line [xys $@x1 $@y1 $@x2 $@y2] -dash {4 4 4 4} -fill [$self look dash] -smooth yes
}
***************
*** 5527,5534 ****
def Display init {{mess {}}} {
! set @content display
set @xs [expr [font measure [$self look font] 0]+3]
! set @ys [expr [font metrics [$self look font] -linespace]+3]
! set @max_width 40
set @textoffset [list 2 2]
super $mess
--- 5526,5537 ----
def Display init {{mess {}}} {
! set font [$self look font]
! set fw [font measure $font 0]
! set @max_width 40; #in chars
! set @wrap [expr $fw*$@max_width]; #in pixels
! set @content {display}
! set @height 5
set @xs [expr [font measure [$self look font] 0]+3]
! set @ys [font metrics [$self look font] -linespace]
set @textoffset [list 2 2]
super $mess
***************
*** 5538,5556 ****
super
set font [$self look font]
- set fw [font measure $font 0]
mset {x y} [$self xy]
! set wrap [expr $fw*$@max_width]
! set tw [font measure $font $@content]
! set w [min $tw $wrap]
! set h [expr ceil($tw/$wrap)+1]
! $self item BASE rect [list $x $y [expr $x+$w+3] [expr $y+($@ys*$h)]] \
-fill [$self look bg]
! $self item TEXT text [l+ $@textoffset [$self xy]] -font [$self look font] -text $@content \
! -fill [$self look fg] -anchor nw -width [expr $wrap]
$self draw_io
}
def Display dis {text} {
! set @content $text
$self changed
}
--- 5541,5567 ----
super
set font [$self look font]
mset {x y} [$self xy]
! mset {xf yf} $@textoffset
! set fh [font metrics [$self look font] -linespace]
! set text [lindex $@content 0];
! for {set i 1} {$i < $@height} {incr i} {set text ${text}\n[lindex $@content $i]}
! set h 0; set w 0
! foreach line $@content {
! set tw [font measure $font $line]
! set h [expr int(ceil($tw/$@wrap.0)+$h)]
! set w [min [max $w $tw] $@wrap]
! }
! set h [max $h 1]
! $self item BASE rect [list $x $y [expr $x+$w+$xf+2] [expr $y+($@ys*$h)+$yf+1]] \
-fill [$self look bg]
!
! $self item TEXT text [l+ $@textoffset [$self xy]] -font $font -text $text \
! -fill [$self look fg] -anchor nw -width $@wrap
$self draw_io
}
def Display dis {text} {
! lappend @content $text
! if {[llength $@content] > $@height} {set @content [lrange $@content 1 end]}
$self changed
}
More information about the Pd-cvs
mailing list