Sha256: 0063eb7078303a84e6c7950bf0c68c88a2019857a8dab64db6a9d9a6632a6082

Contents?: true

Size: 510 Bytes

Versions: 2

Compression:

Stored size: 510 Bytes

Contents

# -*- coding: utf-8 -*-


require 'xot/const_symbol_accessor'
require 'reflex/ext'


module Reflex


  class FocusEvent < Event

    alias get_type type

    const_symbol_reader :type, **{
      none:  TYPE_NONE,
      focus: TYPE_FOCUS,
      blur:  TYPE_BLUR
    }

    def focus?()
      get_type == TYPE_FOCUS
    end

    def blur?()
      get_type == TYPE_BLUR
    end

    def inspect()
      "#<Reflex::FocusEvent type:#{type} current:#{current} last:#{last}>"
    end

  end# FocusEvent


end# Reflex

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
reflexion-0.1.23 lib/reflex/focus_event.rb
reflexion-0.1.22 lib/reflex/focus_event.rb