/[eiffelstudio]/branches/eth/eve/Src/library/vision2/implementation/mswin/widgets/ev_widget_imp.e
ViewVC logotype

Diff of /branches/eth/eve/Src/library/vision2/implementation/mswin/widgets/ev_widget_imp.e

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 88120 by jasonw, Fri Nov 18 09:52:15 2011 UTC revision 88121 by jasonw, Fri Dec 16 14:42:24 2011 UTC
# Line 1076  feature {NONE} -- Implementation Line 1076  feature {NONE} -- Implementation
1076                          -- Wm_mousewheel received.                          -- Wm_mousewheel received.
1077                  local                  local
1078                          l_ignore_default_processing: BOOLEAN                          l_ignore_default_processing: BOOLEAN
1079                            l_delta: INTEGER
1080                  do                  do
1081                          if is_displayed then                          if is_displayed then
1082                                  if application_imp.pick_and_drop_source = Void then                                  if application_imp.pick_and_drop_source = Void then
1083                                            l_delta := delta // wheel_delta
1084                                                    -- With newer mices, the `delta' might be not a multiple of `wheel_delta'
1085                                                    -- or worse, less than `wheel_delta', in which case we still send a +1 or -1
1086                                                    -- delta to the action sequence.
1087                                            if l_delta = 0 and delta /= 0 then
1088                                                    l_delta := delta.sign
1089                                            end
1090                                          if application_imp.mouse_wheel_actions_internal /= Void then                                          if application_imp.mouse_wheel_actions_internal /= Void then
1091                                                  application_imp.mouse_wheel_actions.call ([attached_interface, delta // 120])                                                  application_imp.mouse_wheel_actions.call ([attached_interface, l_delta])
1092                                                  l_ignore_default_processing := True                                                  l_ignore_default_processing := True
1093                                          end                                          end
1094                                          if mouse_wheel_actions_internal /= Void then                                          if mouse_wheel_actions_internal /= Void then
1095                                                  mouse_wheel_actions.call ([delta // 120])                                                  mouse_wheel_actions.call ([l_delta])
1096                                                  l_ignore_default_processing := True                                                  l_ignore_default_processing := True
1097                                          end                                          end
1098                                  else                                  else
# Line 1100  feature {NONE} -- Implementation Line 1108  feature {NONE} -- Implementation
1108                          end                          end
1109                  end                  end
1110    
1111            wheel_delta: INTEGER = 120
1112                            -- Wheel rotation unit. It was set to 120. This is the threshold for action to be taken,
1113                            -- and one such action (for example, scrolling one increment) should occur for each delta.
1114                            --
1115                            -- The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution
1116                            -- wheels in the future, including perhaps a freely-rotating wheel with no notches.
1117                            -- The expectation is that such a device would send more messages per rotation, but
1118                            -- with a smaller value in each message. To support this possibility, you should either
1119                            -- add the incoming delta values until WHEEL_DELTA is reached (so for a delta-rotation
1120                            -- you get the same response), or scroll partial lines in response to the more frequent
1121                            -- messages. You could also choose your scroll granularity and accumulate deltas until it is reached.
1122    
1123  feature {NONE} -- Implementation, focus event  feature {NONE} -- Implementation, focus event
1124    
1125          on_set_focus          on_set_focus

Legend:
Removed from v.88120  
changed lines
  Added in v.88121

  ViewVC Help
Powered by ViewVC 1.1.23