using System; using System.Collections.Generic; using Chernobyl.Collections.Generic.Event; using Chernobyl.Graphics; namespace Chernobyl.Interface { /// /// A delegate for handling methods that create interface views of some object. /// /// The item that the view will be representing. /// The view that can be used to render the item. public delegate IDrawableTransformCollidable2D InterfaceFactory(object item); /// /// An interface for working with a services class that holds interface /// factory collections. /// public interface IInterfaceFactoryCollectionServices : IEventCollection { } /// /// The default implementation of the . /// public class InterfaceFactoryCollectionServices : DecoratingEventList, IInterfaceFactoryCollectionServices {} /// /// An interface for working with collections of interface factories. /// Interface factories are factories that create interfaces for a specific /// type. For example, an interface factory may exist to create an interface /// for a int or string or an IEnumerable. There are different types of /// factories for different types of interfaces. For example, interface /// factories exist to create icons for different types or for creating /// interfaces that fit in the cell of a table. /// public interface IInterfaceFactoryCollection : IDictionary { } /// /// An interface for working with collections of interface factories that /// create a "standard interface". These interfaces do not follow any /// particular rules and are the default interfaces that are created when no /// rules can be applied to the interface. /// public interface IStandardInterfaceFactoryCollection : IInterfaceFactoryCollection {} /// /// The default implementation of the /// interface. /// public class StandardInterfaceFactoryCollection : Dictionary, IStandardInterfaceFactoryCollection { } /// /// An interface for working with collections of interface factories that /// create icons that represent some type. /// public interface IIconInterfaceFactoryCollection : IInterfaceFactoryCollection { } /// /// The default implementation of the /// interface. /// public class IconInterfaceFactoryCollection : Dictionary, IIconInterfaceFactoryCollection { } }