1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-02 00:48:34 +01:00
MLEM/MLEM.Ui/Anchor.cs

74 lines
2.7 KiB
C#
Raw Normal View History

2020-05-22 17:02:24 +02:00
using MLEM.Ui.Elements;
2019-08-09 14:26:20 +02:00
namespace MLEM.Ui {
2020-05-22 17:02:24 +02:00
/// <summary>
/// Represents a location for an <see cref="Element"/> to attach to within its parent (or within the screen's viewport if it is the <see cref="RootElement"/>).
/// </summary>
2019-08-09 14:26:20 +02:00
public enum Anchor {
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the top left corner of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
TopLeft,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the center of the top edge of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
TopCenter,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the top right corner of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
TopRight,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the center of the left edge of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
CenterLeft,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the center position of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
Center,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the center of the right edge of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
CenterRight,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the bottom left corner of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
BottomLeft,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the center of the bottom edge of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
BottomCenter,
2020-05-22 17:02:24 +02:00
/// <summary>
/// Attach to the bottom right corner of the parent
/// </summary>
2019-08-09 14:26:20 +02:00
BottomRight,
2020-05-22 17:02:24 +02:00
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed below its older sibling, aligned to the left edge of its parent.
/// </summary>
AutoLeft,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed below its older sibling, aligned to the horizontal center of its parent.
/// </summary>
AutoCenter,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed below its older sibling, aligned to the right edge of its parent.
/// </summary>
AutoRight,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed in the same line as its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
/// </summary>
AutoInline,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor is an overflow-ignoring version of <see cref="AutoInline"/>, meaning that the element will never be forced into the next line.
/// Note that, when using this property, it is very easy to cause an element to overflow out of its parent container.
/// </summary>
AutoInlineIgnoreOverflow
2019-08-09 14:26:20 +02:00
}
}