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



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

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



3412
3413
3414
3415
3416
3417
3418
3419
3420
# File 'lib/tk.rb', line 3412

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



3422
3423
3424
# File 'lib/tk.rb', line 3422

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

#bindinfo(context = nil) ⇒ Object



3426
3427
3428
# File 'lib/tk.rb', line 3426

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