mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/extconf.rb: improbe messages [ruby-core:06325].
* ext/tk/lib/tk.rb, ext/tk/lib/tk/canvas.rb, ext/tk/lib/tk/entry.rb, ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb, ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb, ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb, ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb, ext/tk/lib/tk/spinbox.rb, ext/tk/lib/tk/text.rb, ext/tk/lib/tk/toplevel.rb: improve conversion of option values. * ext/tk/lib/tkextlib/*: ditto. * ext/tk/lib/tkextlib/*: update to support ActiveTcl8.4.11.2. * ext/tk/lib/tkextlib/trofs/*: support Trofs 0.4.3. * ext/tk/lib/tkextlib/tile/*: support Tile 0.7.2. * ext/tk/lib/tkextlib/vu/*: support vu 2.3.0. * ext/tk/lib/tkextlib/tcllib/*: support Tcllib 1.8 (Tklib 0.3). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d6837060be
commit
3dd3b2136b
127 changed files with 3454 additions and 107 deletions
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Buttonbox
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_boolval_optkeys(id)
|
||||
super(id) << 'defaultring'
|
||||
end
|
||||
private :__item_boolval_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
|
|||
|
|
@ -18,6 +18,24 @@ class Tk::Iwidgets::Calendar
|
|||
WidgetClassName = 'Calendar'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() + [
|
||||
'buttonforeground', 'outline', 'selectcolor',
|
||||
'weekdaybackground', 'weekendbackground'
|
||||
]
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __listval_optkeys
|
||||
super() << 'days'
|
||||
end
|
||||
private :__listval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() + ['currentdatefont', 'datefont', 'dayfont', 'titlefont']
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
####################################
|
||||
|
||||
include Tk::ValidateConfigure
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Canvasprintbox
|
|||
WidgetClassName = 'Canvasprintbox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'filename'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'stretch'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def get_output
|
||||
tk_call(@path, 'getoutput')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Checkbox
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_boolval_optkeys(id)
|
||||
super(id) << 'defaultring'
|
||||
end
|
||||
private :__item_boolval_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Combobox
|
|||
WidgetClassName = 'Combobox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'completion' << 'dropdown' << 'editable' << 'unique'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def clear(component=None)
|
||||
tk_call(@path, 'clear', component)
|
||||
self
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Datefield
|
|||
WidgetClassName = 'Datefield'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'gmt'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'textfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def get_string
|
||||
tk_call(@path, 'get', '-string')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Dialogshell
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_boolval_optkeys(id)
|
||||
super(id) << 'defaultring'
|
||||
end
|
||||
private :__item_boolval_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Disjointlistbox
|
|||
WidgetClassName = 'Disjointlistbox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'lhslabeltext' << 'rhslabeltext' << 'lhsbuttonlabel' << 'rhsbuttonlabel'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def set_lhs(*items)
|
||||
tk_call(@path, 'setlhs', items)
|
||||
self
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Entryfield
|
|||
WidgetClassName = 'Entryfield'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'textfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
####################################
|
||||
|
||||
include Tk::ValidateConfigure
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Extbutton
|
|||
WidgetClassName = 'Extbutton'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'bitmapforeground' << 'ringbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'defaultring'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def invoke
|
||||
tk_call(@path, 'invoke')
|
||||
self
|
||||
|
|
|
|||
|
|
@ -18,6 +18,19 @@ class Tk::Iwidgets::Extfileselectionbox
|
|||
WidgetClassName = 'Extfileselectionbox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() + [
|
||||
'dirslabel', 'fileslabel', 'filterlabel', 'mask', 'nomatchstring',
|
||||
'selectionlabel'
|
||||
]
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __boolval_optkeys
|
||||
super() + ['dirson', 'fileson', 'filteron', 'selectionon']
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def child_site
|
||||
window(tk_call(@path, 'childsite'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Feedback
|
|||
WidgetClassName = 'Feedback'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'barcolor'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def reset
|
||||
tk_call(@path, 'reset')
|
||||
self
|
||||
|
|
|
|||
|
|
@ -18,6 +18,19 @@ class Tk::Iwidgets::Fileselectionbox
|
|||
WidgetClassName = 'Fileselectionbox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() + [
|
||||
'directory', 'dirslabel', 'fileslabel', 'filterlabel', 'mask',
|
||||
'nomatchstring', 'selectionlabel'
|
||||
]
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __boolval_optkeys
|
||||
super() + ['dirson', 'fileson', 'filteron', 'selectionon']
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def child_site
|
||||
window(tk_call(@path, 'childsite'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,19 @@ class Tk::Iwidgets::Finddialog
|
|||
WidgetClassName = 'Finddialog'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() + [
|
||||
'patternbackground', 'patternforeground',
|
||||
'searchbackground', 'searchforeground'
|
||||
]
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __val2ruby_optkeys # { key=>proc, ... }
|
||||
super().update('textwidget'=>proc{|v| window(v)})
|
||||
end
|
||||
private :__val2ruby_optkeys
|
||||
|
||||
def clear
|
||||
tk_call(@path, 'clear')
|
||||
self
|
||||
|
|
|
|||
|
|
@ -101,6 +101,21 @@ class Tk::Iwidgets::Hierarchy
|
|||
|
||||
####################################
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'alwaysquery' << 'expanded' << 'filter'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'markbackground' << 'markforeground' << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'textfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def clear
|
||||
tk_call(@path, 'clear')
|
||||
self
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Hyperhelp
|
|||
WidgetClassName = 'Hyperhelp'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'helpdir'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __listval_optkeys
|
||||
super() << 'topics'
|
||||
end
|
||||
private :__listval_optkeys
|
||||
|
||||
def show_topic(topic)
|
||||
tk_call(@path, 'showtopic', topic)
|
||||
self
|
||||
|
|
|
|||
|
|
@ -18,11 +18,21 @@ class Tk::Iwidgets::Labeledframe
|
|||
WidgetClassName = 'Labeledframe'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'labeltext'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __tkvariable_optkeys
|
||||
super() << 'labelvariable'
|
||||
end
|
||||
private :__tkvariable_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'labelfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def child_site
|
||||
window(tk_call(@path, 'childsite'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,11 +20,21 @@ class Tk::Iwidgets::Labeledwidget
|
|||
WidgetClassName = 'Labeledwidget'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'labeltext'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __tkvariable_optkeys
|
||||
super() << 'labelvariable'
|
||||
end
|
||||
private :__tkvariable_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'labelfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def self.alignlabels(*wins)
|
||||
tk_call('::iwidgets::Labeledwidget::alignlabels', *wins)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Mainwindow
|
|||
WidgetClassName = 'Mainwindow'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'helpline' << 'statusline'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'menubarbackground' << 'menubarforeground' << 'toolbarforeground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'menubarfont' << 'toolbarfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def child_site
|
||||
window(tk_call(@path, 'childsite'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Menubar
|
|||
WidgetClassName = 'Menubar'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'menubuttons'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __tkvariable_optkeys
|
||||
super() << 'helpvariable'
|
||||
end
|
||||
|
|
@ -37,6 +42,16 @@ class Tk::Iwidgets::Menubar
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_strval_optkeys(id)
|
||||
super(id) << 'selectcolor'
|
||||
end
|
||||
private :__item_strval_optkeys
|
||||
|
||||
def __item_tkvariable_optkeys(id)
|
||||
super(id) << 'helpstr'
|
||||
end
|
||||
private :__item_tkvariable_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@ class Tk::Iwidgets::Messagebox
|
|||
end
|
||||
end
|
||||
|
||||
def __item_boolval_optkeys(id)
|
||||
super(id) << 'bell' << 'show'
|
||||
end
|
||||
private :__item_boolval_optkeys
|
||||
|
||||
alias typecget itemcget
|
||||
alias typeconfigure itemconfigure
|
||||
alias typeconfiginfo itemconfiginfo
|
||||
|
|
@ -51,6 +56,11 @@ class Tk::Iwidgets::Messagebox
|
|||
|
||||
####################################
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'filename' << 'savedir'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def type_add(tag=nil, keys={})
|
||||
if tag.kind_of?(Hash)
|
||||
keys = tag
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ class Tk::Iwidgets::Notebook
|
|||
include TkItemConfigMethod
|
||||
|
||||
def __item_cget_cmd(id)
|
||||
[self.path, 'tabcget', id]
|
||||
[self.path, 'pagecget', id]
|
||||
end
|
||||
private :__item_cget_cmd
|
||||
|
||||
def __item_config_cmd(id)
|
||||
[self.path, 'tabconfigure', id]
|
||||
[self.path, 'pageconfigure', id]
|
||||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
|
|
@ -51,6 +51,11 @@ class Tk::Iwidgets::Notebook
|
|||
|
||||
####################################
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'auto'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def add(keys={})
|
||||
window(tk_call(@path, 'add', *hash_kv(keys)))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Optionmenu
|
|||
WidgetClassName = 'Optionmenu'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'cyclicon'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def delete(first, last=nil)
|
||||
if last
|
||||
tk_call(@path, 'delete', first, last)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ class Tk::Iwidgets::Panedwindow
|
|||
|
||||
####################################
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'showhandle'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def add(tag=nil, keys={})
|
||||
if tag.kind_of?(Hash)
|
||||
keys = tag
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ class Tk::Iwidgets::Pushbutton
|
|||
WidgetClassName = 'Pushbutton'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'defaultring'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def invoke
|
||||
tk_call_without_enc(@path, 'invoke')
|
||||
self
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ class Tk::Iwidgets::Radiobox
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_boolval_optkeys(id)
|
||||
super(id) << 'defaultring'
|
||||
end
|
||||
private :__item_boolval_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
|
|||
|
|
@ -21,6 +21,16 @@ class Tk::Iwidgets::Scrolledcanvas
|
|||
|
||||
################################
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'autoresize'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def initialize(*args)
|
||||
super(*args)
|
||||
@canvas = component_widget('canvas')
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Scrolledhtml
|
|||
WidgetClassName = 'Scrolledhtml'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'update'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'fontname' << 'link' << 'alink' << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'fixedfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def import(href)
|
||||
tk_call(@path, 'import', href)
|
||||
self
|
||||
|
|
|
|||
|
|
@ -19,11 +19,21 @@ class Tk::Iwidgets::Scrolledlistbox
|
|||
WidgetClassName = 'Scrolledlistbox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __tkvariable_optkeys
|
||||
super() << 'listvariable'
|
||||
end
|
||||
private :__tkvariable_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'textfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
################################
|
||||
|
||||
def initialize(*args)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@ class Tk::Iwidgets::Scrolledtext
|
|||
WidgetClassName = 'Scrolledtext'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'textfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
################################
|
||||
|
||||
def initialize(*args)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Selectionbox
|
|||
WidgetClassName = 'Selectionbox'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'itemson' << 'selectionon'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'itemslabel' << 'selectionlabel'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def child_site
|
||||
window(tk_call(@path, 'childsite'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Spindate
|
|||
WidgetClassName = 'Spindate'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'dayon' << 'monthon' << 'yearon'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'daylabel' << 'monthformat' << 'monthlabel' << 'yearlabel'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def get_string
|
||||
tk_call(@path, 'get', '-string')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,4 +17,14 @@ class Tk::Iwidgets::Spinint
|
|||
TkCommandNames = ['::iwidgets::spinint'.freeze].freeze
|
||||
WidgetClassName = 'Spinint'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'wrap'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __numlistval_optkeys
|
||||
super() << 'range'
|
||||
end
|
||||
private :__numlistval_optkeys
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ class Tk::Iwidgets::Spintime
|
|||
WidgetClassName = 'Spintime'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'houron' << 'militaryon' << 'minutelabel' << 'secondlabel'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'hourlabel' << 'minuteon' << 'secondon'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def get_string
|
||||
tk_call(@path, 'get', '-string')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,15 +23,20 @@ class Tk::Iwidgets::Tabnotebook
|
|||
include TkItemConfigMethod
|
||||
|
||||
def __item_cget_cmd(id)
|
||||
[self.path, 'tabcget', id]
|
||||
[self.path, 'pagecget', id]
|
||||
end
|
||||
private :__item_cget_cmd
|
||||
|
||||
def __item_config_cmd(id)
|
||||
[self.path, 'tabconfigure', id]
|
||||
[self.path, 'pageconfigure', id]
|
||||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_strval_optkeys(id)
|
||||
super(id) << 'tabbackground' << 'tabforeground'
|
||||
end
|
||||
private :__item_strval_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
@ -51,6 +56,16 @@ class Tk::Iwidgets::Tabnotebook
|
|||
|
||||
####################################
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'auto' << 'equaltabs' << 'raiseselect' << 'tabborders'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'backdrop' << 'tabbackground' << 'tabforeground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def initialize(*args)
|
||||
super(*args)
|
||||
@tabset = self.component_widget('tabset')
|
||||
|
|
|
|||
|
|
@ -51,6 +51,16 @@ class Tk::Iwidgets::Tabset
|
|||
|
||||
####################################
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'equaltabs' << 'raiseselect' << 'tabborders'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'backdrop'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def add(keys={})
|
||||
window(tk_call(@path, 'add', *hash_kv(keys)))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,4 +17,9 @@ class Tk::Iwidgets::Timeentry
|
|||
TkCommandNames = ['::iwidgets::timeentry'.freeze].freeze
|
||||
WidgetClassName = 'Timeentry'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'closetext'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@ class Tk::Iwidgets::Timefield
|
|||
WidgetClassName = 'Timefield'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'gmt'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'textbackground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'textfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def get_string
|
||||
tk_call(@path, 'get', '-string')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@ class Tk::Iwidgets::Toolbar
|
|||
end
|
||||
private :__item_config_cmd
|
||||
|
||||
def __item_strval_optkeys(id)
|
||||
super(id) << 'helpstr' << 'balloonstr'
|
||||
end
|
||||
private :__item_strval_optkeys
|
||||
|
||||
def tagid(tagOrId)
|
||||
if tagOrId.kind_of?(Tk::Itk::Component)
|
||||
tagOrId.name
|
||||
|
|
@ -48,6 +53,21 @@ class Tk::Iwidgets::Toolbar
|
|||
|
||||
####################################
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'balloonbackground' << 'balloonforeground'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def __tkvariable_optkeys
|
||||
super() << 'helpvariable'
|
||||
end
|
||||
private :__tkvariable_optkeys
|
||||
|
||||
def __font_optkeys
|
||||
super() << 'balloonfont'
|
||||
end
|
||||
private :__font_optkeys
|
||||
|
||||
def add(type, tag=nil, keys={})
|
||||
if tag.kind_of?(Hash)
|
||||
keys = tag
|
||||
|
|
|
|||
|
|
@ -18,6 +18,17 @@ class Tk::Iwidgets::Watch
|
|||
WidgetClassName = 'Watch'.freeze
|
||||
WidgetClassNames[WidgetClassName] = self
|
||||
|
||||
def __boolval_optkeys
|
||||
super() << 'showampm'
|
||||
end
|
||||
private :__boolval_optkeys
|
||||
|
||||
def __strval_optkeys
|
||||
super() << 'clockcolor' << 'hourcolor' << 'minutecolor' <<
|
||||
'pivotcolor' << 'secondcolor' << 'tickcolor'
|
||||
end
|
||||
private :__strval_optkeys
|
||||
|
||||
def get_string
|
||||
tk_call(@path, 'get', '-string')
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue