Exemplo n.º 1
0
 public static IEnumerable <T> ObjectChildrenOf <T> (this TreeStore model, TreeIter iter, bool recursive)
 {
     foreach (var child in IterChildrenOf(model, iter, recursive))
     {
         yield return(model.Get <T> (child));
     }
 }
Exemplo n.º 2
0
        public static TreeIter IterFor <T> (this TreeStore model, T item)
        {
            var iter = TreeIter.Zero;

            model.Foreach((m, path, i) => {
                if (model.Get <T> (i).Equals(item))
                {
                    iter = i;
                    return(true);
                }
                return(false);
            });
            return(iter);
        }