diff options
Diffstat (limited to 'ext/tk/lib/tkextlib/bwidget/mainframe.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/mainframe.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/tk/lib/tkextlib/bwidget/mainframe.rb b/ext/tk/lib/tkextlib/bwidget/mainframe.rb index 7f8789458..c54e87855 100644 --- a/ext/tk/lib/tkextlib/bwidget/mainframe.rb +++ b/ext/tk/lib/tkextlib/bwidget/mainframe.rb @@ -20,11 +20,25 @@ class Tk::BWidget::MainFrame WidgetClassName = 'MainFrame'.freeze WidgetClassNames[WidgetClassName] = self + def __strval_optkeys + super() << 'progressfg' + end + private :__strval_optkeys + def __tkvariable_optkeys super() << 'progressvar' end private :__tkvariable_optkeys + def __val2ruby_optkeys # { key=>proc, ... } + # The method is used to convert a opt-value to a ruby's object. + # When get the value of the option "key", "proc.call(value)" is called. + { + 'menu'=>proc{|v| simplelist(v).collect!{|elem| simplelist(v)}} + } + end + private :__val2ruby_optkeys + def add_indicator(keys={}, &b) win = window(tk_send('addindicator', *hash_kv(keys))) win.instance_eval(&b) if b |