diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-01 09:38:48 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-01 09:38:48 +0000 |
commit | b7a7c70c32ff503d9401b4d47263c5d5fa4e45d8 (patch) | |
tree | e864355f8eed303d9ca9c5fb7b3138fb19ed9c55 /ext/tk/lib/tk/menu.rb | |
parent | ad0add9f08ad687cb1f25f3de65c398b19da7f21 (diff) |
* ext/tk/lib/tcltklib : bug fix
* ext/tk/lib/tk : bug fix and add Tcl/Tk extension support libraries
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/menu.rb')
-rw-r--r-- | ext/tk/lib/tk/menu.rb | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/ext/tk/lib/tk/menu.rb b/ext/tk/lib/tk/menu.rb index 9c34741b1b..f5a16cf3cf 100644 --- a/ext/tk/lib/tk/menu.rb +++ b/ext/tk/lib/tk/menu.rb @@ -2,24 +2,37 @@ # tk/menu.rb : treat menu and menubutton # require 'tk' +require 'tk/itemconfig' -module TkTreatMenuEntryFont - include TkTreatItemFont +module TkMenuEntryConfig + include TkItemConfigMethod - ItemCMD = ['entryconfigure'.freeze, TkComm::None].freeze - def __conf_cmd(idx) - ItemCMD[idx] + def __item_cget_cmd(id) + [self.path, 'entrycget', id] end - - def __item_pathname(tagOrId) - self.path + ';' + tagOrId.to_s + private :__item_cget_cmd + + def __item_config_cmd(id) + [self.path, 'entryconfigure', id] + end + private :__item_config_cmd + + def __item_listval_optkeys(id) + [] end + private :__item_listval_optkeys + + alias entrycget itemcget + alias entryconfigure itemconfigure + alias entryconfiginfo itemconfiginfo + alias current_entryconfiginfo current_itemconfiginfo - private :__conf_cmd, :__item_pathname + private :itemcget, :itemconfigure + private :itemconfiginfo, :current_itemconfiginfo end class TkMenu<TkWindow - include TkTreatMenuEntryFont + include TkMenuEntryConfig TkCommandNames = ['menu'.freeze].freeze WidgetClassName = 'Menu'.freeze @@ -34,6 +47,10 @@ class TkMenu<TkWindow end private :create_self + def tagid(id) + id.to_s + end + def activate(index) tk_send_without_enc('activate', _get_eval_enc_str(index)) self @@ -116,6 +133,8 @@ class TkMenu<TkWindow def yposition(index) number(tk_send_without_enc('yposition', _get_eval_enc_str(index))) end + +=begin def entrycget(index, key) case key.to_s when 'text', 'label', 'show' @@ -287,6 +306,7 @@ class TkMenu<TkWindow ret end end +=end end |