Module: TkBindCore

Included in:
TkBindTag, TkObject, TkWindow
Defined in:
lib/tk.rb

Instance Method Summary collapse

Instance Method Details

#bind(context, *args) ⇒ Object

def bind(context, cmd=Proc.new, *args)

Tk.bind(self, context, cmd, *args)

end



3387
3388
3389
3390
3391
3392
3393
3394
3395
# File 'lib/tk.rb', line 3387

def bind(context, *args)
  # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  Tk.bind(self, context, cmd, *args)
end

#bind_append(context, *args) ⇒ Object

def bind_append(context, cmd=Proc.new, *args)

Tk.bind_append(self, context, cmd, *args)

end



3400
3401
3402
3403
3404
3405
3406
3407
3408
# File 'lib/tk.rb', line 3400

def bind_append(context, *args)
  # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  Tk.bind_append(self, context, cmd, *args)
end

#bind_remove(context) ⇒ Object



3410
3411
3412
# File 'lib/tk.rb', line 3410

def bind_remove(context)
  Tk.bind_remove(self, context)
end

#bindinfo(context = nil) ⇒ Object



3414
3415
3416
# File 'lib/tk.rb', line 3414

def bindinfo(context=nil)
  Tk.bindinfo(self, context)
end