Module: TkBindCore

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

Instance Method Summary collapse

Instance Method Details

#bind(context, *args, &block) ⇒ Object



3311
3312
3313
3314
3315
3316
3317
3318
3319
# File 'lib/tk.rb', line 3311

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

#bind_append(context, *args, &block) ⇒ Object



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

def bind_append(context, *args, &block)
  # if args[0].kind_of?(Proc) || args[0].kind_of?(Method)
  if TkComm._callback_entry?(args[0]) || !block
    cmd = args.shift
  else
    cmd = block
  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