Class: Shoes::Swt::MouseListener

Inherits:
Object
  • Object
show all
Defined in:
shoes-swt/lib/shoes/swt/app.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ MouseListener

Returns a new instance of MouseListener.



358
359
360
# File 'shoes-swt/lib/shoes/swt/app.rb', line 358

def initialize(app)
  @app = app
end

Instance Method Details

#mouseDoubleClick(_e) ⇒ Object



372
373
374
# File 'shoes-swt/lib/shoes/swt/app.rb', line 372

def mouseDoubleClick(_e)
  # do nothing
end

#mouseDown(e) ⇒ Object



362
363
364
365
# File 'shoes-swt/lib/shoes/swt/app.rb', line 362

def mouseDown(e)
  @app.dsl.mouse_button = e.button
  @app.dsl.mouse_pos = [e.x, e.y]
end

#mouseUp(e) ⇒ Object



367
368
369
370
# File 'shoes-swt/lib/shoes/swt/app.rb', line 367

def mouseUp(e)
  @app.dsl.mouse_button = 0
  @app.dsl.mouse_pos = [e.x, e.y]
end