Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31386
Modified Files: Tag: desiredata desire.tk Log Message: deleted AtomBox unedit; renamed apply_value to setto.
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.109 retrieving revision 1.1.2.600.2.110 diff -C2 -d -r1.1.2.600.2.109 -r1.1.2.600.2.110 *** desire.tk 19 Dec 2006 03:08:02 -0000 1.1.2.600.2.109 --- desire.tk 19 Dec 2006 05:44:52 -0000 1.1.2.600.2.110 *************** *** 2116,2120 **** $self item text window [l+ $@textoffset [$self xy]] \ -window $t -anchor nw -tags "${self}text $self text" ! } { set text [$self filter_text] if {$::leet} {set text [string map -nocase {a 4 e 3 t 7 s 5 i 1 o 0 g 9} $text]} --- 2116,2120 ---- $self item text window [l+ $@textoffset [$self xy]] \ -window $t -anchor nw -tags "${self}text $self text" ! } else { set text [$self filter_text] if {$::leet} {set text [string map -nocase {a 4 e 3 t 7 s 5 i 1 o 0 g 9} $text]} *************** *** 2223,2228 ****
def TextBox update_size {} { ! if {[$self class] == "FloatBox"} {return};# floatbox's size is contant set by @w ! if {[$self class] == "NumBox"} {return};# numbox's size is contant set by @w if {[info exists @gop]} {if {$@gop} {set @xs $@pixwidth; set @ys $@pixheight; return}} set l {};set nl 1 --- 2223,2228 ----
def TextBox update_size {} { ! # ! if {([$self class] == "FloatBox" || [$self class] == "NumBox") && $@w} {return} if {[info exists @gop]} {if {$@gop} {set @xs $@pixwidth; set @ys $@pixheight; return}} set l {};set nl 1 *************** *** 2244,2248 **** if {[llength [$c gettags ${self}TEXT]]} { mset {x1 y1 x2 y2} [$c bbox ${self}TEXT] ! set textwidth [expr {(($x2 - $x1)/[$@canvas zoom])}] } catch { --- 2244,2248 ---- if {[llength [$c gettags ${self}TEXT]]} { mset {x1 y1 x2 y2} [$c bbox ${self}TEXT] ! set textwidth [expr {($x2 - $x1)/[$@canvas zoom]}] } catch { *************** *** 4859,4864 **** }
! def AtomBox apply_value {} {netsend [list .$self float $@val]} ! def SymbolBox apply_value {} {netsend [list .$self symbol $@val]}
def FloatBox ftoa {} { --- 4859,4864 ---- }
! def AtomBox setto {text} {if { [string is double $text]} {netsend [list .$self float $text]}} ! def SymbolBox setto {text} {if {![string is double $text]} {netsend [list .$self symbol $text]}}
def FloatBox ftoa {} { *************** *** 4898,4925 **** }
- #def AtomBox unedit {{accept 1}} { - # if {!$@edit} {return} - # super - #} - - def AtomBox unedit {{accept 1}} { - if {!$@edit} {return} - set @edit 0; $self changed edit - set c [$@canvas widget] - set t $c.${self}text - if {$accept} { - set val [$t get 1.0 "end - 1 chars"] - if {![regexp {[a-zA-Z]} $val]} { - set @val $val - set @text $val; #quick hack so that TextBox draw picks up the changes - } - $self apply_value - } - after 1 "destroy $t" - focus $c - $@canvas focus= "" - } - def AtomBox motion {x y f target} { mset {ox oy} $@mouse set @text [expr $@text-$@rate*($y-$oy)] --- 4898,4903 ---- }
def AtomBox motion {x y f target} { + if {$@edit} {return} mset {ox oy} $@mouse set @text [expr $@text-$@rate*($y-$oy)]