Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15110
Modified Files: Tag: desiredata desire.tk Log Message: added rough sketch of "get_elapsed"
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.395 retrieving revision 1.1.2.600.2.396 diff -C2 -d -r1.1.2.600.2.395 -r1.1.2.600.2.396 *** desire.tk 18 Aug 2007 04:45:54 -0000 1.1.2.600.2.395 --- desire.tk 18 Aug 2007 07:01:37 -0000 1.1.2.600.2.396 *************** *** 79,83 **** }
! # or substract two lists proc l+ { al bl} {set r {}; foreach a $al b $bl {lappend r [expr {$a+$b}]}; return $r} proc l- { al bl} {set r {}; foreach a $al b $bl {lappend r [expr {$a-$b}]}; return $r} --- 79,83 ---- }
! # add or subtract two lists proc l+ { al bl} {set r {}; foreach a $al b $bl {lappend r [expr {$a+$b}]}; return $r} proc l- { al bl} {set r {}; foreach a $al b $bl {lappend r [expr {$a-$b}]}; return $r} *************** *** 2273,2277 **** $m.view add checkbutton -label [say visual_diff] -selectcolor grey0 -command [list $self visual_diff] \ -accelerator [accel_munge "Ctrl+e"] -indicatoron 1 ! $self populate_menu view {{} reload redraw} $self populate_menu put {Object Message Number Symbol Comment {} bng tgl nbx vsl hsl vradio hradio vu dropper cnv {} Graph Array} $self populate_menu window {{}} --- 2273,2277 ---- $m.view add checkbutton -label [say visual_diff] -selectcolor grey0 -command [list $self visual_diff] \ -accelerator [accel_munge "Ctrl+e"] -indicatoron 1 ! $self populate_menu view {get_elapsed {} reload redraw} $self populate_menu put {Object Message Number Symbol Comment {} bng tgl nbx vsl hsl vradio hradio vu dropper cnv {} Graph Array} $self populate_menu window {{}} *************** *** 4936,4941 **** --- 4936,4954 ---- $self update_hilite_io # if {[$self class] == "Canvas"} {$self restack} + puts "elapsed exists: [info exists @elapsed]" + if {[info exists @elapsed]} { + mset {x1 y1 x2 y2} [$self bbox] + $self item ELAPSED text [l+ {10 1} [list $x1 $y2]] -anchor nw -fill "#008800" \ + -text $@elapsed -font {{DejaVu Sans Mono} -8} + } + } + + def Box elapsed {f} { + set @elapsed $f + $self changed }
+ def Canvas get_elapsed {} {netsend [list .$self get_elapsed]} + def Canvas show_id {} {return $@show_id} def Canvas show_id= {val} {set @show_id $val; $self redraw}