3 # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
7 require 'tk/itemconfig.rb'
8 require 'tkextlib/blt.rb'
13 extend TkItemConfigMethod
15 TkCommandNames = ['::blt::busy'.freeze].freeze
17 ###########################
19 class Shield < TkWindow
20 def self.shield_path(win)
21 win = window(win) unless win.kind_of?(TkWindow)
22 if win.kind_of?(Tk::Toplevel)
30 @path = self.class.shield_path(win)
34 def self.shield_path(win)
35 Tk::BLT::Busy::Shield.shield_path(win)
40 class << Tk::BLT::Busy
41 def __item_config_cmd(win)
42 ['::blt::busy', 'configure', win]
44 private :__item_config_cmd
47 alias configure itemconfigure
48 alias configinfo itemconfiginfo
49 alias current_configinfo current_itemconfiginfo
50 private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo
52 ##################################
54 def hold(win, keys={})
55 tk_call('::blt::busy', 'hold', win, *hash_kv(keys))
59 tk_call('::blt::busy', 'release', *wins)
63 tk_call('::blt::busy', 'forget', *wins)
67 tk_split_list(tk_call('::blt::busy', 'isbusy', pat))
71 tk_split_list(tk_call('::blt::busy', 'names', pat))
76 bool(tk_call('::blt::busy', 'check', win))
80 bool(tk_call('::blt::busy', 'status', win))