A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osuTK;
5using System;
6using System.Collections.Generic;
7using osu.Framework.Graphics.Effects;
8
9namespace osu.Framework.Graphics.Containers
10{
11 public interface IContainer : IDrawable
12 {
13 EdgeEffectParameters EdgeEffect { get; set; }
14
15 Vector2 RelativeChildSize { get; set; }
16
17 Vector2 RelativeChildOffset { get; set; }
18 }
19
20 public interface IContainerEnumerable<out T> : IContainer
21 where T : class, IDrawable
22 {
23 IReadOnlyList<T> Children { get; }
24
25 int RemoveAll(Predicate<T> match);
26 }
27
28 public interface IContainerCollection<in T> : IContainer
29 where T : class, IDrawable
30 {
31 IReadOnlyList<T> Children { set; }
32
33 T Child { set; }
34
35 IEnumerable<T> ChildrenEnumerable { set; }
36
37 void Add(T drawable);
38 void AddRange(IEnumerable<T> collection);
39
40 bool Remove(T drawable);
41 void RemoveRange(IEnumerable<T> range);
42 }
43}