2 # tkextlib/iwidgets/dialogshell.rb
3 # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
7 require 'tkextlib/iwidgets.rb'
11 class Dialogshell < Tk::Iwidgets::Shell
16 class Tk::Iwidgets::Dialogshell
17 TkCommandNames = ['::iwidgets::dialogshell'.freeze].freeze
18 WidgetClassName = 'Dialogshell'.freeze
19 WidgetClassNames[WidgetClassName] = self
21 ####################################
23 include TkItemConfigMethod
25 def __item_cget_cmd(id)
26 [self.path, 'buttoncget', id]
28 private :__item_cget_cmd
30 def __item_config_cmd(id)
31 [self.path, 'buttonconfigure', id]
33 private :__item_config_cmd
35 def __item_boolval_optkeys(id)
36 super(id) << 'defaultring'
38 private :__item_boolval_optkeys
41 if tagOrId.kind_of?(Tk::Itk::Component)
44 #_get_eval_string(tagOrId)
49 alias buttoncget itemcget
50 alias buttoncget_strict itemcget_strict
51 alias buttonconfigure itemconfigure
52 alias buttonconfiginfo itemconfiginfo
53 alias current_buttonconfiginfo current_itemconfiginfo
55 private :itemcget, :itemcget_strict
56 private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
58 ####################################
60 def add(tag=nil, keys={})
66 tag = Tk::Itk::Component.new(self, tagid(tag))
68 tag = Tk::Itk::Component.new(self)
70 tk_call(@path, 'add', tagid(tag), *hash_kv(keys))
75 tk_call(@path, 'default', index(idx))
80 tk_call(@path, 'delete', index(idx))
85 tk_call(@path, 'hide', index(idx))
90 number(tk_call(@path, 'index', tagid(idx)))
93 def insert(idx, tag=nil, keys={})
99 tag = Tk::Itk::Component.new(self, tagid(tag))
101 tag = Tk::Itk::Component.new(self)
103 tk_call(@path, 'insert', index(idx), tagid(tag), *hash_kv(keys))
109 tk_call(@path, 'invoke', index(idx))
111 tk_call(@path, 'invoke')
117 tk_call(@path, 'show', index(idx))