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



2497
2498
2499
2500
2501
2502
2503
2504
2505
# File 'lib/tk.rb', line 2497

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



2510
2511
2512
2513
2514
2515
2516
2517
2518
# File 'lib/tk.rb', line 2510

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



2520
2521
2522
# File 'lib/tk.rb', line 2520

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

#bindinfo(context = nil) ⇒ Object



2524
2525
2526
# File 'lib/tk.rb', line 2524

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