summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/menu.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tk/menu.rb')
-rw-r--r--ext/tk/lib/tk/menu.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/tk/lib/tk/menu.rb b/ext/tk/lib/tk/menu.rb
index 54b42705e5..e366816d57 100644
--- a/ext/tk/lib/tk/menu.rb
+++ b/ext/tk/lib/tk/menu.rb
@@ -18,11 +18,21 @@ module TkMenuEntryConfig
end
private :__item_config_cmd
+ def __item_strval_optkeys(id)
+ super(id) << 'selectcolor'
+ end
+ private :__item_strval_optkeys
+
def __item_listval_optkeys(id)
[]
end
private :__item_listval_optkeys
+ def __item_val2ruby_optkeys(id) # { key=>proc, ... }
+ super(id).update('menu'=>proc{|i, v| window(v)})
+ end
+ private :__val2ruby_optkeys
+
alias entrycget itemcget
alias entryconfigure itemconfigure
alias entryconfiginfo itemconfiginfo
@@ -49,6 +59,16 @@ class TkMenu<TkWindow
#end
#private :create_self
+ def __strval_optkeys
+ super() << 'selectcolor' << 'title'
+ end
+ private :__strval_optkeys
+
+ def __boolval_optkeys
+ super() << 'tearoff'
+ end
+ private :__boolval_optkeys
+
def self.new_menuspec(menu_spec, parent = nil, tearoff = false, keys = nil)
if parent.kind_of?(Hash)
keys = _symbolkey2str(parent)
@@ -411,6 +431,12 @@ class TkMenubutton<TkLabel
end
end
private :create_self
+
+ def __boolval_optkeys
+ super() << 'indicatoron'
+ end
+ private :__boolval_optkeys
+
end
TkMenuButton = TkMenubutton