// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.Linq; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Extensions; namespace osu.Game.Skinning { /// /// Denotes a container which can house s. /// public interface ISkinnableTarget : IDrawable { /// /// The definition of this target. /// GlobalSkinComponentLookup.LookupType Target { get; } /// /// A bindable list of components which are being tracked by this skinnable target. /// IBindableList Components { get; } /// /// Serialise all children as . /// /// The serialised content. IEnumerable CreateSerialisedInfo() => Components.Select(d => ((Drawable)d).CreateSerialisedInfo()); /// /// Reload this target from the current skin. /// void Reload(); /// /// Reload this target from the provided skinnable information. /// void Reload(SerialisedDrawableInfo[] skinnableInfo); /// /// Add a new skinnable component to this target. /// /// The component to add. void Add(ISerialisableDrawable drawable); /// /// Remove an existing skinnable component from this target. /// /// The component to remove. void Remove(ISerialisableDrawable component); } }