2003-07-31 16:52:40 -04:00
|
|
|
|
#
|
|
|
|
|
# a dialog box with a global grab (called by 'widget')
|
|
|
|
|
#
|
|
|
|
|
class TkDialog_Demo2 < TkDialog
|
2003-12-09 09:38:15 -05:00
|
|
|
|
###############
|
|
|
|
|
private
|
|
|
|
|
###############
|
2003-07-31 16:52:40 -04:00
|
|
|
|
def title
|
|
|
|
|
"Dialog with global grab"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def message
|
|
|
|
|
'<27><><EFBFBD>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܥå<DCA5><C3A5><EFBFBD><EFBFBD>ϥ<EFBFBD><CFA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Х륰<D0A5><EBA5B0><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>Ѥ<EFBFBD><D1A4>Ƥ<EFBFBD><C6A4>ޤ<EFBFBD><DEA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Υܥ<CEA5><DCA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¹Ԥ<C2B9><D4A4><EFBFBD><EFBFBD>ޤǡ<DEA4><C7A1>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD>ץ쥤<D7A5><ECA5A4><EFBFBD>Τ<EFBFBD><CEA4><EFBFBD><EFBFBD>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD>ΤȤ<CEA4><C8A4><EFBFBD><EFBFBD>äǤ<C3A4><C7A4>ޤ<EFBFBD><DEA4><EFBFBD><F3A1A3A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Х륰<D0A5><EBA5B0><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>Ѥ<EFBFBD><D1A4>뤳<EFBFBD>Ȥϡ<C8A4><CFA1>ޤ<EFBFBD><DEA4>ɤ<EFBFBD><C9A4>ͤ<EFBFBD><CDA4>ǤϤ<C7A4><CFA4><EFBFBD><EFBFBD>ޤ<EFBFBD><DEA4>ɤ<F3A1A3A4><C9A4><EFBFBD><EFBFBD>Ƥ<EFBFBD>ɬ<EFBFBD>פˤʤ<CBA4><CAA4>ޤǻȤ<C7BB><C8A4><EFBFBD><EFBFBD>Ȼפ<C8BB><D7A4>ʤ<EFBFBD><CAA4>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def bitmap
|
|
|
|
|
'info'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def default_button
|
|
|
|
|
0
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def buttons
|
|
|
|
|
# "λ<><CEBB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ɻ<EFBFBD><C9BB><EFBFBD>"
|
|
|
|
|
["λ<EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɻ<EFBFBD><EFBFBD><EFBFBD>"]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
ret = TkDialog_Demo2.new('message_config'=>{'wraplength'=>'4i'},
|
2004-10-11 00:51:21 -04:00
|
|
|
|
'prev_command'=>proc{|dialog|
|
|
|
|
|
Tk.after 100, proc{dialog.grab('global')}
|
|
|
|
|
}).value
|
2003-07-31 16:52:40 -04:00
|
|
|
|
case ret
|
|
|
|
|
when 0
|
|
|
|
|
print "<EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>ϡ<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>פ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>\n"
|
|
|
|
|
when 1
|
|
|
|
|
print "<EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>ϡ֥<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>פ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>\n"
|
|
|
|
|
when 2
|
2004-05-01 12:09:54 -04:00
|
|
|
|
showCode 'dialog2'
|
2003-07-31 16:52:40 -04:00
|
|
|
|
end
|
|
|
|
|
|