[PD-cvs] pd/src desire.tk,1.1.2.600.2.371,1.1.2.600.2.372
chunlee
chunlee at users.sourceforge.net
Wed Aug 15 05:16:16 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25961
Modified Files:
Tag: desiredata
desire.tk
Log Message:
more patch editing commands
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.371
retrieving revision 1.1.2.600.2.372
diff -C2 -d -r1.1.2.600.2.371 -r1.1.2.600.2.372
*** desire.tk 14 Aug 2007 23:36:46 -0000 1.1.2.600.2.371
--- desire.tk 15 Aug 2007 03:16:11 -0000 1.1.2.600.2.372
***************
*** 2060,2063 ****
--- 2060,2064 ----
}
+ #patch editing commands
def Canvas o {x y} {
set c [$self widget]
***************
*** 2085,2088 ****
--- 2086,2104 ----
}
+ def Canvas s {selection} {
+ set objs [$self parse_idx $selection]
+ foreach obj $objs {$self selection+= [$@objects get $obj]}
+ }
+
+ def Canvas sw {from outlet to inlet} {
+ set out_objs [$self parse_idx $from]
+ set in_objs [$self parse_idx $to]
+ foreach out $out_objs {
+ foreach in $in_objs {
+ set id [$self wire_idx [list $out $outlet $in $inlet]]
+ if {$id>=0} {$self selection_wire+= [$@wires get $id]}
+ }
+ }
+ }
def Canvas parse_idx {val} {
***************
*** 2564,2567 ****
--- 2580,2584 ----
super
}
+
def TextBox edit {} {
if {$@edit} {return}; set @edit 1; $self changed edit
***************
*** 5322,5325 ****
--- 5339,5343 ----
classinfo canvas Canvas
classinfo cnv Cnv
+ classinfo display Display
# remember, _($foo:$bar) notation should die
***************
*** 5506,5509 ****
--- 5524,5559 ----
}
+ class_new Display {Box}
+
+ def Display init {{mess {}}} {
+ set @content display
+ set @xs [expr [font measure [$self look font] 0]+3]
+ set @ys [expr [font metrics [$self look font] -linespace]+3]
+ set @max_width 40
+ set @textoffset [list 2 2]
+ super $mess
+ }
+
+ def Display draw {} {
+ super
+ set font [$self look font]
+ set fw [font measure $font 0]
+ mset {x y} [$self xy]
+ set wrap [expr $fw*$@max_width]
+ set tw [font measure $font $@content]
+ set w [min $tw $wrap]
+ set h [expr ceil($tw/$wrap)+1]
+ $self item BASE rect [list $x $y [expr $x+$w+3] [expr $y+($@ys*$h)]] \
+ -fill [$self look bg]
+ $self item TEXT text [l+ $@textoffset [$self xy]] -font [$self look font] -text $@content \
+ -fill [$self look fg] -anchor nw -width [expr $wrap]
+ $self draw_io
+ }
+
+ def Display dis {text} {
+ set @content $text
+ $self changed
+ }
+
class_new IEMGUI {}
def IEMGUI text {} {
***************
*** 8782,8784 ****
}
! def Clipboard1 unknown {args} {puts wheee}
--- 8832,8834 ----
}
!
More information about the Pd-cvs
mailing list