Sha256: 0d0a5cfc8e406c1bfe2b712b652af09f8570581727a0ddeff2365cad27883b97

Contents?: true

Size: 744 Bytes

Versions: 16

Compression:

Stored size: 744 Bytes

Contents

require 'forwardable'
require 'reflex/ext'


module Reflex


  class PointerEvent < Event

    include Enumerable

    extend Forwardable

    def_delegators :first,
      :id,
      :types, :mouse?, :touch?, :pen?,
      :mouse_left?, :left?, :mouse_right?, :right?, :mouse_middle?, :middle?,
      :action, :down?, :up?, :move?, :cancel?, :stay?,
      :position, :pos, :x, :y, :modifiers, :drag?, :click_count, :view_index,
      :time, :prev, :down

    def pointers()
      to_enum :each
    end

    def inspect()
      "#<Reflex::PointerEvent 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

  end# PointerEvent


end# Reflex

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
reflexion-0.3 lib/reflex/pointer_event.rb
reflexion-0.2.1 lib/reflex/pointer_event.rb
reflexion-0.2 lib/reflex/pointer_event.rb
reflexion-0.1.57 lib/reflex/pointer_event.rb
reflexion-0.1.56 lib/reflex/pointer_event.rb
reflexion-0.1.55 lib/reflex/pointer_event.rb
reflexion-0.1.54 lib/reflex/pointer_event.rb
reflexion-0.1.53 lib/reflex/pointer_event.rb
reflexion-0.1.52 lib/reflex/pointer_event.rb
reflexion-0.1.51 lib/reflex/pointer_event.rb
reflexion-0.1.50 lib/reflex/pointer_event.rb
reflexion-0.1.49 lib/reflex/pointer_event.rb
reflexion-0.1.48 lib/reflex/pointer_event.rb
reflexion-0.1.47 lib/reflex/pointer_event.rb
reflexion-0.1.46 lib/reflex/pointer_event.rb
reflexion-0.1.45 lib/reflex/pointer_event.rb