Methods
C
D
G
L
N
S
Constants
TCL_SCRIPT_PATH = File.join(File.dirname(__FILE__), 'tktree.tcl')
 
Instance Public methods
create_self(keys)
# File ext/tk/sample/tktree.rb, line 18
  def create_self(keys)
    args = [@path]
    if keys.kind_of?(Hash)
      font = keys.delete('itemfont')
#      font = hash_kv(font) if font.kind_of?(Hash)
      keys['font'] = font if font
#      args.concat(hash_kv(keys))
      args << keys
    end
    begin
      tk_call('::tktree::treecreate', *args)
    rescue NameError, RuntimeError
      Tk.load_tclscript(TkTree::TCL_SCRIPT_PATH)
      tk_call('::tktree::treecreate', *args)
    end
  end
delitem(itempath)
# File ext/tk/sample/tktree.rb, line 48
def delitem(itempath)
  tk_call('::tktree::delitem', @path, itempath)
end
getselection()
# File ext/tk/sample/tktree.rb, line 56
def getselection
  tk_call('::tktree::getselection', @path)
end
labelat(xpos, ypos)
# File ext/tk/sample/tktree.rb, line 52
def labelat(xpos, ypos)
  tk_call('::tktree::delitem', @path, xpos, ypos)
end
newitem(itempath, keys = nil)
# File ext/tk/sample/tktree.rb, line 35
  def newitem(itempath, keys = nil)
    if keys.kind_of?(Hash)
      keys = _symbolkey2str(keys)
      font = keys.delete('itemfont')
#      font = hash_kv(font) if font.kind_of?(Hash)
      keys['font'] = font if font
#      tk_call('::tktree::newitem', @path, itempath, *hash_kv(keys))
      tk_call('::tktree::newitem', @path, itempath, keys)
    else
      tk_call('::tktree::newitem', @path, itempath)
    end
  end
setselection(itempath)
# File ext/tk/sample/tktree.rb, line 60
def setselection(itempath)
  tk_call('::tktree::getselection', @path, itempath)
end