mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/lib/tk.rb: support to use different Tcl commands between
configure and configinfo * ext/tk/lib/font.rb: ditto. * ext/tk/lib/itemconfig.rb: support to use different Tcl commands between item_configure and item_configinfo * ext/tk/lib/itemfont.rb: ditto. * ext/tk/extconf.rb: install SUPPORT_STATUS * ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ae00aafd1
commit
39c871c925
15 changed files with 105 additions and 47 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
Wed Nov 3 17:02:48 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/lib/tk.rb: support to use different Tcl commands between
|
||||
configure and configinfo
|
||||
|
||||
* ext/tk/lib/font.rb: ditto.
|
||||
|
||||
* ext/tk/lib/itemconfig.rb: support to use different Tcl commands
|
||||
between item_configure and item_configinfo
|
||||
|
||||
* ext/tk/lib/itemfont.rb: ditto.
|
||||
|
||||
* ext/tk/extconf.rb: install SUPPORT_STATUS
|
||||
|
||||
* ext/tk/lib/tkextlib: some bug fixes (see ext/tk/ChangeLog.tkextlib)
|
||||
|
||||
Wed Nov 3 15:38:28 2004 Kouhei Sutou <kou@cozmixng.org>
|
||||
|
||||
* test/rss/*.rb: removed tab width configuration headers.
|
||||
|
|
|
@ -1,6 +1,24 @@
|
|||
2004-11-03 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* SUPPORT_STATUS: BLT moves to 'plan to support' from 'not determined'
|
||||
|
||||
* itk/incr_tk.rb: __cget_cmd and __config_cmd are private methods
|
||||
|
||||
* tcllib/autoscroll.rb: extend TkCore
|
||||
|
||||
* tcllib/cursor.rb: ditto.
|
||||
|
||||
* tcllib/plotchart.rb: ditto.
|
||||
|
||||
* tcllib/style.rb: ditto.
|
||||
|
||||
* tile/style.rb: ditto.
|
||||
|
||||
* tkDND/shape.rb: ditto.
|
||||
|
||||
2004-10-24 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/sample/tkextlib/bwidget/tree.rb: bug fix
|
||||
* bwidget/tree.rb: bug fix on Windows
|
||||
|
||||
2004-10-16 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
require 'mkmf'
|
||||
$preload = ["tcltklib"]
|
||||
($INSTALLFILES||=[]) << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"]
|
||||
create_makefile("tkutil")
|
||||
|
|
|
@ -2098,11 +2098,11 @@ module TkTreatFont
|
|||
if key
|
||||
pathname = [win, tag, key].join(';')
|
||||
TkFont.used_on(pathname) ||
|
||||
TkFont.init_widget_font(pathname, *__config_cmd)
|
||||
TkFont.init_widget_font(pathname, *__confinfo_cmd)
|
||||
elsif optkeys.size == 1
|
||||
pathname = [win, tag, optkeys[0]].join(';')
|
||||
TkFont.used_on(pathname) ||
|
||||
TkFont.init_widget_font(pathname, *__config_cmd)
|
||||
TkFont.init_widget_font(pathname, *__confinfo_cmd)
|
||||
else
|
||||
fonts = {}
|
||||
optkeys.each{|key|
|
||||
|
@ -2110,7 +2110,7 @@ module TkTreatFont
|
|||
pathname = [win, tag, key].join(';')
|
||||
fonts[key] =
|
||||
TkFont.used_on(pathname) ||
|
||||
TkFont.init_widget_font(pathname, *__config_cmd)
|
||||
TkFont.init_widget_font(pathname, *__confinfo_cmd)
|
||||
}
|
||||
fonts
|
||||
end
|
||||
|
@ -2373,6 +2373,11 @@ module TkConfigMethod
|
|||
end
|
||||
private :__config_cmd
|
||||
|
||||
def __confinfo_cmd
|
||||
__config_cmd
|
||||
end
|
||||
private :__config_cmd
|
||||
|
||||
def __configinfo_struct
|
||||
{:key=>0, :alias=>1, :db_name=>1, :db_class=>2,
|
||||
:default_value=>3, :current_value=>4}
|
||||
|
@ -2574,7 +2579,7 @@ module TkConfigMethod
|
|||
if TkComm::GET_CONFIGINFO_AS_ARRAY
|
||||
if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
if ( ! __configinfo_struct[:alias] \
|
||||
|
@ -2596,7 +2601,7 @@ module TkConfigMethod
|
|||
return [slot, '', '', '', self.__send__(method)]
|
||||
|
||||
when /^(#{__numval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2617,7 +2622,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numstrval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2630,7 +2635,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__boolval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2651,7 +2656,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__listval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]])
|
||||
|
@ -2664,7 +2669,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numlistval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] \
|
||||
|
@ -2679,9 +2684,9 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__strval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
end
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
@ -2696,7 +2701,7 @@ module TkConfigMethod
|
|||
conf
|
||||
|
||||
else
|
||||
ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__config_cmd))).collect{|conflist|
|
||||
ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).collect{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
@ -2831,7 +2836,7 @@ module TkConfigMethod
|
|||
else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
|
||||
if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__font_optkeys.join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{fontkey}"))))
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
||||
|
@ -2858,7 +2863,7 @@ module TkConfigMethod
|
|||
return {slot => ['', '', '', self.__send__(method)]}
|
||||
|
||||
when /^(#{__numval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -2879,7 +2884,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numstrval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -2892,7 +2897,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__boolval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -2913,7 +2918,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__listval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] )
|
||||
|
@ -2926,7 +2931,7 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__numlistval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
|
||||
if ( __configinfo_struct[:default_value] \
|
||||
&& conf[__configinfo_struct[:default_value]] \
|
||||
|
@ -2941,9 +2946,9 @@ module TkConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__strval_optkeys.join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_send_without_enc(*(__config_cmd << "-#{slot}"))))
|
||||
conf = tk_split_list(_fromUTF8(tk_send_without_enc(*(__confinfo_cmd << "-#{slot}"))))
|
||||
end
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
@ -2961,7 +2966,7 @@ module TkConfigMethod
|
|||
|
||||
else
|
||||
ret = {}
|
||||
tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__config_cmd))).each{|conflist|
|
||||
tk_split_simplelist(_fromUTF8(tk_call_without_enc(*__confinfo_cmd))).each{|conflist|
|
||||
conf = tk_split_simplelist(conflist)
|
||||
conf[__configinfo_struct[:key]] =
|
||||
conf[__configinfo_struct[:key]][1..-1]
|
||||
|
|
|
@ -96,6 +96,12 @@ module TkItemConfigMethod
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_confinfo_cmd(id)
|
||||
# maybe need to override
|
||||
__item_config_cmd(id)
|
||||
end
|
||||
private :__item_confinfo_cmd
|
||||
|
||||
def __item_configinfo_struct(id)
|
||||
# maybe need to override
|
||||
{:key=>0, :alias=>1, :db_name=>1, :db_class=>2,
|
||||
|
@ -225,7 +231,7 @@ module TkItemConfigMethod
|
|||
if TkComm::GET_CONFIGINFO_AS_ARRAY
|
||||
if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
|
||||
|
@ -247,7 +253,7 @@ 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_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -268,7 +274,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -281,7 +287,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -302,7 +308,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -315,7 +321,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
|
||||
|
@ -330,10 +336,10 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
end
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
@ -348,7 +354,7 @@ module TkItemConfigMethod
|
|||
conf
|
||||
|
||||
else
|
||||
ret = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_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[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
@ -483,7 +489,7 @@ module TkItemConfigMethod
|
|||
else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
|
||||
if (slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
|
||||
fontkey = $2
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{fontkey}"))))
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
||||
|
@ -510,7 +516,7 @@ 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_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -531,7 +537,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -544,7 +550,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -565,7 +571,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] )
|
||||
|
@ -578,7 +584,7 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
if ( __item_configinfo_struct(tagid(tagOrId))[:default_value] \
|
||||
&& conf[__item_configinfo_struct(tagid(tagOrId))[:default_value]] \
|
||||
|
@ -593,10 +599,10 @@ module TkItemConfigMethod
|
|||
end
|
||||
|
||||
when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
|
||||
else
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_config_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
conf = tk_split_list(_fromUTF8(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))))
|
||||
end
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
@ -614,7 +620,7 @@ module TkItemConfigMethod
|
|||
|
||||
else
|
||||
ret = {}
|
||||
tk_split_simplelist(_fromUTF8(tk_call_without_enc(*(__item_config_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[__item_configinfo_struct(tagid(tagOrId))[:key]] =
|
||||
conf[__item_configinfo_struct(tagid(tagOrId))[:key]][1..-1]
|
||||
|
|
|
@ -33,11 +33,13 @@ module TkTreatItemFont
|
|||
if key
|
||||
pathname = [win, tag, key].join(';')
|
||||
TkFont.used_on(pathname) ||
|
||||
TkFont.init_widget_font(pathname, *(__item_config_cmd(tagid(tagOrId))))
|
||||
TkFont.init_widget_font(pathname,
|
||||
*(__item_confinfo_cmd(tagid(tagOrId))))
|
||||
elsif optkeys.size == 1
|
||||
pathname = [win, tag, optkeys[0]].join(';')
|
||||
TkFont.used_on(pathname) ||
|
||||
TkFont.init_widget_font(pathname, *(__item_config_cmd(tagid(tagOrId))))
|
||||
TkFont.init_widget_font(pathname,
|
||||
*(__item_confinfo_cmd(tagid(tagOrId))))
|
||||
else
|
||||
fonts = {}
|
||||
optkeys.each{|key|
|
||||
|
@ -45,7 +47,8 @@ module TkTreatItemFont
|
|||
pathname = [win, tag, key].join(';')
|
||||
fonts[key] =
|
||||
TkFont.used_on(pathname) ||
|
||||
TkFont.init_widget_font(pathname, *(__item_config_cmd(tagid(tagOrId))))
|
||||
TkFont.init_widget_font(pathname,
|
||||
*(__item_confinfo_cmd(tagid(tagOrId))))
|
||||
}
|
||||
fonts
|
||||
end
|
||||
|
|
|
@ -95,6 +95,9 @@ TkDND http://sourceforge.net/projects/tkdnd ==> tkDND
|
|||
|
||||
===< plan to support (alpha quality libraries may be included) >==============
|
||||
|
||||
BLT http://sourceforge.net/projects/blt
|
||||
* see tcltk-ext library on RAA (http://raa.ruby-lang.org/)
|
||||
|
||||
GraphViz http://www.graphviz.org/
|
||||
|
||||
Tkgeomap http://tkgeomap.sourceforge.net/index.html
|
||||
|
@ -103,9 +106,6 @@ Tkgeomap http://tkgeomap.sourceforge.net/index.html
|
|||
|
||||
===< not determined to supprt or not >========================================
|
||||
|
||||
BLT http://sourceforge.net/projects/blt
|
||||
* see tcltk-ext library on RAA (http://raa.ruby-lang.org/)
|
||||
|
||||
Tix http://tixlibrary.sourceforge.net/
|
||||
* see tcltk-ext library on RAA (http://raa.ruby-lang.org/)
|
||||
|
||||
|
|
|
@ -127,10 +127,12 @@ module Tk
|
|||
def __cget_cmd
|
||||
[self.master, 'component', self.name, 'cget']
|
||||
end
|
||||
private :__cget_cmd
|
||||
|
||||
def __config_cmd
|
||||
[self.master, 'component', self.name, 'configure']
|
||||
end
|
||||
private :__config_cmd
|
||||
|
||||
ComponentID_TBL = TkCore::INTERP.create_table
|
||||
Itk_Component_ID = ['itk:component'.freeze, '00000'.taint].freeze
|
||||
|
|
|
@ -129,6 +129,7 @@ module Tk
|
|||
end
|
||||
|
||||
module Autoscroll
|
||||
extend TkCore
|
||||
def self.autoscroll(win)
|
||||
tk_call_without_enc('::autoscroll::autoscroll', win.path)
|
||||
end
|
||||
|
|
|
@ -73,6 +73,7 @@ module Tk
|
|||
end
|
||||
|
||||
module Cursor
|
||||
extend TkCore
|
||||
def self.cursor_display(win=None)
|
||||
tk_call_without_enc('::cursor::display', win)
|
||||
end
|
||||
|
|
|
@ -78,6 +78,7 @@ module Tk
|
|||
end
|
||||
|
||||
module Tk::Tcllib::Plotchart
|
||||
extend TkCore
|
||||
############################
|
||||
def self.view_port(w, *args) # args := pxmin, pymin, pxmax, pymax
|
||||
tk_call_without_enc('::Plotchart::viewPort', w.path, *(args.flatten))
|
||||
|
|
|
@ -42,6 +42,8 @@ module Tk::Tcllib
|
|||
end
|
||||
|
||||
module Style
|
||||
extend TkCore
|
||||
|
||||
def self.names
|
||||
tk_split_simplelist(tk_call('style::names'))
|
||||
end
|
||||
|
|
|
@ -13,6 +13,7 @@ module Tk
|
|||
end
|
||||
|
||||
module Tk::Tile::Style
|
||||
extend TkCore
|
||||
end
|
||||
|
||||
class << Tk::Tile::Style
|
||||
|
|
|
@ -17,6 +17,7 @@ TkPackage.require('shape')
|
|||
module Tk
|
||||
module TkDND
|
||||
module Shape
|
||||
extend TkCore
|
||||
=begin
|
||||
def self.package_version
|
||||
begin
|
||||
|
|
|
@ -128,7 +128,7 @@ module DemoTree
|
|||
if Tk::PLATFORM['platform'] == 'unix'
|
||||
rootdir = File.expand_path('~')
|
||||
else
|
||||
rootdir = 'c:\\'
|
||||
rootdir = 'c:'
|
||||
end
|
||||
|
||||
tree.insert('end', 'root', 'home',
|
||||
|
|
Loading…
Reference in a new issue