Class: Reflex::Pointer

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/reflex/pointer.rb

Instance Method Summary collapse

Instance Method Details

#<=>(o) ⇒ Object



93
94
95
# File 'lib/reflex/pointer.rb', line 93

def <=>(o)
  inspect <=> o.inspect
end

#cancel?Boolean

Returns:

  • (Boolean)


75
76
77
# File 'lib/reflex/pointer.rb', line 75

def cancel?()
  get_action == CANCEL
end

#down?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/reflex/pointer.rb', line 63

def down?()
  get_action == DOWN
end

#inspectObject



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

Returns:

  • (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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


43
44
45
# File 'lib/reflex/pointer.rb', line 43

def mouse_right?()
  (get_types & MOUSE_RIGHT) != 0
end

#move?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/reflex/pointer.rb', line 71

def move?()
  get_action == MOVE
end

#pen?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/reflex/pointer.rb', line 59

def pen?()
  (get_types & PEN) != 0
end

#stay?Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/reflex/pointer.rb', line 79

def stay?()
  get_action == STAY
end

#touch?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/reflex/pointer.rb', line 55

def touch?()
  (get_types & TOUCH) != 0
end

#up?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/reflex/pointer.rb', line 67

def up?()
  get_action == UP
end

#xObject



85
86
87
# File 'lib/reflex/pointer.rb', line 85

def x()
  position.x
end

#yObject



89
90
91
# File 'lib/reflex/pointer.rb', line 89

def y()
  position.y
end