Method: Tk::ICONS.create

Defined in:
lib/tkextlib/ICONS/icons.rb

.create(*args) ⇒ Object

icon, icon, …, ?option=>value, …?



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/tkextlib/ICONS/icons.rb', line 34

def self.create(*args)  # icon, icon, ..., ?option=>value, ...?
  if args[-1].kind_of?(Hash)
    keys = args.pop
    icons = simplelist(tk_call('::icons::icons', 'create', 
                               *(hash_kv(keys) << (args.flatten))))
  else
    icons = simplelist(tk_call('::icons::icons', 'create', 
                               args.flatten))
  end

  icons.collect{|icon| self.new(icon, :without_creating=>true)}
end