[PD-cvs] pd/src desire.tk,1.1.2.140,1.1.2.141
chunlee
chunlee at users.sourceforge.net
Fri Dec 16 20:26:47 CET 2005
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17082
Modified Files:
Tag: devel_0_39
desire.tk
Log Message:
msgbox now can complete and move
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.140
retrieving revision 1.1.2.141
diff -C2 -d -r1.1.2.140 -r1.1.2.141
*** desire.tk 16 Dec 2005 15:30:21 -0000 1.1.2.140
--- desire.tk 16 Dec 2005 19:26:44 -0000 1.1.2.141
***************
*** 1274,1278 ****
set @selected? 1
.$@canvas.c delete ${self}TEXT
! set @oldtext $@text
set t .$@canvas.c.${self}text
$self update_size
--- 1274,1278 ----
set @selected? 1
.$@canvas.c delete ${self}TEXT
! #set @oldtext $@text
set t .$@canvas.c.${self}text
$self update_size
***************
*** 1290,1294 ****
.$@canvas.c create window [expr $cx+2] [expr $cy+2] \
-window $t -anchor nw -tags "${self}text $self"
! $self draw
$t configure -pady 0 -padx 1
$t insert 1.0 $@text
--- 1290,1294 ----
.$@canvas.c create window [expr $cx+2] [expr $cy+2] \
-window $t -anchor nw -tags "${self}text $self"
! #$self draw
$t configure -pady 0 -padx 1
$t insert 1.0 $@text
***************
*** 1312,1321 ****
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 | \
- # outlet = $@noutlets/$@bottomwidth | \
- # text = [string length $@text]/$@textwidth | \
- # objectwidth = $@xs"
}
--- 1312,1316 ----
***************
*** 1894,1898 ****
def box bbox {} {
- puts ".... xs:$@xs ys:$@ys ...."
mset {x y} [$self xy]
list $x $y [expr $x+$@xs] [expr $y+$@ys]
--- 1889,1892 ----
***************
*** 2206,2212 ****
--- 2200,2209 ----
set @xs $@w
set @ys $@w
+ set @edit 0
+ set @text ""
}
def* messagebox draw {} {
+ $self update_size
global look
mset {x1 y1} [$self xy]
***************
*** 2219,2222 ****
--- 2216,2235 ----
if {[$self selected?]} {set frcol $look(objectframe4)} {set frcol $look(objectframe3)}
.$@canvas.c itemconfigure ${self}BASE -outline $frcol
+
+ super
+ }
+
+ def* messagebox unedit {} {
+ if {!$@edit} {return}
+ set @edit 0
+ set c .$@canvas.c
+ set t $c.${self}text
+ set @text [$t get 1.0 1.end]
+ $self erase
+ after 1 "destroy $t"
+ set l {}
+ foreach char [split $@text ""] {lappend l [scan $char %c]}
+ pd .$@canvas text_setto !$self $l
+ focus $c
}
***************
*** 2311,2315 ****
}
! def* numbox update_size {} {
global font look
set @textwidth [expr $font(padx)+$font(width)*[string length $@buf]]
--- 2324,2328 ----
}
! def* numbox update_size {} {
global font look
set @textwidth [expr $font(padx)+$font(width)*[string length $@buf]]
More information about the Pd-cvs
mailing list