Example #1
0
        public static IEnumerable <TreeIter> GetTree(this TreeStore store, TreeIter parent)
        {
            yield return(parent);

            foreach (TreeIter iter in store.GetAllChilds(parent))
            {
                yield return(iter);
            }
        }
Example #2
0
        public static IEnumerable <TreeIter> GetAllChilds(this TreeStore store, TreeIter parent)
        {
            if (store.IterHasChild(parent))
            {
                TreeIter child;
                if (store.IterChildren(out child, parent))
                {
                    do
                    {
                        yield return(child);

                        foreach (TreeIter iter in store.GetAllChilds(child))
                        {
                            yield return(iter);
                        }
                    }while (store.IterNext(ref child));
                }
            }
            yield break;
        }