Sha256: c449a90952e29f4c90483a6581d35b62f99cbb812a0c0933299eb30389dde116

Contents?: true

Size: 706 Bytes

Versions: 9

Compression:

Stored size: 706 Bytes

Contents

module UI
  class Control < View
    CONTROL_EVENTS = {
      touch:              UIControlEventTouchUpInside,
      editing_changed:    UIControlEventEditingChanged,
      editing_did_begin:  UIControlEventEditingDidBegin,
      editing_did_end:    UIControlEventEditingDidEnd
    }

    CONTROL_STATES = {
      normal:       UIControlStateNormal,
      highlighted:  UIControlStateHighlighted,
      disabled:     UIControlStateDisabled,
      selected:     UIControlStateSelected,
      focused:      UIControlStateFocused
    }

    def blur
      proxy.resignFirstResponder
    end

    def focus
      proxy.becomeFirstResponder
    end

    def focus?
      proxy.firstResponder?
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
motion-flow-0.1.8 flow/ui/cocoa/control.rb
motion-flow-0.1.7 flow/ui/cocoa/control.rb
motion-flow-0.1.6 flow/ui/cocoa/control.rb
motion-flow-0.1.5 flow/ui/cocoa/control.rb
motion-flow-0.1.4 flow/ui/cocoa/control.rb
motion-flow-0.1.3 flow/ui/cocoa/control.rb
motion-flow-0.1.2 flow/ui/cocoa/control.rb
motion-flow-0.1.1 flow/ui/cocoa/control.rb
motion-flow-0.1 flow/ui/cocoa/control.rb