Class: Reflex::Pointer
- Inherits:
-
Object
- Object
- Reflex::Pointer
- Includes:
- Comparable
- Defined in:
- lib/reflex/pointer.rb
Instance Method Summary collapse
- #<=>(o) ⇒ Object
- #cancel? ⇒ Boolean
- #down? ⇒ Boolean
- #inspect ⇒ Object
- #mouse? ⇒ Boolean
- #mouse_left? ⇒ Boolean (also: #left?)
- #mouse_middle? ⇒ Boolean (also: #middle?)
- #mouse_right? ⇒ Boolean (also: #right?)
- #move? ⇒ Boolean
- #pen? ⇒ Boolean
- #stay? ⇒ Boolean
- #touch? ⇒ Boolean
- #up? ⇒ Boolean
- #x ⇒ Object
- #y ⇒ Object
Instance Method Details
#<=>(o) ⇒ Object
93 94 95 |
# File 'lib/reflex/pointer.rb', line 93 def <=>(o) inspect <=> o.inspect end |
#cancel? ⇒ Boolean
75 76 77 |
# File 'lib/reflex/pointer.rb', line 75 def cancel?() get_action == CANCEL end |
#down? ⇒ Boolean
63 64 65 |
# File 'lib/reflex/pointer.rb', line 63 def down?() get_action == DOWN end |
#inspect ⇒ Object
97 98 99 |
# File 'lib/reflex/pointer.rb', line 97 def inspect() "#<Reflex::Pointer id:#{id} #{types} #{action} (#{x.round 2}, #{y.round 2}) mod:#{modifiers} drag:#{drag?} click:#{click_count} view:#{view_index} time:#{time.round 2}>" end |
#mouse? ⇒ Boolean
35 36 37 |
# File 'lib/reflex/pointer.rb', line 35 def mouse?() (get_types & MOUSE) != 0 end |
#mouse_left? ⇒ Boolean Also known as: left?
39 40 41 |
# File 'lib/reflex/pointer.rb', line 39 def mouse_left?() (get_types & MOUSE_LEFT) != 0 end |
#mouse_middle? ⇒ Boolean Also known as: middle?
47 48 49 |
# File 'lib/reflex/pointer.rb', line 47 def mouse_middle?() (get_types & MOUSE_MIDDLE) != 0 end |
#mouse_right? ⇒ Boolean Also known as: right?
43 44 45 |
# File 'lib/reflex/pointer.rb', line 43 def mouse_right?() (get_types & MOUSE_RIGHT) != 0 end |
#move? ⇒ Boolean
71 72 73 |
# File 'lib/reflex/pointer.rb', line 71 def move?() get_action == MOVE end |
#pen? ⇒ Boolean
59 60 61 |
# File 'lib/reflex/pointer.rb', line 59 def pen?() (get_types & PEN) != 0 end |
#stay? ⇒ Boolean
79 80 81 |
# File 'lib/reflex/pointer.rb', line 79 def stay?() get_action == STAY end |
#touch? ⇒ Boolean
55 56 57 |
# File 'lib/reflex/pointer.rb', line 55 def touch?() (get_types & TOUCH) != 0 end |
#up? ⇒ Boolean
67 68 69 |
# File 'lib/reflex/pointer.rb', line 67 def up?() get_action == UP end |
#x ⇒ Object
85 86 87 |
# File 'lib/reflex/pointer.rb', line 85 def x() position.x end |
#y ⇒ Object
89 90 91 |
# File 'lib/reflex/pointer.rb', line 89 def y() position.y end |