| Module | TkComm |
| In: |
tk/lib/tk.rb
|
define TkComm module (step 2: event binding)
| WidgetClassNames | = | {}.taint | ||
| TkExtlibAutoloadModule | = | [].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 182 def _at(x,y=nil) if y "@#{Integer(x)},#{Integer(y)}" else "@#{Integer(x)}" end end
# File tk/lib/tk.rb, line 904 def bind(tagOrClass, context, cmd=Proc.new, *args) _bind(["bind", tagOrClass], context, cmd, *args) tagOrClass end
# File tk/lib/tk.rb, line 923 def bind_all(context, cmd=Proc.new, *args) _bind(['bind', 'all'], context, cmd, *args) TkBindTag::ALL end
# File tk/lib/tk.rb, line 909 def bind_append(tagOrClass, context, cmd=Proc.new, *args) _bind_append(["bind", tagOrClass], context, cmd, *args) tagOrClass end
# File tk/lib/tk.rb, line 928 def bind_append_all(context, cmd=Proc.new, *args) _bind_append(['bind', 'all'], context, cmd, *args) TkBindTag::ALL end
# File tk/lib/tk.rb, line 914 def bind_remove(tagOrClass, context) _bind_remove(['bind', tagOrClass], context) tagOrClass end
# File tk/lib/tk.rb, line 933 def bind_remove_all(context) _bind_remove(['bind', 'all'], context) TkBindTag::ALL end
# File tk/lib/tk.rb, line 919 def bindinfo(tagOrClass, context=nil) _bindinfo(['bind', tagOrClass], context) end
# File tk/lib/tk.rb, line 546 def image_obj(val) if val =~ /^i(_\d+_)?\d+$/ TkImage::Tk_IMGTBL[val]? TkImage::Tk_IMGTBL[val] : val else val end end
# File tk/lib/tk.rb, line 713 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' + TkCore::INTERP._ip_id_ + ' ' + id end