| In: |
tk/lib/tk.rb
|
define TkComm module (step 2: event binding)
| WidgetClassNames | = | {}.taint |
| Tk_IDs | = | ["00000".taint, "00000".taint].freeze # [0]-cmdid, [1]-winid |
| Tk_CMDTBL = {} Tk_WINDOWS = {} | ||
| Tk_CMDTBL | = | Object.new |
| for backward compatibility | ||
| Tk_WINDOWS | = | Object.new |
| GET_CONFIGINFO_AS_ARRAY | = | true |
GET_CONFIGINFO_AS_ARRAY = false => returns a Hash { opt =>val,
… }
true => returns an Array [[opt,val], ... ]
val is a list which includes resource info. |
||
| GET_CONFIGINFOwoRES_AS_ARRAY | = | true |
for configinfo without resource info; list of [opt, value] pair
false => returns a Hash { opt=>val, ... }
true => returns an Array [[opt,val], ... ]
|
||
| USE_TCLs_LIST_FUNCTIONS | = | true |
# File tk/lib/tk.rb, line 765 def bind(tagOrClass, context, cmd=Proc.new, args=nil) _bind(["bind", tagOrClass], context, cmd, args) tagOrClass end
# File tk/lib/tk.rb, line 784 def bind_all(context, cmd=Proc.new, args=nil) _bind(['bind', 'all'], context, cmd, args) TkBindTag::ALL end
# File tk/lib/tk.rb, line 770 def bind_append(tagOrClass, context, cmd=Proc.new, args=nil) _bind_append(["bind", tagOrClass], context, cmd, args) tagOrClass end
# File tk/lib/tk.rb, line 789 def bind_append_all(context, cmd=Proc.new, args=nil) _bind_append(['bind', 'all'], context, cmd, args) TkBindTag::ALL end
# File tk/lib/tk.rb, line 775 def bind_remove(tagOrClass, context) _bind_remove(['bind', tagOrClass], context) tagOrClass end
# File tk/lib/tk.rb, line 794 def bind_remove_all(context) _bind_remove(['bind', 'all'], context) TkBindTag::ALL end
# File tk/lib/tk.rb, line 780 def bindinfo(tagOrClass, context=nil) _bindinfo(['bind', tagOrClass], context) end
# File tk/lib/tk.rb, line 439 def image_obj(val) if val =~ /^i\d+$/ TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val else val end end
# File tk/lib/tk.rb, line 605 def install_cmd(cmd) return '' if cmd == '' id = _next_cmd_id #Tk_CMDTBL[id] = cmd if cmd.kind_of?(TkCallbackEntry) TkCore::INTERP.tk_cmd_tbl[id] = cmd else TkCore::INTERP.tk_cmd_tbl[id] = TkCore::INTERP.get_cb_entry(cmd) end @cmdtbl = [] unless defined? @cmdtbl @cmdtbl.taint unless @cmdtbl.tainted? @cmdtbl.push id #return Kernel.format("rb_out %s", id); return 'rb_out ' + id end