Class: Tk::Tcllib::ICO (Ruby 2.3.4)

In Files

  • tk/lib/tkextlib/tcllib/ico.rb

Class/Module Index [+]

Quicksearch

Tk::Tcllib::ICO

Constants

PACKAGE_NAME

Public Class Methods

clear_cache(file=None)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 104
def self.clear_cache(file=None)
  tk_call_without_enc('::ico::clearCache', file)
end
            
copy(from_file, from_index, to_file, to_index, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 93
def self.copy(from_file, from_index, to_file, to_index, keys=nil)
  tk_call_without_enc('::ico::copyIcon',
                      from_file, from_index, to_file, to_index,
                      *hash_kv(keys, true))
end
            
exe_to_ico(exe_file, ico_file, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 99
def self.exe_to_ico(exe_file, ico_file, keys=nil)
  tk_call_without_enc('::ico::copyIcon', exe_file, ico_file,
                      *hash_kv(keys, true))
end
            
get(file, index, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 57
def self.get(file, index, keys=nil)
  tk_call_without_enc('::ico::getIcon', file, index, *hash_kv(keys, true))
end
            
get_by_name(file, name, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 64
def self.get_by_name(file, name, keys=nil)
  tk_call_without_enc('::ico::getIconByName', file, name,
                      *hash_kv(keys, true))
end
            
get_data(file, index, keys={})
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 82
def self.get_data(file, index, keys={})
  keys['format'] = 'data'
  tk_split_list(tk_call_without_enc('::ico::getIcon', file, index,
                                    *hash_kv(keys, true)))
end
            
get_fileicon(file, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 72
def self.get_fileicon(file, keys=nil)
  tk_call_without_enc('::ico::getFileIcon', file, *hash_kv(keys, true))
end
            
get_icon(*args)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 60
def self.get_icon(*args)
  get(*args)
end
            
get_icon_by_name(*args)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 68
def self.get_icon_by_name(*args)
  get_by_name(*args)
end
            
get_image(file, index, keys={})
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 76
def self.get_image(file, index, keys={})
  keys = _symbolkey2str(keys)
  keys.delete('format')
  self.new(file, index, keys)
end
            
get_members(file, name, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 49
def self.get_members(file, name, keys=nil)
  tk_split_simplelist(tk_call_without_enc('::ico::getMembers', file, name,
                                          *hash_kv(keys, true))).map{|elem|
    name, width, height, bpp =  tk_split_simplelist(elem)
    [name, number(width), number(height), number(bpp)]
  }
end
            
icons(file, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 42
def self.icons(file, keys=nil)
  tk_split_simplelist(tk_call_without_enc('::ico::icons', file,
                                          *hash_kv(keys, true))).map{|elem|
    num_or_str(elem)
  }
end
            
list(file, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 37
def self.list(file, keys=nil)
  tk_split_list(tk_call_without_enc('::ico::getIconList', file,
                                    *hash_kv(keys, true)))
end
            
new(file, index, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 123
def initialize(file, index, keys=nil)
  keys = _symbolkey2str(keys)
  if keys.key?('name')
    @path = keys['name'].to_s
  else
    Tk_Image_ID.mutex.synchronize{
      @path = Tk_Image_ID.join(TkCore::INTERP._ip_id_)
      Tk_Image_ID[1].succ!
    }
  end
  tk_call_without_enc('::ico::getIcon', file, index, '-name', @path,
                      '-format', 'image', *hash_kv(keys, true))
  Tk_IMGTBL[@path] = self
end
            
package_name()
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 21
def self.package_name
  PACKAGE_NAME
end
            
package_version()
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 25
def self.package_version
  begin
    TkPackage.require('ico')
  rescue
    ''
  end
end
            
show(file, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 117
def self.show(file, keys=nil)
  tk_call_without_enc('::ico::Show', file, *hash_kv(keys, true))
end
            
transparent_color(image, color)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 108
def self.transparent_color(image, color)
  if image.kind_of?(Array)
    tk_split_list(tk_call_without_enc('::ico::transparentColor',
                                      image, color))
  else
    tk_call_without_enc('::ico::transparentColor', image, color)
  end
end
            
write(file, index, depth, data, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 88
def self.write(file, index, depth, data, keys=nil)
  tk_call_without_enc('::ico::writeIcon', file, index, depth, data,
                      *hash_kv(keys, true))
end
            

Public Instance Methods

transparent_color(color)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 143
def transparent_color(color)
  tk_call_without_enc('::ico::transparentColor', @path, color)
  self
end
            
write(file, index, depth, keys=nil)
 
               # File tk/lib/tkextlib/tcllib/ico.rb, line 138
def write(file, index, depth, keys=nil)
  Tk::Tcllib::ICO.write(file, index, depth, @path, keys=nil)
  self
end