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.43-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.43-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.42 lib/fox16/tkcompat.rb
fxruby-1.6.42-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.42-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.41 lib/fox16/tkcompat.rb
fxruby-1.6.41-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.41-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.40-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.40-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.40 lib/fox16/tkcompat.rb
fxruby-1.6.39 lib/fox16/tkcompat.rb
fxruby-1.6.39-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.39-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.38 lib/fox16/tkcompat.rb
fxruby-1.6.38-x64-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.38-x86-mingw32 lib/fox16/tkcompat.rb
fxruby-1.6.38.pre1 lib/fox16/tkcompat.rb
fxruby-1.6.37 lib/fox16/tkcompat.rb
fxruby-1.6.37-x64-mingw32 lib/fox16/tkcompat.rb