Class: Shoes::Swt::MouseMoveListener

Inherits:
Object
  • Object
show all
Includes:
Common::SafelyEvaluate, Swt::Events::MouseMoveListener
Defined in:
shoes-swt/lib/shoes/swt/mouse_move_listener.rb

Instance Method Summary collapse

Methods included from Common::SafelyEvaluate

#safely_evaluate

Constructor Details

#initialize(app) ⇒ MouseMoveListener

Returns a new instance of MouseMoveListener


9
10
11
# File 'shoes-swt/lib/shoes/swt/mouse_move_listener.rb', line 9

def initialize(app)
  @app = app
end

Instance Method Details

#mouse_move(mouse_event) ⇒ Object


13
14
15
16
17
18
19
# File 'shoes-swt/lib/shoes/swt/mouse_move_listener.rb', line 13

def mouse_move(mouse_event)
  @app.dsl.mouse_pos = [mouse_event.x, mouse_event.y]
  @app.dsl.mouse_motion.each { |blk| eval_move_block blk, mouse_event }
  mouse_shape_control mouse_event
  mouse_leave_control mouse_event
  mouse_hover_control mouse_event
end