Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3768
Modified Files: Tag: devel_0_37 u_main.tk Log Message: scrollwheel. shift-wheel sideways
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.1.1.4.2.13 retrieving revision 1.1.1.4.2.14 diff -C2 -d -r1.1.1.4.2.13 -r1.1.1.4.2.14 *** u_main.tk 12 Aug 2004 06:45:36 -0000 1.1.1.4.2.13 --- u_main.tk 16 Sep 2004 13:53:20 -0000 1.1.1.4.2.14 *************** *** 942,945 **** --- 942,958 ---- bind $name.c <Unmap> {pdtk_canvas_unmap %W} focus $name.c + + switch $pd_nt { 0 { + bind $name.c <Button-4> "pdtk_canvas_scroll $name.c y -1" + bind $name.c <Button-5> "pdtk_canvas_scroll $name.c y +1" + bind $name.c <Shift-Button-4> "pdtk_canvas_scroll $name.c x -1" + bind $name.c <Shift-Button-5> "pdtk_canvas_scroll $name.c x +1" + } default { + bind $name.c <MouseWheel> \ + "pdtk_canvas_scroll $name.c y [expr -abs(%D)/%D]" + bind $name.c <Shift-MouseWheel> \ + "pdtk_canvas_scroll $name.c x [expr -abs(%D)/%D]" + }} + # puts stderr "all done" # after 1 [concat raise $name] *************** *** 1139,1142 **** --- 1152,1159 ---- }
+ proc pdtk_canvas_scroll {canvas xy distance} { + $canvas [list $xy]view scroll $distance units + } + proc pdtk_canvas_motion {name x y mods} { # puts stderr [concat [canvastosym $name] $name $x $y]