I am trying to use the mouse wheel event mwheel in 64 bit J7. The wheel
value is the last element in sysdata and it doesn't change as I turn the
mouse wheel.

The last three values of sysdata appear to be hard coded to 0 0 1 in
scroll_event in gl2.ijs:

sysdata__PLocale=:
0":mousepos,gtkwh,button1,button2,control,shift,button3,0,0,1


Is this a bug? If not then how do I distinguish between different wheel
directions?

If you run the script below and use the mouse wheel over the black area, you
should see what I mean.

Many Thanks,

David


require 'gl2 gui/gtk'
coinsert 'jgtk jgl2'

make_main_window=: 3 : 0

window=: gtk_window_new GTK_WINDOW_TOPLEVEL

Size=. 300 300
PForm=. 'plot'
PId=. 'g'
PIdLoc=: glcanvas PForm;PId;Size;coname''

box1=. gtk_vbox_new 0 0

label =: gtk_label_new <'  '
gtk_container_add window, box1

gtk_box_pack_start box1 , label , 1 1 0
 gtk_box_pack_start box1 , canvas__PIdLoc , 1 1 0

gtk_widget_show_all window
0
)

plot_g_paint=: 3 : 0
'W H'=. glqwh''
glclear''
glrgb 0 0 0
glbrush''
glrect 0 0,W,H
)

plot_g_mwheel=: 3 : 0
gtk_label_set_text label ; 'sysdata = ', ": sysdata
)

make_main_window ''
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to