зеркало из https://github.com/github/ruby.git
* ext/tk/lib/tk.rb: TkComm#tk_split_*list fail to split a kind of SJIS
strings. To avoid the trouble, add arguments to control converting encoding, and do split on a UTF8 string. * ext/tk/lib/multi-tk.rb: modify to attend encoding. * ext/tk/lib/remote-tk.rb: ditto. * ext/tk/lib/tk/itemconfig.rb: ditto. * ext/tk/lib/tk/listbox.rb: ditto. * ext/tk/lib/tk/namespace.rb: ditto. * ext/tk/lib/tk/panedwindow.rb: ditto. * ext/tk/lib/tk/text.rb: ditto. * ext/tk/lib/tk/textmark.rb: ditto. * ext/tk/lib/tk/texttag.rb: ditto. * ext/tk/lib/tk/variable.rb: ditto. * ext/tk/lib/tk/winfo.rb: ditto. * ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb: ditto. * ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: ditto. * ext/tk/lib/tk.rb: add TkWindow#lower_window/raise_window and Tk#lower_window/raise_window by reason of method-name conflict * ext/tk/lib/tk/canvas.rb: bug fix on TkCanvas#delete when given non-TkcItem arguments. * ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ac5925d2ab
Коммит
90537dbe3c
40
ChangeLog
40
ChangeLog
|
@ -1,3 +1,43 @@
|
|||
Wed May 25 20:06:27 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/tk.rb: TkComm#tk_split_*list fail to split a kind of SJIS
|
||||
strings. To avoid the trouble, add arguments to control converting
|
||||
encoding, and do split on a UTF8 string.
|
||||
|
||||
* ext/tk/lib/multi-tk.rb: modify to attend encoding.
|
||||
|
||||
* ext/tk/lib/remote-tk.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/itemconfig.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/listbox.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/namespace.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/panedwindow.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/text.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/textmark.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/texttag.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/variable.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk/winfo.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tk.rb: add TkWindow#lower_window/raise_window and
|
||||
Tk#lower_window/raise_window by reason of method-name conflict
|
||||
|
||||
* ext/tk/lib/tk/canvas.rb: bug fix on TkCanvas#delete when given
|
||||
non-TkcItem arguments.
|
||||
|
||||
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto.
|
||||
|
||||
Wed May 25 19:48:12 2005 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/fileutils.rb (rm_r): does chown(2). [ruby-dev:26199]
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
2005-05-25 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* lib/tkextlib/iwidgets/scrolledlistbox.rb: follow the change
|
||||
of tk.rb. modify to attend encoding.
|
||||
|
||||
* ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: ditto.
|
||||
|
||||
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: bug fix on
|
||||
TkCanvas#delete when given non-TkcItem arguments.
|
||||
|
||||
2005-05-10 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* lib/tkextlib/blt/winop.rb: fix typo
|
||||
|
|
|
@ -197,7 +197,9 @@ class MultiTkIp
|
|||
|
||||
def _destroy_slaves_of_slaveIP(ip)
|
||||
unless ip.deleted?
|
||||
ip._split_tklist(ip._invoke('interp', 'slaves')).each{|name|
|
||||
# ip._split_tklist(ip._invoke('interp', 'slaves')).each{|name|
|
||||
ip._split_tklist(ip._invoke_without_enc('interp', 'slaves')).each{|name|
|
||||
name = _fromUTF8(name)
|
||||
begin
|
||||
# ip._eval_without_enc("#{name} eval {foreach i [after info] {after cancel $i}}")
|
||||
after_ids = ip._eval_without_enc("#{name} eval {after info}")
|
||||
|
@ -2397,8 +2399,10 @@ class MultiTkIp
|
|||
num_or_str(@interp._invoke('interp', 'limit', _slavearg(slave),
|
||||
limit_type, slot))
|
||||
else
|
||||
l = @interp._split_tklist(@interp._invoke('interp', 'limit',
|
||||
_slavearg(slave), limit_type))
|
||||
l = @interp._split_tklist(@interp._invoke_without_enc('interp', 'limit',
|
||||
_slavearg(slave),
|
||||
limit_type))
|
||||
l.map!{|s| _fromUTF8(s)}
|
||||
r = {}
|
||||
until l.empty?
|
||||
key = l.shift[1..-1]
|
||||
|
|
|
@ -70,7 +70,7 @@ class RemoteTkIp
|
|||
@interp = MultiTkIp.__getip
|
||||
@interp.allow_ruby_exit = false
|
||||
@appname = @interp._invoke('tk', 'appname')
|
||||
@remote = remote_ip.dup.freeze
|
||||
@remote = remote_ip.to_s.dup.freeze
|
||||
if displayof.kind_of?(TkWindow)
|
||||
@displayof = displayof.path.dup.freeze
|
||||
else
|
||||
|
@ -275,7 +275,8 @@ class RemoteTkIp
|
|||
else
|
||||
lst = @interp._invoke_without_enc('winfo', 'interps')
|
||||
end
|
||||
unless @interp._split_tklist(lst).index(@remote)
|
||||
# unless @interp._split_tklist(lst).index(@remote)
|
||||
unless @interp._split_tklist(lst).index(_toUTF8(@remote))
|
||||
true
|
||||
else
|
||||
false
|
||||
|
|
130
ext/tk/lib/tk.rb
130
ext/tk/lib/tk.rb
|
@ -219,8 +219,12 @@ module TkComm
|
|||
val.gsub(/\\ /, ' ')
|
||||
when /[^\\] /
|
||||
if listobj
|
||||
tk_split_escstr(val).collect{|elt|
|
||||
tk_tcl2ruby(elt, enc_mode, listobj)
|
||||
#tk_split_escstr(val).collect{|elt|
|
||||
# tk_tcl2ruby(elt, enc_mode, listobj)
|
||||
#}
|
||||
val = _toUTF8(val) unless enc_mode
|
||||
tk_split_escstr(val, false, false).collect{|elt|
|
||||
tk_tcl2ruby(elt, true, listobj)
|
||||
}
|
||||
elsif enc_mode
|
||||
_fromUTF8(val)
|
||||
|
@ -249,13 +253,20 @@ if USE_TCLs_LIST_FUNCTIONS
|
|||
# use Tcl function version of split_list
|
||||
###########################################################################
|
||||
|
||||
def tk_split_escstr(str)
|
||||
def tk_split_escstr(str, src_enc=true, dst_enc=true)
|
||||
str = _toUTF8(str) if src_enc
|
||||
if dst_enc
|
||||
TkCore::INTERP._split_tklist(str).map!{|s| _fromUTF8(s)}
|
||||
else
|
||||
TkCore::INTERP._split_tklist(str)
|
||||
end
|
||||
end
|
||||
|
||||
def tk_split_sublist(str, depth=-1)
|
||||
def tk_split_sublist(str, depth=-1, src_enc=true, dst_enc=true)
|
||||
# return [] if str == ""
|
||||
# list = TkCore::INTERP._split_tklist(str)
|
||||
str = _toUTF8(str) if src_enc
|
||||
|
||||
if depth == 0
|
||||
return "" if str == ""
|
||||
list = [str]
|
||||
|
@ -264,28 +275,36 @@ if USE_TCLs_LIST_FUNCTIONS
|
|||
list = TkCore::INTERP._split_tklist(str)
|
||||
end
|
||||
if list.size == 1
|
||||
tk_tcl2ruby(list[0], nil, false)
|
||||
# tk_tcl2ruby(list[0], nil, false)
|
||||
tk_tcl2ruby(list[0], dst_enc, false)
|
||||
else
|
||||
list.collect{|token| tk_split_sublist(token, depth - 1)}
|
||||
list.collect{|token| tk_split_sublist(token, depth - 1, false, dst_enc)}
|
||||
end
|
||||
end
|
||||
|
||||
def tk_split_list(str, depth=0)
|
||||
def tk_split_list(str, depth=0, src_enc=true, dst_enc=true)
|
||||
return [] if str == ""
|
||||
TkCore::INTERP._split_tklist(str).collect{|token|
|
||||
tk_split_sublist(token, depth - 1)
|
||||
str = _toUTF8(str) if src_enc
|
||||
TkCore::INTERP._split_tklist(str).map!{|token|
|
||||
tk_split_sublist(token, depth - 1, false, dst_enc)
|
||||
}
|
||||
end
|
||||
|
||||
def tk_split_simplelist(str)
|
||||
def tk_split_simplelist(str, src_enc=true, dst_enc=true)
|
||||
#lst = TkCore::INTERP._split_tklist(str)
|
||||
#if (lst.size == 1 && lst =~ /^\{.*\}$/)
|
||||
# TkCore::INTERP._split_tklist(str[1..-2])
|
||||
#else
|
||||
# lst
|
||||
#end
|
||||
|
||||
str = _toUTF8(str) if src_enc
|
||||
if dst_enc
|
||||
TkCore::INTERP._split_tklist(str).map!{|s| _fromUTF8(s)}
|
||||
else
|
||||
TkCore::INTERP._split_tklist(str)
|
||||
end
|
||||
end
|
||||
|
||||
def array2tk_list(ary, enc=nil)
|
||||
return "" if ary.size == 0
|
||||
|
@ -310,7 +329,7 @@ else
|
|||
# use Ruby script version of split_list (traditional methods)
|
||||
###########################################################################
|
||||
|
||||
def tk_split_escstr(str)
|
||||
def tk_split_escstr(str, src_enc=true, dst_enc=true)
|
||||
return [] if str == ""
|
||||
list = []
|
||||
token = nil
|
||||
|
@ -331,7 +350,7 @@ else
|
|||
list
|
||||
end
|
||||
|
||||
def tk_split_sublist(str, depth=-1)
|
||||
def tk_split_sublist(str, depth=-1, src_enc=true, dst_enc=true)
|
||||
#return [] if str == ""
|
||||
#return [tk_split_sublist(str[1..-2])] if str =~ /^\{.*\}$/
|
||||
#list = tk_split_escstr(str)
|
||||
|
@ -351,9 +370,11 @@ else
|
|||
end
|
||||
end
|
||||
|
||||
def tk_split_list(str, depth=0)
|
||||
def tk_split_list(str, depth=0, src_enc=true, dst_enc=true)
|
||||
return [] if str == ""
|
||||
tk_split_escstr(str).collect{|token| tk_split_sublist(token, depth - 1)}
|
||||
tk_split_escstr(str).collect{|token|
|
||||
tk_split_sublist(token, depth - 1)
|
||||
}
|
||||
end
|
||||
=begin
|
||||
def tk_split_list(str)
|
||||
|
@ -396,7 +417,7 @@ else
|
|||
end
|
||||
=end
|
||||
|
||||
def tk_split_simplelist(str)
|
||||
def tk_split_simplelist(str, src_enc=true, dst_enc=true)
|
||||
return [] if str == ""
|
||||
list = []
|
||||
token = nil
|
||||
|
@ -528,11 +549,11 @@ end
|
|||
end
|
||||
=end
|
||||
|
||||
def list(val, depth=0)
|
||||
tk_split_list(val, depth)
|
||||
def list(val, depth=0, enc=true)
|
||||
tk_split_list(val, depth, enc, enc)
|
||||
end
|
||||
def simplelist(val)
|
||||
tk_split_simplelist(val)
|
||||
def simplelist(val, src_enc=true, dst_enc=true)
|
||||
tk_split_simplelist(val, src_enc, dst_enc)
|
||||
end
|
||||
def window(val)
|
||||
if val =~ /^\./
|
||||
|
@ -1848,6 +1869,15 @@ module Tk
|
|||
end
|
||||
=end
|
||||
|
||||
def Tk.lower_window(win, below=None)
|
||||
tk_call('lower', _epath(win), _epath(below))
|
||||
nil
|
||||
end
|
||||
def Tk.raise_window(win, above=None)
|
||||
tk_call('raise', _epath(win), _epath(above))
|
||||
nil
|
||||
end
|
||||
|
||||
def Tk.current_grabs(win = nil)
|
||||
if win
|
||||
window(tk_call_without_enc('grab', 'current', win))
|
||||
|
@ -2750,7 +2780,8 @@ module TkConfigMethod
|
|||
if (slot &&
|
||||
slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")), false, true)
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
if ( ! __configinfo_struct[:alias] \
|
||||
|
@ -2772,7 +2803,8 @@ module TkConfigMethod
|
|||
return [slot, '', '', '', self.__send__(method)]
|
||||
|
||||
when /^(#{__numval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2793,7 +2825,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numstrval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2806,7 +2839,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__boolval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2827,7 +2861,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__listval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2840,7 +2875,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numlistval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] \
|
||||
|
@ -2855,9 +2891,11 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__strval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 0, false, true)
|
||||
end
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
@ -2872,8 +2910,10 @@ module TkConfigMethod
|
|||
conf
|
||||
|
||||
else
|
||||
ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
# ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).collect{|conflist|
|
||||
# conf = tk_split_simplelist(conflist)
|
||||
ret = tk_split_simplelist(tk_call_without_enc(*__confinfo_cmd), false, false).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist, false, true)
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
||||
|
@ -3008,7 +3048,8 @@ module TkConfigMethod
|
|||
if (slot &&
|
||||
slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}")), false, true)
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
||||
|
@ -3035,7 +3076,8 @@ module TkConfigMethod
|
|||
return {slot => ['', '', '', self.__send__(method)]}
|
||||
|
||||
when /^(#{__numval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -3056,7 +3098,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numstrval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -3069,7 +3112,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__boolval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -3090,7 +3134,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__listval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -3103,7 +3148,8 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numlistval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] \
|
||||
|
@ -3118,9 +3164,11 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__strval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), false, true)
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
# conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
conf = tk_split_list(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}")), 0, false, true)
|
||||
end
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
@ -3138,8 +3186,10 @@ module TkConfigMethod
|
|||
|
||||
else
|
||||
ret = {}
|
||||
tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
# tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).each{|conflist|
|
||||
# conf = tk_split_simplelist(conflist)
|
||||
tk_split_simplelist(tk_call_without_enc(*__confinfo_cmd), false, false).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist, false, true)
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
||||
|
@ -3862,12 +3912,14 @@ class TkWindow<TkObject
|
|||
tk_call 'lower', epath, below
|
||||
self
|
||||
end
|
||||
alias lower_window lower
|
||||
def raise(above=None)
|
||||
#above = above.epath if above.kind_of?(TkObject)
|
||||
above = _epath(above)
|
||||
tk_call 'raise', epath, above
|
||||
self
|
||||
end
|
||||
alias raise_window raise
|
||||
|
||||
def command(cmd=nil, &b)
|
||||
if cmd
|
||||
|
|
|
@ -161,7 +161,9 @@ class TkCanvas<TkWindow
|
|||
if TkcItem::CItemID_TBL[self.path]
|
||||
args.each{|tag|
|
||||
find('withtag', tag).each{|item|
|
||||
if item.kind_of?(TkcItem)
|
||||
TkcItem::CItemID_TBL[self.path].delete(item.id)
|
||||
end
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
|
@ -243,7 +243,8 @@ module TkItemConfigMethod
|
|||
if TkComm::GET_CONFIGINFO_AS_ARRAY
|
||||
if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")), false, true)
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
|
||||
|
@ -265,7 +266,8 @@ module TkItemConfigMethod
|
|||
return [slot, '', '', '', self.__send__(method, tagOrId)]
|
||||
|
||||
when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -286,7 +288,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -299,7 +302,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -320,7 +324,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -333,7 +338,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
|
||||
|
@ -348,10 +354,12 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_list(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), 0, false, true)
|
||||
end
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
@ -366,8 +374,10 @@ module TkItemConfigMethod
|
|||
conf
|
||||
|
||||
else
|
||||
ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
# ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).collect{|conflist|
|
||||
# conf = tk_split_simplelist(conflist)
|
||||
ret = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist, false, true)
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
||||
|
@ -501,7 +511,8 @@ module TkItemConfigMethod
|
|||
else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
|
||||
if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}")), false, true)
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
||||
|
@ -528,7 +539,8 @@ module TkItemConfigMethod
|
|||
return {slot => ['', '', '', self.__send__(method, tagOrId)]}
|
||||
|
||||
when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -549,7 +561,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -562,7 +575,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -583,7 +597,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -596,7 +611,8 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
|
||||
|
@ -611,10 +627,12 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), false, true)
|
||||
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
# conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_list(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")), 0, false, true)
|
||||
end
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
@ -632,8 +650,10 @@ module TkItemConfigMethod
|
|||
|
||||
else
|
||||
ret = {}
|
||||
tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
# tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))))).each{|conflist|
|
||||
# conf = tk_split_simplelist(conflist)
|
||||
tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist, false, true)
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
||||
|
|
|
@ -46,7 +46,8 @@ class TkListbox<TkTextWin
|
|||
end
|
||||
def get(first, last=nil)
|
||||
if last
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
|
||||
# tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
|
||||
tk_split_simplelist(tk_send_without_enc('get', first, last), false, true)
|
||||
else
|
||||
_fromUTF8(tk_send_without_enc('get', first))
|
||||
end
|
||||
|
|
|
@ -207,7 +207,8 @@ class TkNamespace < TkObject
|
|||
#ns_tk_call(cmd, *args)
|
||||
code_obj = code(cmd)
|
||||
ret = code_obj.call(*args)
|
||||
uninstall_cmd(TkCore::INTERP._split_tklist(code_obj.path)[-1])
|
||||
# uninstall_cmd(TkCore::INTERP._split_tklist(code_obj.path)[-1])
|
||||
uninstall_cmd(_fromUTF8(TkCore::INTERP._split_tklist(_toUTF8(code_obj.path))[-1]))
|
||||
ret
|
||||
end
|
||||
|
||||
|
|
|
@ -107,8 +107,11 @@ class TkPanedWindow<TkWindow
|
|||
# win = win.epath if win.kind_of?(TkObject)
|
||||
win = _epath(win)
|
||||
if key
|
||||
#conf = tk_split_list(tk_send_without_enc('paneconfigure',
|
||||
# win, "-#{key}"))
|
||||
conf = tk_split_list(tk_send_without_enc('paneconfigure',
|
||||
win, "-#{key}"))
|
||||
win, "-#{key}"),
|
||||
false, true)
|
||||
conf[0] = conf[0][1..-1]
|
||||
if conf[0] == 'hide'
|
||||
conf[3] = bool(conf[3]) unless conf[3].empty?
|
||||
|
@ -116,9 +119,12 @@ class TkPanedWindow<TkWindow
|
|||
end
|
||||
conf
|
||||
else
|
||||
tk_split_simplelist(tk_send_without_enc('paneconfigure',
|
||||
win)).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
#tk_split_simplelist(tk_send_without_enc('paneconfigure',
|
||||
# win)).collect{|conflist|
|
||||
# conf = tk_split_simplelist(conflist)
|
||||
tk_split_simplelist(tk_send_without_enc('paneconfigure', win),
|
||||
false, false).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist, false, true)
|
||||
conf[0] = conf[0][1..-1]
|
||||
if conf[3]
|
||||
if conf[0] == 'hide'
|
||||
|
@ -146,8 +152,11 @@ class TkPanedWindow<TkWindow
|
|||
# win = win.epath if win.kind_of?(TkObject)
|
||||
win = _epath(win)
|
||||
if key
|
||||
#conf = tk_split_list(tk_send_without_enc('paneconfigure',
|
||||
# win, "-#{key}"))
|
||||
conf = tk_split_list(tk_send_without_enc('paneconfigure',
|
||||
win, "-#{key}"))
|
||||
win, "-#{key}"),
|
||||
false, true)
|
||||
key = conf.shift[1..-1]
|
||||
if key == 'hide'
|
||||
conf[2] = bool(conf[2]) unless conf[2].empty?
|
||||
|
@ -156,9 +165,12 @@ class TkPanedWindow<TkWindow
|
|||
{ key => conf }
|
||||
else
|
||||
ret = {}
|
||||
tk_split_simplelist(tk_send_without_enc('paneconfigure',
|
||||
win)).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
#tk_split_simplelist(tk_send_without_enc('paneconfigure',
|
||||
# win)).each{|conflist|
|
||||
# conf = tk_split_simplelist(conflist)
|
||||
tk_split_simplelist(tk_send_without_enc('paneconfigure', win),
|
||||
false, false).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist, false, true)
|
||||
key = conf.shift[1..-1]
|
||||
if key
|
||||
if key == 'hide'
|
||||
|
|
|
@ -250,13 +250,15 @@ class TkText<TkTextWin
|
|||
end
|
||||
|
||||
def tag_names(index=None)
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag', 'names', _get_eval_enc_str(index)))).collect{|elt|
|
||||
#tk_split_simplelist(_fromUTF8(tk_send_without_enc('tag', 'names', _get_eval_enc_str(index)))).collect{|elt|
|
||||
tk_split_simplelist(tk_send_without_enc('tag', 'names', _get_eval_enc_str(index)), false, true).collect{|elt|
|
||||
tagid2obj(elt)
|
||||
}
|
||||
end
|
||||
|
||||
def mark_names
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt|
|
||||
#tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt|
|
||||
tk_split_simplelist(tk_send_without_enc('mark', 'names'), false, true).collect{|elt|
|
||||
tagid2obj(elt)
|
||||
}
|
||||
end
|
||||
|
@ -328,15 +330,19 @@ class TkText<TkTextWin
|
|||
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(_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(_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(_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'
|
||||
|
@ -364,16 +370,20 @@ class TkText<TkTextWin
|
|||
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(_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(_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(_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'
|
||||
|
@ -426,7 +436,8 @@ class TkText<TkTextWin
|
|||
end
|
||||
|
||||
def image_names
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt|
|
||||
#tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt|
|
||||
tk_split_simplelist(tk_send_without_enc('image', 'names'), false, true).collect{|elt|
|
||||
tagid2obj(elt)
|
||||
}
|
||||
end
|
||||
|
@ -853,8 +864,11 @@ class TkText<TkTextWin
|
|||
end
|
||||
|
||||
def tag_ranges(tag)
|
||||
#l = tk_split_simplelist(tk_send_without_enc('tag', 'ranges',
|
||||
# _get_eval_enc_str(tag)))
|
||||
l = tk_split_simplelist(tk_send_without_enc('tag', 'ranges',
|
||||
_get_eval_enc_str(tag)))
|
||||
_get_eval_enc_str(tag)),
|
||||
false, true)
|
||||
r = []
|
||||
while key=l.shift
|
||||
r.push [TkText::IndexString.new(key), TkText::IndexString.new(l.shift)]
|
||||
|
@ -1065,7 +1079,8 @@ class TkText<TkTextWin
|
|||
=end
|
||||
|
||||
def window_names
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('window', 'names'))).collect{|elt|
|
||||
# tk_split_simplelist(_fromUTF8(tk_send_without_enc('window', 'names'))).collect{|elt|
|
||||
tk_split_simplelist(tk_send_without_enc('window', 'names'), false, true).collect{|elt|
|
||||
tagid2obj(elt)
|
||||
}
|
||||
end
|
||||
|
|
|
@ -40,7 +40,8 @@ class TkTextMark<TkObject
|
|||
end
|
||||
|
||||
def exist?
|
||||
if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'names'))).find{|id| id == @id } )
|
||||
#if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'mark', 'names'))).find{|id| id == @id } )
|
||||
if ( tk_split_simplelist(tk_call_without_enc(@t.path, 'mark', 'names'), false, true).find{|id| id == @id } )
|
||||
true
|
||||
else
|
||||
false
|
||||
|
|
|
@ -51,7 +51,8 @@ class TkTextTag<TkObject
|
|||
end
|
||||
|
||||
def exist?
|
||||
if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'names'))).find{|id| id == @id } )
|
||||
#if ( tk_split_simplelist(_fromUTF8(tk_call_without_enc(@t.path, 'tag', 'names'))).find{|id| id == @id } )
|
||||
if ( tk_split_simplelist(tk_call_without_enc(@t.path, 'tag', 'names'), false, true).find{|id| id == @id } )
|
||||
true
|
||||
else
|
||||
false
|
||||
|
|
|
@ -412,7 +412,9 @@ TkCore::INTERP.add_tk_procs('rb_var', 'args', <<-'EOL')
|
|||
end
|
||||
#tk_split_simplelist(INTERP._eval("global #{@id}; array get #{@id}"))
|
||||
INTERP._invoke_without_enc('global', @id)
|
||||
tk_split_simplelist(INTERP._fromUTF8(INTERP._invoke_without_enc('array', 'names', @id)))
|
||||
#tk_split_simplelist(INTERP._fromUTF8(INTERP._invoke_without_enc('array', 'names', @id)))
|
||||
tk_split_simplelist(INTERP._invoke_without_enc('array', 'names', @id),
|
||||
false, true)
|
||||
end
|
||||
|
||||
def size
|
||||
|
|
|
@ -121,10 +121,15 @@ module TkWinfo
|
|||
|
||||
def TkWinfo.interps(win=nil)
|
||||
if win
|
||||
#tk_split_simplelist(tk_call_without_enc('winfo', 'interps',
|
||||
# '-displayof', win))
|
||||
tk_split_simplelist(tk_call_without_enc('winfo', 'interps',
|
||||
'-displayof', win))
|
||||
'-displayof', win),
|
||||
false, true)
|
||||
else
|
||||
tk_split_simplelist(tk_call_without_enc('winfo', 'interps'))
|
||||
#tk_split_simplelist(tk_call_without_enc('winfo', 'interps'))
|
||||
tk_split_simplelist(tk_call_without_enc('winfo', 'interps'),
|
||||
false, true)
|
||||
end
|
||||
end
|
||||
def winfo_interps
|
||||
|
|
|
@ -163,7 +163,9 @@ class Tk::Iwidgets::Scrolledcanvas
|
|||
def delete(*args)
|
||||
if TkcItem::CItemID_TBL[self.path]
|
||||
find('withtag', *args).each{|item|
|
||||
if item.kind_of?(TkcItem)
|
||||
TkcItem::CItemID_TBL[self.path].delete(item.id)
|
||||
end
|
||||
}
|
||||
end
|
||||
tk_send_without_enc('delete', *args.collect{|t| tagid(t)})
|
||||
|
|
|
@ -125,7 +125,9 @@ class Tk::Iwidgets::Scrolledlistbox
|
|||
end
|
||||
def get(first, last=nil)
|
||||
if last
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
|
||||
# tk_split_simplelist(_fromUTF8(tk_send_without_enc('get', first, last)))
|
||||
tk_split_simplelist(tk_send_without_enc('get', first, last),
|
||||
false, true)
|
||||
else
|
||||
_fromUTF8(tk_send_without_enc('get', first))
|
||||
end
|
||||
|
|
|
@ -137,15 +137,19 @@ class Tk::Iwidgets::Scrolledtext
|
|||
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(_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(_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(_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'
|
||||
|
@ -173,16 +177,20 @@ class Tk::Iwidgets::Scrolledtext
|
|||
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(_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(_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(_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'
|
||||
|
@ -235,7 +243,8 @@ class Tk::Iwidgets::Scrolledtext
|
|||
end
|
||||
|
||||
def image_names
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt|
|
||||
#tk_split_simplelist(_fromUTF8(tk_send_without_enc('image', 'names'))).collect{|elt|
|
||||
tk_split_simplelist(tk_send_without_enc('image', 'names'), false, true).collect{|elt|
|
||||
tagid2obj(elt)
|
||||
}
|
||||
end
|
||||
|
@ -250,7 +259,8 @@ class Tk::Iwidgets::Scrolledtext
|
|||
end
|
||||
|
||||
def mark_names
|
||||
tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt|
|
||||
#tk_split_simplelist(_fromUTF8(tk_send_without_enc('mark', 'names'))).collect{|elt|
|
||||
tk_split_simplelist(tk_send_without_enc('mark', 'names'), false, true).collect{|elt|
|
||||
tagid2obj(elt)
|
||||
}
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче