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