Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25697
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.118 retrieving revision 1.1.2.119 diff -C2 -d -r1.1.2.118 -r1.1.2.119 *** desire.tk 10 Nov 2005 16:16:58 -0000 1.1.2.118 --- desire.tk 11 Nov 2005 01:51:06 -0000 1.1.2.119 *************** *** 615,618 **** --- 615,619 ---- osx {list 2} default {list 1}}] + set look(minobjwidth) 21
#-----------------------------------------------------------------------------------# *************** *** 1215,1225 **** 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 | \ --- 1216,1223 ---- 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 $look(minobjwidth) [max $@bottomwidth [max $@topwidth $@textwidth]]] ! set @ys [expr $font(pady)+$font(height)] #puts "inlet = $@ninlets/$@topwidth | \ *************** *** 1243,1259 **** #set @text $args set @edit 0 - #if {[info exists _($canvas:selection)]} { - # if {[llength [$canvas obj_in_edit]]} { - # set object [lindex $_($canvas:selection) 0] - # $object unedit - # } - # foreach obj $_($canvas:selection) { - # .$canvas.c itemconfigure ${obj}BASE -outline $look(objectframe3) - # } - # set _($canvas:selection) {} - #} - #$canvas obj_in_edit= 1 - #$canvas selection= $self - #puts "new objectbox has text '$@text'" }
--- 1241,1244 ---- *************** *** 1456,1467 **** $c coords lnew $l } - switch $@action { - edit { - if {[distance [list $x $y] $@click_at] > 5} { - set @action move - mset {ox oy} $@click_at - } - } - } switch $@action { move { --- 1441,1444 ---- *************** *** 1475,1484 **** $c coords selrect $x1 $y1 $x2 $y1 $x2 $y2 $x1 $y2 $x1 $y1 } } ! if {[string length $@focus]} { ! if {$@editmode} {set event motionedit} {set event motion} ! $@focus $event $self $x $y $mods ! return ! } mset {type id} [$self identify_target $x $y -1 -1 "move "] switch $type { --- 1452,1467 ---- $c coords selrect $x1 $y1 $x2 $y1 $x2 $y2 $x1 $y2 $x1 $y1 } + edit { + if {[distance [list $x $y] $@click_at] > 5} { + set @action move + mset {ox oy} $@click_at + } + } } ! # if {[string length $@focus]} { ! # if {$@editmode} {set event motionedit} {set event motion} ! # $@focus $event $self $x $y $mods ! # return ! # } mset {type id} [$self identify_target $x $y -1 -1 "move "] switch $type { *************** *** 1491,1495 **** set port [$id hilite_io i $x $y] set @dehighlight "$c delete ${id}i${port}b; set wire_to {}" - set wire_to [list $id $port] return } --- 1474,1477 ---- *************** *** 1670,1673 **** --- 1652,1656 ---- global look set c .$self.c + puts "_____ unclickedit action:$@action " switch $@action { rect { *************** *** 1699,1702 **** --- 1682,1686 ---- $c delete lnew mset {type id} [$@canvas identify_target $x $y [expr $x-1] [expr $y-1] "unclick"] + if {$id != ""} { mset {x1 y1 x2 y2} [$id bbox] set ins 0; set ins [$id ninlets] *************** *** 1706,1709 **** --- 1690,1694 ---- } puts "connect $@wire_from $@wire_to" + } } edit { *************** *** 2074,2083 **** set i 1 set class [lindex $d $i] - puts "class = $class" switch -- $class { canvas {set class canvas} obj {set i 4; set class [lindex $d 4]} } ! if {![info exists _($x:_class)]} { --- 2059,2067 ---- set i 1 set class [lindex $d $i] switch -- $class { canvas {set class canvas} obj {set i 4; set class [lindex $d 4]} } ! puts "class = $class" if {![info exists _($x:_class)]} { *************** *** 2499,2505 ****
#-----------------------------------------------------------------------------------# - class_new bang {view} ! #def bang init {} {super}
def bang draw {} { --- 2483,2496 ----
#-----------------------------------------------------------------------------------# class_new bang {view} ! def bang init {} { ! super ! puts "init bang!!!!!!!" ! } ! ! def bang ninlets= {v} {set @ninlets $v} ! def bang noutlets= {v} {set @noutlets $v} ! def bang ninlets {} {return $@ninlets} ! def bang noutlets {} {return $@noutlets}
def bang draw {} { *************** *** 2508,2512 **** set @noutlets [expr [string compare $@snd empty]==0] set colour [parse_color $@bcol] ! super set xs $@w; set x2 [expr $x1+$xs] set ys $@w; set y2 [expr $y1+$ys] --- 2499,2503 ---- set @noutlets [expr [string compare $@snd empty]==0] set colour [parse_color $@bcol] ! #super set xs $@w; set x2 [expr $x1+$xs] set ys $@w; set y2 [expr $y1+$ys]