Class: Chamomile::MouseEvent
- Inherits:
-
Data
- Object
- Data
- Chamomile::MouseEvent
- Defined in:
- lib/chamomile/messages.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#button ⇒ Object
readonly
Returns the value of attribute button.
-
#mod ⇒ Object
readonly
Returns the value of attribute mod.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
- #alt? ⇒ Boolean
- #ctrl? ⇒ Boolean
- #motion? ⇒ Boolean
- #press? ⇒ Boolean
- #release? ⇒ Boolean
- #shift? ⇒ Boolean
- #wheel? ⇒ Boolean
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action
31 32 33 |
# File 'lib/chamomile/messages.rb', line 31 def action @action end |
#button ⇒ Object (readonly)
Returns the value of attribute button
31 32 33 |
# File 'lib/chamomile/messages.rb', line 31 def @button end |
#mod ⇒ Object (readonly)
Returns the value of attribute mod
31 32 33 |
# File 'lib/chamomile/messages.rb', line 31 def mod @mod end |
#x ⇒ Object (readonly)
Returns the value of attribute x
31 32 33 |
# File 'lib/chamomile/messages.rb', line 31 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y
31 32 33 |
# File 'lib/chamomile/messages.rb', line 31 def y @y end |
Instance Method Details
#alt? ⇒ Boolean
37 |
# File 'lib/chamomile/messages.rb', line 37 def alt? = mod.include?(:alt) |
#ctrl? ⇒ Boolean
35 |
# File 'lib/chamomile/messages.rb', line 35 def ctrl? = mod.include?(:ctrl) |
#motion? ⇒ Boolean
34 |
# File 'lib/chamomile/messages.rb', line 34 def motion? = action == MOUSE_MOTION |
#release? ⇒ Boolean
33 |
# File 'lib/chamomile/messages.rb', line 33 def release? = action == MOUSE_RELEASE |
#shift? ⇒ Boolean
36 |
# File 'lib/chamomile/messages.rb', line 36 def shift? = mod.include?(:shift) |
#wheel? ⇒ Boolean
38 |
# File 'lib/chamomile/messages.rb', line 38 def wheel? = [MOUSE_WHEEL_UP, MOUSE_WHEEL_DOWN].include?() |