TkText
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 64 def add_name(nick, opts={}) tk_send('name', 'add', nick, *(hash_kv(opts))) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 149 def chat_widget window(tk_send('chat')) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 68 def delete_name(nick) tk_send('name', 'delete', nick) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 145 def entry_widget window(tk_send('entry')) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 72 def get_name(nick) lst = tk_send('name', 'get', nick) return nil if lst.empty? nick, *opts = tk_split_simplelist(lst) h_opt = {} opts.slice(2){|k, v| h_opt[k[1..-1]] = tk_tcl2ruby(v)} [nick, h_opt] end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 136 def hide_names tk_send('names', 'hide') self end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 42 def hide_topic tk_send_without_enc('topic', 'hide') self end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 94 def hook_add(type, *args, &blk) # args -> [prior, cmd], [prior], [cmd] #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url' if prior = args.shift if !prior.kind_of?(Numeric) cmd = prior if (prior = args.shift) && !prior.kind_of?(Numeric) # error args.unshift(prior) end args.unshift(cmd) end prior ||= 50 # default priority end cmd = args.shift || blk fail ArgumentError, "invalid arguments" unless args.empty? fail ArgumentError, "no callback is given" unless cmd _parse_hook_list(tk_send('hook', 'add', type, cmd, prior)) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 126 def hook_list(type) #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url' _parse_hook_list(tk_send('hook', 'list', type)) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 116 def hook_remove(type, cmd) #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url' _parse_hook_list(tk_send('hook', 'remove', type, cmd)) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 121 def hook_run(type, *cmd_args) #type -> 'message', 'post', 'names_group', 'names_nick', 'chatstate', 'url' tk_send('hook', 'run', type, *cmd_args) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 51 def list_name tk_split_simplelist(tk_send('name', 'list')) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 55 def list_name_full tk_split_simplelist(tk_send('name', 'list')).map{|lst| nick, *opts = tk_split_simplelist(lst) h_opt = {} opts.slice(2){|k, v| h_opt[k[1..-1]] = tk_tcl2ruby(v)} [nick, h_opt] } end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 81 def message(msg, opts={}) tk_send('message', msg, *(hash_kv(opts))) self end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 141 def names_widget window(tk_send('names')) end
# File tk/lib/tkextlib/tcllib/chatwidget.rb, line 47 def set_topic(topic) tk_send('topic', 'set', topic) end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.