Module: TkBindCore

Included in:
TkBindTag, TkObject, TkWindow
Defined in:
ext/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



3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'ext/lib/tk.rb', line 3218

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



3231
3232
3233
3234
3235
3236
3237
3238
3239
# File 'ext/lib/tk.rb', line 3231

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



3241
3242
3243
# File 'ext/lib/tk.rb', line 3241

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

#bindinfo(context = nil) ⇒ Object



3245
3246
3247
# File 'ext/lib/tk.rb', line 3245

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