Methods
- B
- C
- D
- E
- G
- I
- M
- N
- P
- R
- S
- T
- U
- X
- Y
Included Modules
Constants
TkCommandNames | = | ['::iwidgets::scrolledtext'.freeze].freeze |
WidgetClassName | = | 'Scrolledtext'.freeze |
Class Public methods
new(*args)
Link
Instance Public methods
bbox(index)
Link
child_site()
Link
clear()
Link
compare(idx1, op, idx2)
Link
current_image_configinfo(index, slot = nil)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 259 def current_image_configinfo(index, slot = nil) if TkComm::GET_CONFIGINFO_AS_ARRAY if slot conf = image_configinfo(index, slot) {conf[0] => conf[4]} else ret = {} image_configinfo(index).each{|conf| ret[conf[0]] = conf[4] if conf.size > 2 } ret end else # ! TkComm::GET_CONFIGINFO_AS_ARRAY ret = {} image_configinfo(index, slot).each{|k, conf| ret[k] = conf[-1] if conf.kind_of?(Array) } ret end end
debug()
Link
debug=(boolean)
Link
delete(first, last=None)
Link
dlineinfo(index)
Link
export(file)
Link
get(*index)
Link
get_displaychars(*index)
Link
image_cget(index, slot)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 134 def image_cget(index, slot) unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ image_cget_strict(index, slot) else begin image_cget_strict(index, slot) rescue => e begin if current_image_configinfo.has_key?(slot.to_s) # error on known option fail e else # unknown option nil end rescue fail e # tag error end end end end
image_cget_strict(index, slot)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 123 def image_cget_strict(index, slot) case slot.to_s when 'text', 'label', 'show', 'data', 'file' _fromUTF8(tk_send_without_enc('image', 'cget', _get_eval_enc_str(index), "-#{slot}")) else tk_tcl2ruby(_fromUTF8(tk_send_without_enc('image', 'cget', _get_eval_enc_str(index), "-#{slot}"))) end end
image_cget_tkstring(index, slot)
Link
image_configinfo(index, slot = nil)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 170 def image_configinfo(index, slot = nil) if TkComm::GET_CONFIGINFO_AS_ARRAY if slot case slot.to_s when 'text', 'label', 'show', 'data', 'file' #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true) else #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true) end conf[0] = conf[0][1..-1] conf else #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).collect{|conflist| # conf = tk_split_simplelist(conflist) tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).collect{|conflist| conf = tk_split_simplelist(conflist, false, true) conf[0] = conf[0][1..-1] case conf[0] when 'text', 'label', 'show', 'data', 'file' else if conf[3] if conf[3].index('{') conf[3] = tk_split_list(conf[3]) else conf[3] = tk_tcl2ruby(conf[3]) end end if conf[4] if conf[4].index('{') conf[4] = tk_split_list(conf[4]) else conf[4] = tk_tcl2ruby(conf[4]) end end end conf[1] = conf[1][1..-1] if conf.size == 2 # alias info conf } end else # ! TkComm::GET_CONFIGINFO_AS_ARRAY if slot case slot.to_s when 'text', 'label', 'show', 'data', 'file' #conf = tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) conf = tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), false, true) else #conf = tk_split_list(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"))) conf = tk_split_list(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}"), 0, false, true) end key = conf.shift[1..-1] { key => conf } else ret = {} #tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)))).each{|conflist| # conf = tk_split_simplelist(conflist) tk_split_simplelist(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index)), false, false).each{|conflist| conf = tk_split_simplelist(conflist, false, true) key = conf.shift[1..-1] case key when 'text', 'label', 'show', 'data', 'file' else if conf[2] if conf[2].index('{') conf[2] = tk_split_list(conf[2]) else conf[2] = tk_tcl2ruby(conf[2]) end end if conf[3] if conf[3].index('{') conf[3] = tk_split_list(conf[3]) else conf[3] = tk_tcl2ruby(conf[3]) end end end if conf.size == 1 ret[key] = conf[0][1..-1] # alias info else ret[key] = conf end } ret end end end
image_configure(index, slot, value=None)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 156 def image_configure(index, slot, value=None) if slot.kind_of? Hash _fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), *hash_kv(slot, true))) else _fromUTF8(tk_send_without_enc('image', 'configure', _get_eval_enc_str(index), "-#{slot}", _get_eval_enc_str(value))) end self end
image_names()
Link
import(file, idx=nil)
Link
index(idx)
Link
insert(index, *args)
Link
mark_gravity(mark, direction=nil)
Link
mark_names()
Link
method_missing(id, *args)
Link
rsearch(pat,start,stop=None)
Link
rsearch_with_length(pat,start,stop=None)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 476 def rsearch_with_length(pat,start,stop=None) pat = pat.chr if pat.kind_of? Integer if stop != None return ["", 0] if compare(start,'<=',stop) txt = get(stop,start) if (pos = txt.rindex(pat)) match = $& #pos = txt[0..(pos-1)].split('').length if pos > 0 pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 if pat.kind_of? String #return [index(stop + " + #{pos} chars"), pat.split('').length] return [index(stop + " + #{pos} chars"), _ktext_length(pat), pat.dup] else #return [index(stop + " + #{pos} chars"), $&.split('').length] return [index(stop + " + #{pos} chars"), _ktext_length(match), match] end else return ["", 0] end else txt = get('1.0',start) if (pos = txt.rindex(pat)) match = $& #pos = txt[0..(pos-1)].split('').length if pos > 0 pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 if pat.kind_of? String #return [index("1.0 + #{pos} chars"), pat.split('').length] return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] else #return [index("1.0 + #{pos} chars"), $&.split('').length] return [index("1.0 + #{pos} chars"), _ktext_length(match), match] end else txt = get('1.0','end - 1 char') if (pos = txt.rindex(pat)) match = $& #pos = txt[0..(pos-1)].split('').length if pos > 0 pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 if pat.kind_of? String #return [index("1.0 + #{pos} chars"), pat.split('').length] return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] else #return [index("1.0 + #{pos} chars"), $&.split('').length] return [index("1.0 + #{pos} chars"), _ktext_length(match), match] end else return ["", 0] end end end end
scan_dragto(x, y)
Link
scan_mark(x, y)
Link
search(pat,start,stop=None)
Link
search_with_length(pat,start,stop=None)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 415 def search_with_length(pat,start,stop=None) pat = pat.chr if pat.kind_of? Integer if stop != None return ["", 0] if compare(start,'>=',stop) txt = get(start,stop) if (pos = txt.index(pat)) match = $& #pos = txt[0..(pos-1)].split('').length if pos > 0 pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 if pat.kind_of? String #return [index(start + " + #{pos} chars"), pat.split('').length] return [index(start + " + #{pos} chars"), _ktext_length(pat), pat.dup] else #return [index(start + " + #{pos} chars"), $&.split('').length] return [index(start + " + #{pos} chars"), _ktext_length(match), match] end else return ["", 0] end else txt = get(start,'end - 1 char') if (pos = txt.index(pat)) match = $& #pos = txt[0..(pos-1)].split('').length if pos > 0 pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 if pat.kind_of? String #return [index(start + " + #{pos} chars"), pat.split('').length] return [index(start + " + #{pos} chars"), _ktext_length(pat), pat.dup] else #return [index(start + " + #{pos} chars"), $&.split('').length] return [index(start + " + #{pos} chars"), _ktext_length(match), match] end else txt = get('1.0','end - 1 char') if (pos = txt.index(pat)) match = $& #pos = txt[0..(pos-1)].split('').length if pos > 0 pos = _ktext_length(txt[0..(pos-1)]) if pos > 0 if pat.kind_of? String #return [index("1.0 + #{pos} chars"), pat.split('').length] return [index("1.0 + #{pos} chars"), _ktext_length(pat), pat.dup] else #return [index("1.0 + #{pos} chars"), $&.split('').length] return [index("1.0 + #{pos} chars"), _ktext_length(match), match] end else return ["", 0] end end end end
see(index)
Link
tksearch(*args)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 375 def tksearch(*args) # call 'search' subcommand of text widget # args ::= [<array_of_opts>] <pattern> <start_index> [<stop_index>] # If <pattern> is regexp, then it must be a regular expression of Tcl if args[0].kind_of?(Array) opts = args.shift.collect{|opt| '-' + opt.to_s } else opts = [] end opts << '--' ret = tk_send('search', *(opts + args)) if ret == "" nil else ret end end
tksearch_with_count(*args)
Link
# File ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb, line 395 def tksearch_with_count(*args) # call 'search' subcommand of text widget # args ::= [<array_of_opts>] <var> <pattern> <start_index> [<stop_index>] # If <pattern> is regexp, then it must be a regular expression of Tcl if args[0].kind_of?(Array) opts = args.shift.collect{|opt| '-' + opt.to_s } else opts = [] end opts << '-count' << args.shift << '--' ret = tk_send('search', *(opts + args)) if ret == "" nil else ret end end
xview(*index)
Link
xview_moveto(*index)
Link
xview_scroll(*index)
Link
yview(*index)
Link
yview_moveto(*index)
Link