2
# tkextlib/iwidgets/messagebox.rb
3
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
7
require 'tkextlib/iwidgets.rb'
11
class Messagebox < Tk::Iwidgets::Scrolledwidget
16
class Tk::Iwidgets::Messagebox
17
TkCommandNames = ['::iwidgets::messagebox'.freeze].freeze
18
WidgetClassName = 'Messagebox'.freeze
19
WidgetClassNames[WidgetClassName] = self
21
####################################
23
include TkItemConfigMethod
25
def __item_cget_cmd(id)
26
[self.path, 'type', 'cget', id]
28
private :__item_cget_cmd
30
def __item_config_cmd(id)
31
[self.path, 'type', 'configure', id]
33
private :__item_config_cmd
36
if tagOrId.kind_of?(Tk::Itk::Component)
39
#_get_eval_string(tagOrId)
44
def __item_boolval_optkeys(id)
45
super(id) << 'bell' << 'show'
47
private :__item_boolval_optkeys
49
alias typecget itemcget
50
alias typeconfigure itemconfigure
51
alias typeconfiginfo itemconfiginfo
52
alias current_typeconfiginfo current_itemconfiginfo
54
private :itemcget, :itemconfigure
55
private :itemconfiginfo, :current_itemconfiginfo
57
####################################
60
super() << 'filename' << 'savedir'
62
private :__strval_optkeys
64
def type_add(tag=nil, keys={})
70
tag = Tk::Itk::Component.new(self)
72
tk_call(@path, 'type', 'add', tagid(tag), *hash_kv(keys))
77
tk_call(@path, 'clear')
82
tk_call(@path, 'export', file)
86
def issue(string, type=None, *args)
87
tk_call(@path, 'issue', string, tagid(type), *args)