Sha256: 704a152389644023a87a4110959dfa0b6c4ec930a43c2d03e62007c080c43a75

Contents?: true

Size: 1.35 KB

Versions: 94

Compression:

Stored size: 1.35 KB

Contents

#
# The purpose of this library is to provide a few new methods
# similar to those used by Ruby/Tk.
#

module Fox
  class FXObject
    def bind(str, pr)
      tokens = str.split('-')
      modifiers = []
      type = nil
      detail = nil
      case type
        when "Button"
        when "ButtonPress"
          connect(SEL_LEFTBUTTONPRESS, pr)
        when "ButtonRelease"
          connect(SEL_LEFTBUTTONRELEASE, pr)
        when "Configure"
          connect(SEL_CONFIGURE, pr)
        when "Deactivate"
        when "Destroy"
          connect(SEL_DESTROY, pr)
        when "Enter"
          connect(SEL_ENTER, pr)
        when "Expose"
          connect(SEL_PAINT, pr)
        when "FocusIn"
          connect(SEL_FOCUSIN, pr)
        when "FocusOut"
          connect(SEL_FOCUSOUT, pr)
        when "Key"
        when "KeyPress"
          connect(SEL_KEYPRESS, pr)
        when "KeyRelease"
          connect(SEL_KEYRELEASE, pr)
        when "Leave"
          connect(SEL_LEAVE, pr)
        when "Motion"
          connect(SEL_MOTION, pr)
        when "Map"
          connect(SEL_MAP, pr)
        when "Unmap"
          connect(SEL_UNMAP, pr)
        when "Activate"
        when "Circulate"
        when "Colormap"
        when "Gravity"
        when "Property"
        when "Reparent"
        when "Visibility"
          raise NotImplementedError
      end
    end
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
fxruby-1.6.37-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.37.rc1 lib/fox16/tkcompat.rb
fxruby-1.6.37.rc1-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.37.rc1-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.36 lib/fox16/tkcompat.rb
fxruby-1.6.36-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.36-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.35-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.35-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.35 lib/fox16/tkcompat.rb
fxruby-1.6.34-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.34-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.34 lib/fox16/tkcompat.rb
fxruby-1.6.33-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.33-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.33 lib/fox16/tkcompat.rb
fxruby-1.6.32-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.32-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.32 lib/fox16/tkcompat.rb
fxruby-1.6.32.pre2-x64-mingw32 lib/fox16/tkcompat.rb