// 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; namespace osu.Game.Skinning { /// /// A container which can house s. /// Contains functionality for new drawables to be added, removed, and reloaded from provided . /// public interface ISerialisableDrawableContainer : IDrawable { /// /// 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); } }