summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/lib/tkextlib/blt/container.rb
blob: be05828d952ab8abda9c0709229a59c19e2d667f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
#  tkextlib/blt/container.rb
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#

require 'tk'
require 'tkextlib/blt.rb'

module Tk::BLT
  class Container < TkWindow
    TkCommandNames = ['::blt::container'.freeze].freeze
    WidgetClassName = 'Container'.freeze
    WidgetClassNames[WidgetClassName] ||= self

    def __strval_optkeys
      super() << 'name'
    end
    private :__strval_optkeys

    def find_command(pat)
      Hash[*simplelist(tk_send_without_enc('find', '-command', pat))]
    end

    def find_name(pat)
      Hash[*simplelist(tk_send_without_enc('find', '-name', pat))]
    end
  end
end