diff options
Diffstat (limited to 'ext/tk/lib/tkextlib/blt/busy.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/blt/busy.rb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/ext/tk/lib/tkextlib/blt/busy.rb b/ext/tk/lib/tkextlib/blt/busy.rb index c0740dc2d7..4726e466f4 100644 --- a/ext/tk/lib/tkextlib/blt/busy.rb +++ b/ext/tk/lib/tkextlib/blt/busy.rb @@ -13,6 +13,27 @@ module Tk::BLT extend TkItemConfigMethod TkCommandNames = ['::blt::busy'.freeze].freeze + + ########################### + + class Shield < TkWindow + def self.shield_path(win) + win = window(win) unless win.kind_of?(TkWindow) + if win.kind_of?(TkToplevel) + win.path + '._Busy' + else + win.path + '_Busy' + end + end + + def initialize(win) + @path = self.class.shield_path(win) + end + end + + def self.shield_path(win) + Tk::BLT::Busy::Shield.shield_path(win) + end end end @@ -30,27 +51,6 @@ class << Tk::BLT::Busy ################################## - class Shield < TkWindow - def self.shield_path(win) - win = window(win) unless win.kind_of?(TkWindow) - if win.kind_of?(TkToplevel) - win.path + '._Busy' - else - win.path + '_Busy' - end - end - - def initialize(win) - @path = self.class.shield_path(win) - end - end - - def shield_path(win) - Tk::BLT::Busy::Shield.shield_path(win) - end - - ################################## - def hold(win, keys={}) tk_call('::blt::busy', 'hold', win, *hash_kv(keys)) end |