diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-12 23:08:32 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-12 23:08:32 +0000 |
commit | ed6ce8b43b6f25df1d4809ac799de4dd1c85c1f3 (patch) | |
tree | 09bc05d679d0f224a29fee44d10beea321bdc0b5 /ext/tk/lib/tkextlib/iwidgets | |
parent | e13fb8029b87943ab8af2211226b7c9347d3976d (diff) | |
download | ruby-ed6ce8b43b6f25df1d4809ac799de4dd1c85c1f3.tar.gz |
* ext/tk/extconf.rb: New strategy for searching Tcl/Tk libraries.
* ext/tk/*: Support new features of Tcl/Tk8.6b1 and minor bug fixes.
( [KNOWN BUG] Ruby/Tk on Ruby 1.9 will not work on Cygwin. )
* ext/tk/*: Unify sources between Ruby 1.8 & 1.9.
Improve default_widget_set handling.
* ext/tk/*: Multi-TkInterpreter (multi-tk.rb) works on Ruby 1.8 & 1.9.
( [KNOWN BUG] On Ruby 1.8, join to a long term Thread on Tk
callbacks may freeze. On Ruby 1.9, cannot create a second
master interpreter (creating slaves are OK); supported master
interpreter is the default master interpreter only. )
* ext/tk/lib/tkextlib/*: Update supported versions of Tk extensions.
Tcllib 1.8/Tklib 0.4.1 ==> Tcllib 1.11.1/Tklib 0.5
BWidgets 1.7 ==> BWidgets 1.8
TkTable 2.9 ==> TkTable 2.10
TkTreeCtrl 2005-12-02 ==> TkTreeCtrl 2.2.9
Tile 0.8.0/8.5.1 ==> Tile 0.8.3/8.6b1
IncrTcl 2005-02-14 ==> IncrTcl 2008-12-15
TclX 2005-02-07 ==> TclX 2008-12-15
Trofs 0.4.3 ==> Trofs 0.4.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkextlib/iwidgets')
53 files changed, 77 insertions, 63 deletions
diff --git a/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb b/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb index 05d58c386f..91e06d1b52 100644 --- a/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/buttonbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Buttonbox TkCommandNames = ['::iwidgets::buttonbox'.freeze].freeze WidgetClassName = 'Buttonbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -46,13 +46,14 @@ class Tk::Iwidgets::Buttonbox end end + alias buttoncget_tkstring itemcget_tkstring alias buttoncget itemcget alias buttoncget_strict itemcget_strict alias buttonconfigure itemconfigure alias buttonconfiginfo itemconfiginfo alias current_buttonconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/calendar.rb b/ext/tk/lib/tkextlib/iwidgets/calendar.rb index e85d6e4e51..a5478c7cc6 100644 --- a/ext/tk/lib/tkextlib/iwidgets/calendar.rb +++ b/ext/tk/lib/tkextlib/iwidgets/calendar.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Calendar TkCommandNames = ['::iwidgets::calendar'.freeze].freeze WidgetClassName = 'Calendar'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() + [ diff --git a/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb b/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb index fa5e90ad05..398eec3f1a 100644 --- a/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Canvasprintbox TkCommandNames = ['::iwidgets::canvasprintbox'.freeze].freeze WidgetClassName = 'Canvasprintbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'filename' diff --git a/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb b/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb index bbf507677c..e64d8154ca 100644 --- a/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Canvasprintdialog TkCommandNames = ['::iwidgets::canvasprintdialog'.freeze].freeze WidgetClassName = 'Canvasprintdialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def get_output tk_call(@path, 'getoutput') diff --git a/ext/tk/lib/tkextlib/iwidgets/checkbox.rb b/ext/tk/lib/tkextlib/iwidgets/checkbox.rb index c85d356c55..a7476c824e 100644 --- a/ext/tk/lib/tkextlib/iwidgets/checkbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/checkbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Checkbox TkCommandNames = ['::iwidgets::checkbox'.freeze].freeze WidgetClassName = 'Checkbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -46,13 +46,14 @@ class Tk::Iwidgets::Checkbox end end + alias buttoncget_tkstring itemcget_tkstring alias buttoncget itemcget alias buttoncget_strict itemcget_strict alias buttonconfigure itemconfigure alias buttonconfiginfo itemconfiginfo alias current_buttonconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/combobox.rb b/ext/tk/lib/tkextlib/iwidgets/combobox.rb index a6d54d78fa..82dcf25d0b 100644 --- a/ext/tk/lib/tkextlib/iwidgets/combobox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/combobox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Combobox TkCommandNames = ['::iwidgets::combobox'.freeze].freeze WidgetClassName = 'Combobox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'completion' << 'dropdown' << 'editable' << 'unique' diff --git a/ext/tk/lib/tkextlib/iwidgets/dateentry.rb b/ext/tk/lib/tkextlib/iwidgets/dateentry.rb index 0a8897f50d..98a0051e55 100644 --- a/ext/tk/lib/tkextlib/iwidgets/dateentry.rb +++ b/ext/tk/lib/tkextlib/iwidgets/dateentry.rb @@ -16,5 +16,5 @@ end class Tk::Iwidgets::Dateentry TkCommandNames = ['::iwidgets::dateentry'.freeze].freeze WidgetClassName = 'Dateentry'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self end diff --git a/ext/tk/lib/tkextlib/iwidgets/datefield.rb b/ext/tk/lib/tkextlib/iwidgets/datefield.rb index 632f3334dc..50d5405a3b 100644 --- a/ext/tk/lib/tkextlib/iwidgets/datefield.rb +++ b/ext/tk/lib/tkextlib/iwidgets/datefield.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Datefield TkCommandNames = ['::iwidgets::datefield'.freeze].freeze WidgetClassName = 'Datefield'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'gmt' diff --git a/ext/tk/lib/tkextlib/iwidgets/dialog.rb b/ext/tk/lib/tkextlib/iwidgets/dialog.rb index 8540eae1b5..2d554ca7b5 100644 --- a/ext/tk/lib/tkextlib/iwidgets/dialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/dialog.rb @@ -16,5 +16,5 @@ end class Tk::Iwidgets::Dialog TkCommandNames = ['::iwidgets::dialog'.freeze].freeze WidgetClassName = 'Dialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self end diff --git a/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb b/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb index 8d43cc07ab..e880594532 100644 --- a/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb +++ b/ext/tk/lib/tkextlib/iwidgets/dialogshell.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Dialogshell TkCommandNames = ['::iwidgets::dialogshell'.freeze].freeze WidgetClassName = 'Dialogshell'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -46,13 +46,14 @@ class Tk::Iwidgets::Dialogshell end end + alias buttoncget_tkstring itemcget_tkstring alias buttoncget itemcget alias buttoncget_strict itemcget_strict alias buttonconfigure itemconfigure alias buttonconfiginfo itemconfiginfo alias current_buttonconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb b/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb index 9bc063ba69..07ab025cdf 100644 --- a/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Disjointlistbox TkCommandNames = ['::iwidgets::disjointlistbox'.freeze].freeze WidgetClassName = 'Disjointlistbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel' diff --git a/ext/tk/lib/tkextlib/iwidgets/entryfield.rb b/ext/tk/lib/tkextlib/iwidgets/entryfield.rb index 6e1cd0053b..3e7149a662 100644 --- a/ext/tk/lib/tkextlib/iwidgets/entryfield.rb +++ b/ext/tk/lib/tkextlib/iwidgets/entryfield.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Entryfield TkCommandNames = ['::iwidgets::entryfield'.freeze].freeze WidgetClassName = 'Entryfield'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __font_optkeys super() << 'textfont' diff --git a/ext/tk/lib/tkextlib/iwidgets/extbutton.rb b/ext/tk/lib/tkextlib/iwidgets/extbutton.rb index 158d9d474a..e744fba91a 100644 --- a/ext/tk/lib/tkextlib/iwidgets/extbutton.rb +++ b/ext/tk/lib/tkextlib/iwidgets/extbutton.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Extbutton TkCommandNames = ['::iwidgets::extbutton'.freeze].freeze WidgetClassName = 'Extbutton'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'bitmapforeground' << 'ringbackground' diff --git a/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb b/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb index 526dae1123..2ff15bb509 100644 --- a/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Extfileselectionbox TkCommandNames = ['::iwidgets::extfileselectionbox'.freeze].freeze WidgetClassName = 'Extfileselectionbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() + [ diff --git a/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb b/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb index 14388be7c4..509fdcf636 100644 --- a/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Extfileselectiondialog TkCommandNames = ['::iwidgets::extfileselectiondialog'.freeze].freeze WidgetClassName = 'Extfileselectiondialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def child_site window(tk_call(@path, 'childsite')) diff --git a/ext/tk/lib/tkextlib/iwidgets/feedback.rb b/ext/tk/lib/tkextlib/iwidgets/feedback.rb index 0a25237a24..29d04c8a5d 100644 --- a/ext/tk/lib/tkextlib/iwidgets/feedback.rb +++ b/ext/tk/lib/tkextlib/iwidgets/feedback.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Feedback TkCommandNames = ['::iwidgets::feedback'.freeze].freeze WidgetClassName = 'Feedback'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'barcolor' diff --git a/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb b/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb index eb4dde484f..a425b53b5f 100644 --- a/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Fileselectionbox TkCommandNames = ['::iwidgets::fileselectionbox'.freeze].freeze WidgetClassName = 'Fileselectionbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() + [ diff --git a/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb b/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb index 50f459e56d..ebcdaf8c0b 100644 --- a/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Fileselectiondialog TkCommandNames = ['::iwidgets::fileselectiondialog'.freeze].freeze WidgetClassName = 'Fileselectiondialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def child_site window(tk_call(@path, 'childsite')) diff --git a/ext/tk/lib/tkextlib/iwidgets/finddialog.rb b/ext/tk/lib/tkextlib/iwidgets/finddialog.rb index c46b972214..3d522e07c8 100644 --- a/ext/tk/lib/tkextlib/iwidgets/finddialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/finddialog.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Finddialog TkCommandNames = ['::iwidgets::finddialog'.freeze].freeze WidgetClassName = 'Finddialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() + [ diff --git a/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb b/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb index fa16d9aad8..cb9301d0c9 100644 --- a/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb +++ b/ext/tk/lib/tkextlib/iwidgets/hierarchy.rb @@ -20,7 +20,7 @@ class Tk::Iwidgets::Hierarchy TkCommandNames = ['::iwidgets::hierarchy'.freeze].freeze WidgetClassName = 'Hierarchy'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb b/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb index 77b0e090cd..d4ea1aac65 100644 --- a/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb +++ b/ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Hyperhelp TkCommandNames = ['::iwidgets::hyperhelp'.freeze].freeze WidgetClassName = 'Hyperhelp'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'helpdir' diff --git a/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb b/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb index e77e85045d..6595398427 100644 --- a/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb +++ b/ext/tk/lib/tkextlib/iwidgets/labeledframe.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Labeledframe TkCommandNames = ['::iwidgets::labeledframe'.freeze].freeze WidgetClassName = 'Labeledframe'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'labeltext' diff --git a/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb b/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb index 99387710cb..d36d42878d 100644 --- a/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb +++ b/ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb @@ -18,7 +18,7 @@ class Tk::Iwidgets::Labeledwidget TkCommandNames = ['::iwidgets::labeledwidget'.freeze].freeze WidgetClassName = 'Labeledwidget'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'labeltext' diff --git a/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb b/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb index 4b2541b997..ebf48021db 100644 --- a/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb +++ b/ext/tk/lib/tkextlib/iwidgets/mainwindow.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Mainwindow TkCommandNames = ['::iwidgets::mainwindow'.freeze].freeze WidgetClassName = 'Mainwindow'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'helpline' << 'statusline' diff --git a/ext/tk/lib/tkextlib/iwidgets/menubar.rb b/ext/tk/lib/tkextlib/iwidgets/menubar.rb index 5aaefbe50d..f9a17d0b55 100644 --- a/ext/tk/lib/tkextlib/iwidgets/menubar.rb +++ b/ext/tk/lib/tkextlib/iwidgets/menubar.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Menubar TkCommandNames = ['::iwidgets::menubar'.freeze].freeze WidgetClassName = 'Menubar'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'menubuttons' @@ -61,13 +61,14 @@ class Tk::Iwidgets::Menubar end end + alias menucget_tkstring itemcget_tkstring alias menucget itemcget alias menucget_strict itemcget_strict alias menuconfigure itemconfigure alias menuconfiginfo itemconfiginfo alias current_menuconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/messagebox.rb b/ext/tk/lib/tkextlib/iwidgets/messagebox.rb index 98ac32900c..6adb53d941 100644 --- a/ext/tk/lib/tkextlib/iwidgets/messagebox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/messagebox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Messagebox TkCommandNames = ['::iwidgets::messagebox'.freeze].freeze WidgetClassName = 'Messagebox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -46,13 +46,14 @@ class Tk::Iwidgets::Messagebox end private :__item_boolval_optkeys + alias typecget_tkstring itemcget_tkstring alias typecget itemcget alias typecget_strict itemcget_strict alias typeconfigure itemconfigure alias typeconfiginfo itemconfiginfo alias current_typeconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb b/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb index c19b83e517..9aa590056f 100644 --- a/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/messagedialog.rb @@ -16,5 +16,5 @@ end class Tk::Iwidgets::Messagedialog TkCommandNames = ['::iwidgets::messagedialog'.freeze].freeze WidgetClassName = 'Messagedialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self end diff --git a/ext/tk/lib/tkextlib/iwidgets/notebook.rb b/ext/tk/lib/tkextlib/iwidgets/notebook.rb index 03b50633df..7ed4126a4d 100644 --- a/ext/tk/lib/tkextlib/iwidgets/notebook.rb +++ b/ext/tk/lib/tkextlib/iwidgets/notebook.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Notebook TkCommandNames = ['::iwidgets::notebook'.freeze].freeze WidgetClassName = 'Notebook'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -41,13 +41,14 @@ class Tk::Iwidgets::Notebook end end + alias pagecget_tkstring itemcget_tkstring alias pagecget itemcget alias pagecget_strict itemcget_strict alias pageconfigure itemconfigure alias pageconfiginfo itemconfiginfo alias current_pageconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb b/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb index 0c74440be7..57a3cc7d2b 100644 --- a/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb +++ b/ext/tk/lib/tkextlib/iwidgets/optionmenu.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Optionmenu TkCommandNames = ['::iwidgets::optionmenu'.freeze].freeze WidgetClassName = 'Optionmenu'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'cyclicon' diff --git a/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb b/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb index 3bf73d69fe..65463cc85a 100644 --- a/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb +++ b/ext/tk/lib/tkextlib/iwidgets/panedwindow.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Panedwindow TkCommandNames = ['::iwidgets::panedwindow'.freeze].freeze WidgetClassName = 'Panedwindow'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -41,13 +41,14 @@ class Tk::Iwidgets::Panedwindow end end + alias panecget_tkstring itemcget_tkstring alias panecget itemcget alias panecget_strict itemcget_strict alias paneconfigure itemconfigure alias paneconfiginfo itemconfiginfo alias current_paneconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb b/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb index 620b14b5d5..7c7ff7ad62 100644 --- a/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/promptdialog.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Promptdialog TkCommandNames = ['::iwidgets::promptdialog'.freeze].freeze WidgetClassName = 'Promptdialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self # index method is not available, because it shows index of the entry field def default(name) diff --git a/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb b/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb index c21007ca6c..ae56788289 100644 --- a/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb +++ b/ext/tk/lib/tkextlib/iwidgets/pushbutton.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Pushbutton TkCommandNames = ['::iwidgets::pushbutton'.freeze].freeze WidgetClassName = 'Pushbutton'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'defaultring' diff --git a/ext/tk/lib/tkextlib/iwidgets/radiobox.rb b/ext/tk/lib/tkextlib/iwidgets/radiobox.rb index e9d9521252..21181777b5 100644 --- a/ext/tk/lib/tkextlib/iwidgets/radiobox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/radiobox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Radiobox TkCommandNames = ['::iwidgets::radiobox'.freeze].freeze WidgetClassName = 'Radiobox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -46,13 +46,14 @@ class Tk::Iwidgets::Radiobox end end + alias buttoncget_tkstring itemcget_tkstring alias buttoncget itemcget alias buttoncget_strict itemcget_strict alias buttonconfigure itemconfigure alias buttonconfiginfo itemconfiginfo alias current_buttonconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb b/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb index bddef50841..056cd85322 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scopedobject.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Scopedobject TkCommandNames = ['::iwidgets::scopedobject'.freeze].freeze WidgetClassName = 'Scopedobject'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def initialize(obj_name, keys={}) @path = tk_call(self.class::TkCommandNames[0], obj_name, *hash_kv(keys)) diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb index 42368f5a56..935e04bbcc 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb @@ -17,7 +17,7 @@ end class Tk::Iwidgets::Scrolledcanvas TkCommandNames = ['::iwidgets::scrolledcanvas'.freeze].freeze WidgetClassName = 'Scrolledcanvas'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self ################################ diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb index 8b47460357..7b7b95df1c 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Scrolledframe TkCommandNames = ['::iwidgets::scrolledframe'.freeze].freeze WidgetClassName = 'Scrolledframe'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def child_site window(tk_call(@path, 'childsite')) diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb index 9b69ef07fe..dc2966bd48 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Scrolledhtml TkCommandNames = ['::iwidgets::scrolledhtml'.freeze].freeze WidgetClassName = 'Scrolledhtml'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'update' diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb index 7e63633a1d..20a4cd1d36 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb @@ -17,7 +17,7 @@ end class Tk::Iwidgets::Scrolledlistbox TkCommandNames = ['::iwidgets::scrolledlistbox'.freeze].freeze WidgetClassName = 'Scrolledlistbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'textbackground' diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb index 674298ff80..69b7d314fd 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb @@ -17,7 +17,7 @@ end class Tk::Iwidgets::Scrolledtext TkCommandNames = ['::iwidgets::scrolledtext'.freeze].freeze WidgetClassName = 'Scrolledtext'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'textbackground' @@ -116,6 +116,10 @@ class Tk::Iwidgets::Scrolledtext get('-displaychars', *index) end + def image_cget_tkstring(index, slot) + _fromUTF8(tk_send_without_enc('image', 'cget', + _get_eval_enc_str(index), "-#{slot.to_s}")) + end def image_cget_strict(index, slot) case slot.to_s when 'text', 'label', 'show', 'data', 'file' diff --git a/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb b/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb index eef093d314..5ecd2d72d2 100644 --- a/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb +++ b/ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb @@ -16,5 +16,5 @@ end class Tk::Iwidgets::Scrolledwidget TkCommandNames = ['::iwidgets::scrolledwidget'.freeze].freeze WidgetClassName = 'Scrolledwidget'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self end diff --git a/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb b/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb index bf9b5ec30a..eb8fe3ad52 100644 --- a/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb +++ b/ext/tk/lib/tkextlib/iwidgets/selectionbox.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Selectionbox TkCommandNames = ['::iwidgets::selectionbox'.freeze].freeze WidgetClassName = 'Selectionbox'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'itemson' << 'selectionon' diff --git a/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb b/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb index f772ecf8c2..45aecf3266 100644 --- a/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb +++ b/ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Selectiondialog TkCommandNames = ['::iwidgets::selectiondialog'.freeze].freeze WidgetClassName = 'Selectiondialog'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def child_site window(tk_call(@path, 'childsite')) diff --git a/ext/tk/lib/tkextlib/iwidgets/shell.rb b/ext/tk/lib/tkextlib/iwidgets/shell.rb index dabf2e6f25..c560e3ac29 100644 --- a/ext/tk/lib/tkextlib/iwidgets/shell.rb +++ b/ext/tk/lib/tkextlib/iwidgets/shell.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Shell TkCommandNames = ['::iwidgets::shell'.freeze].freeze WidgetClassName = 'Shell'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def activate tk_call(@path, 'activate') # may return val of deactibate method diff --git a/ext/tk/lib/tkextlib/iwidgets/spindate.rb b/ext/tk/lib/tkextlib/iwidgets/spindate.rb index 2c98eb4629..b3de9ed989 100644 --- a/ext/tk/lib/tkextlib/iwidgets/spindate.rb +++ b/ext/tk/lib/tkextlib/iwidgets/spindate.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Spindate TkCommandNames = ['::iwidgets::spindate'.freeze].freeze WidgetClassName = 'Spindate'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'dayon' << 'monthon' << 'yearon' diff --git a/ext/tk/lib/tkextlib/iwidgets/spinint.rb b/ext/tk/lib/tkextlib/iwidgets/spinint.rb index 5eb944d081..bede3bb1bf 100644 --- a/ext/tk/lib/tkextlib/iwidgets/spinint.rb +++ b/ext/tk/lib/tkextlib/iwidgets/spinint.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Spinint TkCommandNames = ['::iwidgets::spinint'.freeze].freeze WidgetClassName = 'Spinint'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'wrap' diff --git a/ext/tk/lib/tkextlib/iwidgets/spinner.rb b/ext/tk/lib/tkextlib/iwidgets/spinner.rb index f2d9caae21..d960996e22 100644 --- a/ext/tk/lib/tkextlib/iwidgets/spinner.rb +++ b/ext/tk/lib/tkextlib/iwidgets/spinner.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Spinner TkCommandNames = ['::iwidgets::spinner'.freeze].freeze WidgetClassName = 'Spinner'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/spintime.rb b/ext/tk/lib/tkextlib/iwidgets/spintime.rb index 0ff683ab56..20f8197a09 100644 --- a/ext/tk/lib/tkextlib/iwidgets/spintime.rb +++ b/ext/tk/lib/tkextlib/iwidgets/spintime.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Spintime TkCommandNames = ['::iwidgets::spintime'.freeze].freeze WidgetClassName = 'Spintime'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel' diff --git a/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb b/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb index dbb90e5102..f56efa9aaf 100644 --- a/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb +++ b/ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Tabnotebook TkCommandNames = ['::iwidgets::tabnotebook'.freeze].freeze WidgetClassName = 'Tabnotebook'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -46,13 +46,14 @@ class Tk::Iwidgets::Tabnotebook end end + alias pagecget_tkstring itemcget_tkstring alias pagecget itemcget alias pagecget_strict itemcget_strict alias pageconfigure itemconfigure alias pageconfiginfo itemconfiginfo alias current_pageconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/tabset.rb b/ext/tk/lib/tkextlib/iwidgets/tabset.rb index c1a1b29268..501ead4964 100644 --- a/ext/tk/lib/tkextlib/iwidgets/tabset.rb +++ b/ext/tk/lib/tkextlib/iwidgets/tabset.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Tabset TkCommandNames = ['::iwidgets::tabset'.freeze].freeze WidgetClassName = 'Tabset'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self #################################### @@ -41,13 +41,14 @@ class Tk::Iwidgets::Tabset end end + alias tabcget_tkstring itemcget_tkstring alias tabcget itemcget alias tabcget_strict itemcget_strict alias tabconfigure itemconfigure alias tabconfiginfo itemconfiginfo alias current_tabconfiginfo current_itemconfiginfo - private :itemcget, :itemcget_strict + private :itemcget_tkstring, :itemcget, :itemcget_strict private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo #################################### diff --git a/ext/tk/lib/tkextlib/iwidgets/timeentry.rb b/ext/tk/lib/tkextlib/iwidgets/timeentry.rb index 588da77dc8..b0afb3afd9 100644 --- a/ext/tk/lib/tkextlib/iwidgets/timeentry.rb +++ b/ext/tk/lib/tkextlib/iwidgets/timeentry.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Timeentry TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze WidgetClassName = 'Timeentry'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __strval_optkeys super() << 'closetext' diff --git a/ext/tk/lib/tkextlib/iwidgets/timefield.rb b/ext/tk/lib/tkextlib/iwidgets/timefield.rb index 28e1504797..c34281d4ff 100644 --- a/ext/tk/lib/tkextlib/iwidgets/timefield.rb +++ b/ext/tk/lib/tkextlib/iwidgets/timefield.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Timefield TkCommandNames = ['::iwidgets::timefield'.freeze].freeze WidgetClassName = 'Timefield'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'gmt' diff --git a/ext/tk/lib/tkextlib/iwidgets/toolbar.rb b/ext/tk/lib/tkextlib/iwidgets/toolbar.rb index c9f1753c70..5b474c3816 100644 --- a/ext/tk/lib/tkextlib/iwidgets/toolbar.rb +++ b/ext/tk/lib/tkextlib/iwidgets/toolbar.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Toolbar TkCommandNames = ['::iwidgets::toolbar'.freeze].freeze WidgetClassName = 'Toolbar'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __tkvariable_optkeys super() << 'helpvariable' diff --git a/ext/tk/lib/tkextlib/iwidgets/watch.rb b/ext/tk/lib/tkextlib/iwidgets/watch.rb index dd96d4f953..f10ec54cb2 100644 --- a/ext/tk/lib/tkextlib/iwidgets/watch.rb +++ b/ext/tk/lib/tkextlib/iwidgets/watch.rb @@ -16,7 +16,7 @@ end class Tk::Iwidgets::Watch TkCommandNames = ['::iwidgets::watch'.freeze].freeze WidgetClassName = 'Watch'.freeze - WidgetClassNames[WidgetClassName] = self + WidgetClassNames[WidgetClassName] ||= self def __boolval_optkeys super() << 'showampm' |