Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4878
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.117 retrieving revision 1.1.2.118 diff -C2 -d -r1.1.2.117 -r1.1.2.118 *** desire.tk 9 Nov 2005 01:31:07 -0000 1.1.2.117 --- desire.tk 10 Nov 2005 16:16:58 -0000 1.1.2.118 *************** *** 1129,1132 **** --- 1129,1151 ---- def textbox noutlets {} {return $@noutlets}
+ def* textbox clickedit {x y butt key in_selection selection} { + global _ + #handles the shift click + #if {($f&1) && !$already} {post "add to selection?"; return} + if {($key&1) && $selection>0} { + puts "add $self to selection...." + } + #if clicked obj is part of the $@selection, than.... + if {$in_selection && [llength $selection]>1} { + set _($@canvas:action) move + } { + $@canvas deselect_all + set _($@canvas:selection) $self + set _($@canvas:action) edit + } + + + } + def textbox draw {} { # TEXT = the text label *************** *** 1437,1443 **** $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 { --- 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 { *************** *** 1586,1591 **** --- 1610,1617 ----
def canvas deselect_all {} { + #puts "selection:$@selection" foreach o $@selection {$o selected?= 0} set @selection {} + #set @select_by "" }
*************** *** 1617,1632 **** } switch $type { ! object {$id clickedit $x $y $b $f} wire {$id clickedit $x $y $b $f} default {error BORK} } ! if {($f&1) && !$already} {post "add to selection?"; return} ! if {$in_selection && [llength $@selection]>1} { ! set @action move ! } { ! $self selection+= $id ! set @select_by click ! set @action edit ! } }
--- 1643,1651 ---- } switch $type { ! object {$id clickedit $x $y $b $f $in_selection $@selection} wire {$id clickedit $x $y $b $f} default {error BORK} } ! }
*************** *** 1653,1656 **** --- 1672,1676 ---- switch $@action { rect { + set @selection {} mset {x1 y1 x2 y2} [$c bbox selrect] #if selrect is always at the last stack order, then we don't need to do this *************** *** 1673,1676 **** --- 1693,1697 ---- foreach obj $@selection {$c itemconfigure ${obj}BASE -outline $look(objectframe4)} } + set @select_by "selrect" $c delete selrect } *************** *** 1695,1701 **** } move { ! if {$@select_by == "click"} { ! set @selection {} ! } #puts "selection:$@selection" } --- 1716,1723 ---- } move { ! #puts "....select_by:$@select_by" ! #if {$@select_by == "click"} { ! # set @selection {} ! # } #puts "selection:$@selection" }