Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8928
Modified Files: Tag: devel_0_39 desire.tk Log Message: more rendering fix
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.70 retrieving revision 1.1.2.71 diff -C2 -d -r1.1.2.70 -r1.1.2.71 *** desire.tk 19 Sep 2005 08:56:06 -0000 1.1.2.70 --- desire.tk 20 Sep 2005 00:43:37 -0000 1.1.2.71 *************** *** 572,576 **** set font(padx) 5 set mouse(b1down) 0 - #-----------------------------------------------------------------------------------# set look(iowidth) 7 --- 572,575 ---- *************** *** 990,997 **** if {![info exists @cx]} { #don't delete these two lines ! set @cx 40; catch {set @cx $_($canvas:current_x)} ! set @cy 40; catch {set @cy $_($canvas:current_y)} } ! list $@cx $@cy }
--- 989,999 ---- if {![info exists @cx]} { #don't delete these two lines ! #set @cx 40; catch {set @cx $_($canvas:current_x)} ! #set @cy 40; catch {set @cy $_($canvas:current_y)} ! set @cx 40 ! set @cy 40 } ! ! return [list $@cx $@cy] }
*************** *** 1122,1125 **** --- 1124,1133 ----
#----------------------------------------------------------------------------------- + #proc objectbox_by_ctrl {} { + # + # pd "%W obj 0 ;" + # + #} + class_new objectbox {textbox} def objectbox init {args} { *************** *** 1223,1226 **** --- 1231,1245 ---- }
+ #def objectbox motion {args} { + # puts "motions in $self in edit mode" + #} + + #def objectbox move {args} { + # set @cx [expr $@cx+[lindex $args 0]] + # set @cy [expr $@cy+[lindex $args 1]] + # $self draw $self $_($self:canvas) + # $self draw $_($self:canvas) + #} + #-----------------------------------------------------------------------------------# def* canvas window_title {args} {} *************** *** 1244,1248 **** set @cx [expr $@cx+$dx] set @cy [expr $@cy+$dy] ! .x$@canvas.c move $self $dx $dy for {set x 0} {$x<$@ninlets} {incr x} { if {[info exists _($self:i:$x)]} { --- 1263,1268 ---- set @cx [expr $@cx+$dx] set @cy [expr $@cy+$dy] ! #.x$@canvas.c move $self $dx $dy ! $self draw $_($self:canvas) for {set x 0} {$x<$@ninlets} {incr x} { if {[info exists _($self:i:$x)]} { *************** *** 1258,1266 ****
def objectbox hilite_in {x y} { ! global look set ports 0 catch {set ports $@ninlets} if {$ports==0} return ! set port [expr int(($x-$@x1)*$ports/$@xs)] set p ${self}i${port}b #if {![llength $@wire_from]} {} --- 1278,1288 ----
def objectbox hilite_in {x y} { ! puts "** hilite inlet **" ! global look _ set ports 0 + set c .x$_($self:canvas).c catch {set ports $@ninlets} if {$ports==0} return ! set port [expr int(($x-$@cx)*$ports/$@xs)] set p ${self}i${port}b #if {![llength $@wire_from]} {} *************** *** 1270,1281 **** }
! def canvas hilite_out {x y} { set ports 0 ! catch {set ports $_($id:noutlets)} if {$ports==0} return ! set port [expr int(($x-$@x1)*$ports/$@cx)] set p ${self}o${port}b ! $c create rectangle [l+ [$c coords ${id}o${port}] {-4 -4 +4 +4}] \ -outline $look(outletfg) -width 1 -tags $p return $port } --- 1292,1306 ---- }
! def objectbox hilite_out {x y} { ! global look _ set ports 0 ! set c .x$_($self:canvas).c ! catch {set ports $@noutlets} if {$ports==0} return ! set port [expr int(($x-$@cx)*$ports/$@xs)] set p ${self}o${port}b ! $c create rectangle [l+ [$c coords ${self}o${port}] {-4 -4 +4 +4}] \ -outline $look(outletfg) -width 1 -tags $p + return $port } *************** *** 1285,1290 **** global tooltip _ dehighlight look set c .x$self.c ! set x [$c canvasx $x]; set @current_x $x ! set y [$c canvasy $y]; set @current_y $y if {$tooltip(visible)} { if {[expr [distance [list $tooltip(mx) $tooltip(my)] [list $x,$y]] > 10]} { --- 1310,1315 ---- global tooltip _ dehighlight look set c .x$self.c ! set x [$c canvasx $x] ! set y [$c canvasy $y] if {$tooltip(visible)} { if {[expr [distance [list $tooltip(mx) $tooltip(my)] [list $x,$y]] > 10]} { *************** *** 1330,1342 **** if {$@editmode && [llength [$id bbox]]} { mset {x1 y1 x2 y2} [$id bbox] if {abs($y1+3-$y)<=3} { ! set port [$self hilite_in] ! set dehighlight "$c delete ${self}i${port}b; set wire_to {}" set wire_to [list $id $port] return } if {abs($y2-3-$y)<=3} { ! set port [$self hilite_out] ! set dehighlight "$c delete ${self}o${port}b" return } --- 1355,1374 ---- if {$@editmode && [llength [$id bbox]]} { mset {x1 y1 x2 y2} [$id bbox] + #puts "***** -> $y1+3-$y = [expr $y1+3-$y]" if {abs($y1+3-$y)<=3} { ! #set port [$self hilite_in $_($id:cx) $_($id:cy)] ! #set dehighlight "$c delete ${self}i${port}b; set wire_to {}" ! #set wire_to [list $id $port] ! set port [$id hilite_in $x $y] ! set dehighlight "$c delete ${id}i${port}b; set wire_to {}" set wire_to [list $id $port] return } + puts "***** -> $y2-3-$y = [expr $y2-3-$y]" if {abs($y2-3-$y)<=3} { ! #set port [$self hilite_out $x $y] ! #set dehighlight "$c delete ${self}o${port}b" ! set port [$id hilite_out $x $y] ! set dehighlight "$c delete ${id}o${port}b" return } *************** *** 1418,1422 **** # agree, but could i do this a bit later? --chun
! def objectbox bbox {} {list $@x1 $@y1 [expr $@x1+$@xs] [expr $@y1+$@ys]}
def* canvas click_on_object {x y b f id} { --- 1450,1458 ---- # agree, but could i do this a bit later? --chun
! def objectbox bbox {} { ! puts "bbox : $@cx $@cy [expr $@cx+$@xs] [expr $@cy+$@ys]" ! list $@cx $@cy [expr $@cx+$@xs] [expr $@cy+$@ys] ! ! }
def* canvas click_on_object {x y b f id} { *************** *** 1513,1517 **** # my object edit mode code begins --chun if {[info exists @obj_in_edit]} { ! puts "and some object is being edited" if {$@obj_in_edit > 0} { [lindex $@selection 0] unedit $self --- 1549,1553 ---- # my object edit mode code begins --chun if {[info exists @obj_in_edit]} { ! #puts "and some object is being edited" if {$@obj_in_edit > 0} { [lindex $@selection 0] unedit $self *************** *** 2715,2719 **** set buttons_loaded 0 proc make_button_bar {self doc} { ! global buttons_loaded butt if {!$buttons_loaded} {load_button_bar} frame $self --- 2751,2755 ---- set buttons_loaded 0 proc make_button_bar {self doc} { ! global buttons_loaded butt createdby if {!$buttons_loaded} {load_button_bar} frame $self *************** *** 2735,2738 **** --- 2771,2775 ---- }
+ ############ tooltips