diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-09 06:16:29 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-09 06:16:29 +0000 |
commit | adde1e913d960dff1cfdc54b51a7a40322faddc9 (patch) | |
tree | a11ae6ff53618056ef3d4945f2b022a7d099946e /ext/tk/lib/tkextlib/bwidget | |
parent | 28f60a006d1b9025143758e9e391264f6a7f2747 (diff) | |
download | ruby-adde1e913d960dff1cfdc54b51a7a40322faddc9.tar.gz ruby-adde1e913d960dff1cfdc54b51a7a40322faddc9.tar.xz ruby-adde1e913d960dff1cfdc54b51a7a40322faddc9.zip |
* ext/tk/tcltklib.c: remove dangerous 'rb_jump_tag's.
* ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to
help to convert option values between ruby and tcl.
* ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and
__item_ruby2val_optkeys to help to convert option values between
ruby and tcl.
* ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable'
option (for the reason of backward compatibility).
* ext/tk/lib/tk/composite.rb: clarify the arguments of super().
* ext/tk/lib/tk/spinbox.rb: ditto.
* ext/tk/lib/tk/text.rb: ditto.
* ext/tk/lib/tk/validation.rb: ditto.
* ext/tk/lib/tkextlib/*: support to treat tkvariable-type
configure options.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkextlib/bwidget')
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/button.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/entry.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/label.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/labelentry.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/labelframe.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/mainframe.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/passwddlg.rb | 6 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/spinbox.rb | 5 | ||||
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/tree.rb | 5 |
9 files changed, 46 insertions, 0 deletions
diff --git a/ext/tk/lib/tkextlib/bwidget/button.rb b/ext/tk/lib/tkextlib/bwidget/button.rb index 246afebe2..1432458cc 100644 --- a/ext/tk/lib/tkextlib/bwidget/button.rb +++ b/ext/tk/lib/tkextlib/bwidget/button.rb @@ -18,4 +18,9 @@ class Tk::BWidget::Button TkCommandNames = ['Button'.freeze].freeze WidgetClassName = 'Button'.freeze WidgetClassNames[WidgetClassName] = self + + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys end diff --git a/ext/tk/lib/tkextlib/bwidget/entry.rb b/ext/tk/lib/tkextlib/bwidget/entry.rb index 9867a1ac3..855d2194f 100644 --- a/ext/tk/lib/tkextlib/bwidget/entry.rb +++ b/ext/tk/lib/tkextlib/bwidget/entry.rb @@ -21,6 +21,11 @@ class Tk::BWidget::Entry WidgetClassName = 'Entry'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + def invoke tk_send_without_enc('invoke') self diff --git a/ext/tk/lib/tkextlib/bwidget/label.rb b/ext/tk/lib/tkextlib/bwidget/label.rb index 1d4c63870..68bf8cdac 100644 --- a/ext/tk/lib/tkextlib/bwidget/label.rb +++ b/ext/tk/lib/tkextlib/bwidget/label.rb @@ -19,6 +19,11 @@ class Tk::BWidget::Label WidgetClassName = 'Label'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + def set_focus tk_send_without_enc('setfocus') self diff --git a/ext/tk/lib/tkextlib/bwidget/labelentry.rb b/ext/tk/lib/tkextlib/bwidget/labelentry.rb index dc1db0682..b516a7d20 100644 --- a/ext/tk/lib/tkextlib/bwidget/labelentry.rb +++ b/ext/tk/lib/tkextlib/bwidget/labelentry.rb @@ -23,6 +23,11 @@ class Tk::BWidget::LabelEntry WidgetClassName = 'LabelEntry'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + #def entrybind(*args) # _bind([path, 'bind'], *args) # self diff --git a/ext/tk/lib/tkextlib/bwidget/labelframe.rb b/ext/tk/lib/tkextlib/bwidget/labelframe.rb index 453756a16..3450be6e7 100644 --- a/ext/tk/lib/tkextlib/bwidget/labelframe.rb +++ b/ext/tk/lib/tkextlib/bwidget/labelframe.rb @@ -19,6 +19,11 @@ class Tk::BWidget::LabelFrame WidgetClassName = 'LabelFrame'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + def self.align(*args) tk_call('LabelFrame::align', *args) end diff --git a/ext/tk/lib/tkextlib/bwidget/mainframe.rb b/ext/tk/lib/tkextlib/bwidget/mainframe.rb index e52f4b2f4..7f8789458 100644 --- a/ext/tk/lib/tkextlib/bwidget/mainframe.rb +++ b/ext/tk/lib/tkextlib/bwidget/mainframe.rb @@ -20,6 +20,11 @@ class Tk::BWidget::MainFrame WidgetClassName = 'MainFrame'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'progressvar' + end + private :__tkvariable_optkeys + def add_indicator(keys={}, &b) win = window(tk_send('addindicator', *hash_kv(keys))) win.instance_eval(&b) if b diff --git a/ext/tk/lib/tkextlib/bwidget/passwddlg.rb b/ext/tk/lib/tkextlib/bwidget/passwddlg.rb index 7136ae8d7..bfab7a078 100644 --- a/ext/tk/lib/tkextlib/bwidget/passwddlg.rb +++ b/ext/tk/lib/tkextlib/bwidget/passwddlg.rb @@ -19,6 +19,12 @@ class Tk::BWidget::PasswdDlg WidgetClassName = 'PasswdDlg'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'loginhelpvar' << 'logintextvariable' << + 'passwdhelpvar' << 'passwdtextvariable' + end + private :__tkvariable_optkeys + def create login, passwd = simplelist(tk_call(self.class::TkCommandNames[0], @path, *hash_kv(@keys))) diff --git a/ext/tk/lib/tkextlib/bwidget/spinbox.rb b/ext/tk/lib/tkextlib/bwidget/spinbox.rb index a5ddfafbf..9560abb66 100644 --- a/ext/tk/lib/tkextlib/bwidget/spinbox.rb +++ b/ext/tk/lib/tkextlib/bwidget/spinbox.rb @@ -22,6 +22,11 @@ class Tk::BWidget::SpinBox WidgetClassName = 'SpinBox'.freeze WidgetClassNames[WidgetClassName] = self + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + #def entrybind(*args) # _bind([path, 'bind'], *args) # self diff --git a/ext/tk/lib/tkextlib/bwidget/tree.rb b/ext/tk/lib/tkextlib/bwidget/tree.rb index 5af9f0dc1..c40573665 100644 --- a/ext/tk/lib/tkextlib/bwidget/tree.rb +++ b/ext/tk/lib/tkextlib/bwidget/tree.rb @@ -32,6 +32,11 @@ class Tk::BWidget::Tree end end + def __tkvariable_optkeys + super() << 'helpvar' + end + private :__tkvariable_optkeys + def tagid(tag) if tag.kind_of?(Tk::BWidget::Tree::Node) tag.id |