Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26735
Modified Files: Tag: desiredata desire.tk Log Message: multiline messagebox
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.600.2.324 retrieving revision 1.1.2.600.2.325 diff -C2 -d -r1.1.2.600.2.324 -r1.1.2.600.2.325 *** desire.tk 8 Aug 2007 23:23:52 -0000 1.1.2.600.2.324 --- desire.tk 8 Aug 2007 23:45:06 -0000 1.1.2.600.2.325 *************** *** 2485,2493 **** $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]} $self item TEXT text [l+ $@textoffset [$self xy]] \ -font [View_look $self font] -text $text \ ! -fill [View_look $self fg] -anchor nw } $self update_size --- 2485,2494 ---- $self item text window [l+ $@textoffset [$self xy]] -window $t -anchor nw -tags "${self}text $self text" } else { + set fw [font measure [$self look font] 0] 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]} $self item TEXT text [l+ $@textoffset [$self xy]] \ -font [View_look $self font] -text $text \ ! -fill [View_look $self fg] -anchor nw -width [expr $fw*40] } $self update_size *************** *** 2538,2543 **** text $t -height $nl -width $width -relief flat -bg [$self look bgedit] -borderwidth 0 \ -highlightthickness 0 -font $font_str -fg $fg -insertbackground $insertbg ! bind $t <Key> "$self resize %K; $self key_input %W %x %y %K %A 0" ! bind $t <Control-Return> "$self key_input %W %x %y 10 %A 0" bind $t <Return> "$self unedit" bind $t <Escape> "$self unedit 0" --- 2539,2544 ---- text $t -height $nl -width $width -relief flat -bg [$self look bgedit] -borderwidth 0 \ -highlightthickness 0 -font $font_str -fg $fg -insertbackground $insertbg ! bind $t <Key> "$self key_input %W %x %y %K %A 0; after 0 [$self resize %K]" ! bind $t <Control-Return> "$self key_input %W %x %y 10 %A 0" bind $t <Return> "$self unedit" bind $t <Escape> "$self unedit 0" *************** *** 2572,2577 **** set width [expr (($textpix+$fwidth-1)/$fwidth)+1] } if {$key == "BackSpace"} {set width [expr $width - 2]} ! $t configure -width $width }
--- 2573,2584 ---- set width [expr (($textpix+$fwidth-1)/$fwidth)+1] } + set maxwidth 40 if {$key == "BackSpace"} {set width [expr $width - 2]} ! mset {y1 y2} [$t yview] ! set height [$t cget -height] ! if {$y2-$y1 < 1} { ! set height [expr $height/($y2-$y1)] ! } ! $t configure -width [min $width $maxwidth] -height $height -wrap word }
*************** *** 2647,2664 **** set c [$self cwidget] set t $c.${self}text if {[winfo exists $c.${self}text]} { set nl [lindex [$t configure -height] 4] } else { } set height [expr {$nl*$ls}] - #set height [expr [font metrics [$self look font] -linespace] * $nl] set textwidth [expr {$width*($n+$@edit)}] if {[llength [$c gettags ${self}TEXT]]} { mset {x1 y1 x2 y2} [$c bbox ${self}TEXT] set textwidth [expr {($x2 - $x1)/[$@canvas zoom]}] } catch { - #set text [$c.${self}text get $@longline.0 $@longline.end] - #set textwidth [expr {[font measure [$self look font] $text]+20}];#+20 hack mset {x1 y1 x2 y2} [[[$self canvas] widget] bbox ${self}text] set textwidth [expr ($x2-$x1+2)/[$@canvas zoom]] --- 2654,2671 ---- set c [$self cwidget] set t $c.${self}text + if {[winfo exists $c.${self}text]} { set nl [lindex [$t configure -height] 4] + set height [expr {$nl*$ls}] } else { } set height [expr {$nl*$ls}] set textwidth [expr {$width*($n+$@edit)}] if {[llength [$c gettags ${self}TEXT]]} { mset {x1 y1 x2 y2} [$c bbox ${self}TEXT] set textwidth [expr {($x2 - $x1)/[$@canvas zoom]}] + set height [expr $y2-$y1] } catch { mset {x1 y1 x2 y2} [[[$self canvas] widget] bbox ${self}text] set textwidth [expr ($x2-$x1+2)/[$@canvas zoom]]