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



3308
3309
3310
3311
3312
3313
3314
3315
3316
# File 'lib/tk.rb', line 3308

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



3321
3322
3323
3324
3325
3326
3327
3328
3329
# File 'lib/tk.rb', line 3321

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



3331
3332
3333
# File 'lib/tk.rb', line 3331

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

#bindinfo(context = nil) ⇒ Object



3335
3336
3337
# File 'lib/tk.rb', line 3335

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