using System.Collections.Generic;
namespace Terminal.Gui {
///
/// Interface for supplying data to a on demand as root level nodes
/// are expanded by the user
///
public interface ITreeBuilder {
///
/// Returns true if is implemented by this class
///
///
bool SupportsCanExpand { get; }
///
/// Returns true/false for whether a model has children. This method should be implemented
/// when is an expensive operation otherwise
/// should return false (in which case this method will not
/// be called)
///
/// Only implement this method if you have a very fast way of determining whether
/// an object can have children e.g. checking a Type (directories can always be expanded)
///
///
///
bool CanExpand (T toExpand);
///
/// Returns all children of a given which should be added to the
/// tree as new branches underneath it
///
///
///
IEnumerable GetChildren (T forObject);
}
}