1#
2#  tkextlib/iwidgets/shell.rb
3#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
4#
5
6require 'tk'
7require 'tkextlib/iwidgets.rb'
8
9module Tk
10  module Iwidgets
11    class Shell < Tk::Itk::Toplevel
12    end
13  end
14end
15
16class Tk::Iwidgets::Shell
17  TkCommandNames = ['::iwidgets::shell'.freeze].freeze
18  WidgetClassName = 'Shell'.freeze
19  WidgetClassNames[WidgetClassName] ||= self
20
21  def activate
22    tk_call(@path, 'activate')  # may return val of deactibate method
23  end
24
25  def center(win=None)
26    tk_call(@path, 'center', win)
27    self
28  end
29
30  def child_site
31    window(tk_call(@path, 'childsite'))
32  end
33
34  def deactivate(val=None)
35    tk_call(@path, 'deactivate', val)
36    self
37  end
38end
39