[PD-cvs] pd/src u_main.tk,1.1.1.4.2.7.4.35,1.1.1.4.2.7.4.36
Mathieu Bouchard
matju at users.sourceforge.net
Wed Apr 7 07:15:41 CEST 2004
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4717
Modified Files:
Tag: impd_0_37
u_main.tk
Log Message:
tooltips now also disappear after a 10-pixel travel of the mouse
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.7.4.35
retrieving revision 1.1.1.4.2.7.4.36
diff -C2 -d -r1.1.1.4.2.7.4.35 -r1.1.1.4.2.7.4.36
*** u_main.tk 7 Apr 2004 03:17:40 -0000 1.1.1.4.2.7.4.35
--- u_main.tk 7 Apr 2004 05:15:38 -0000 1.1.1.4.2.7.4.36
***************
*** 930,935 ****
}
proc pdtk_canvas_motion {canvas x y mods} {
! pd [canvastosym $canvas] motion [$canvas canvasx $x] [$canvas canvasy $y] $mods \;
}
--- 930,949 ----
}
+ set current_x 0
+ set current_y 0
+ #set current_canvas foo
proc pdtk_canvas_motion {canvas x y mods} {
! global current_x current_y tooltip
! set x [$canvas canvasx $x]
! set y [$canvas canvasx $y]
! if {$tooltip(visible)} {
! puts "x=$x y=$y tooltip=($tooltip(mx),$tooltip(my),$tooltip(canvas),$tooltip(visible)"
! if {[expr pow($tooltip(mx)-$x,2) + pow($tooltip(my)-$y,2) > 100]} {
! hide_canvas_tooltip $tooltip(canvas)
! }
! }
! set current_x $x
! set current_y $y
! pd [canvastosym $canvas] motion $x $y $mods \;
}
***************
*** 2440,2443 ****
--- 2454,2462 ----
############ tooltips
+ set tooltip(mx) -1000
+ set tooltip(my) -1000
+ set tooltip(canvas) foo
+ set tooltip(visible) 0
+
# woops, self is for future use
proc show_canvas_tooltip {self canvas x y text} {
***************
*** 2454,2461 ****
--- 2473,2488 ----
-fill "#ffffcc" -outline "#000000" -tags tooltip_bg
$canvas lower tooltip_bg tooltip_fg
+ global current_x current_y
+ global tooltip
+ set tooltip(mx) $current_x
+ set tooltip(my) $current_y
+ set tooltip(canvas) $canvas
+ set tooltip(visible) 1
}
proc hide_canvas_tooltip {canvas} {
$canvas delete tooltip_bg tooltip_fg
+ global tooltip
+ set tooltip(visible) 0
}
More information about the Pd-cvs
mailing list