Sha256: b6767706a6410ad70aaaa85cb322bcd48e023259d123b46129037933965ee821
Contents?: true
Size: 468 Bytes
Versions: 5
Compression:
Stored size: 468 Bytes
Contents
# Hierarchical control with items class Wx::TreeCtrl # Make these ruby enumerables so find, find_all, map etc are available include Enumerable # Iterate over all items alias :each :traverse # Return the children of +parent+ as an array of TreeItemIDs. def get_children(parent) kids = [ get_first_child(parent) ] return [] if kids[0].zero? while kid = get_next_sibling(kids.last) and not kid.zero? kids << kid end kids end end
Version data entries
5 entries across 5 versions & 1 rubygems