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 osu.Framework.Bindables;
5using osu.Framework.Graphics.Primitives;
6
7namespace osu.Framework.Graphics.Containers
8{
9 /// <summary>
10 /// Containers that implement this interface act as a target for any child <see cref="SafeAreaContainer"/>s.
11 /// </summary>
12 public interface ISafeArea : IContainer
13 {
14 /// <summary>
15 /// The <see cref="RectangleF"/> that defines the non-safe size which can be overriden into using <see cref="SafeAreaContainer.SafeAreaOverrideEdges"/>s.
16 /// </summary>
17 RectangleF AvailableNonSafeSpace { get; }
18
19 /// <summary>
20 /// The padding which should be applied to confine a child to the safe area.
21 /// </summary>
22 BindableSafeArea SafeAreaPadding { get; }
23
24 /// <summary>
25 /// Returns the full non-safe space rectangle in the coordinate space of the passed <see cref="IDrawable"/>.
26 /// </summary>
27 /// <param name="other">The target <see cref="IDrawable"/> for coordinate space translation.</param>
28 Quad ExpandRectangleToSpaceOfOtherDrawable(IDrawable other);
29 }
30}