Re: wxEuphoria: wxEVT_MOUSEWHEEL Stuff
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Dec 06, 2005
- 540 views
posted by: cklester <cklester at yahoo.com> cklester wrote: > > > > I'm capturing the mousewheel movement, but can't figure out if the wheel is > > going + or -. The control is a wxListCtrl. Interestingly... the event is > > triggered with a CTRL+Scroll instead of a regular scroll. That's nice, but > > is it intended? :) > > > > Found out by studying mouse_event_position() that I need to use > > call_member_s( wxMouseEvent_GetWheelRotation, event, {}) > > which is new to me! :) Here is my routine for wxIDE (see wxIDE_Syntax.e):
procedure onMouseWheel_Syntax( atom this, atom event_type, atom id, atom event ) integer rotation rotation = floor( call_member_s( wxMouseEvent_GetWheelRotation, event, {}) / 40 ) Void = get_scroll_position( SynVScroll ) set_scroll_position( SynVScroll, Void - rotation ) set_focus( Syntax ) refresh_window( Syntax ) end procedure
Matt Lewis