1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-27 15:08:33 +01:00
MLEM/MLEM.Ui/Anchor.cs

97 lines
4.2 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"/>).
2020-05-22 17:02:24 +02:00
/// </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 at the top right of its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
2020-05-22 17:02:24 +02:00
/// </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,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed at the center right of its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
/// </summary>
AutoInlineCenter,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor is an overflow-ignoring version of <see cref="AutoInlineCenter"/>, 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>
AutoInlineCenterIgnoreOverflow,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor will cause an element to be placed at the bottom right of its older sibling, or at the start of the next line if there is no space to the right of its older sibling.
/// </summary>
AutoInlineBottom,
/// <summary>
/// This is an auto-anchoring value.
/// This anchor is an overflow-ignoring version of <see cref="AutoInlineBottom"/>, 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>
AutoInlineBottomIgnoreOverflow
2019-08-09 14:26:20 +02:00
}
2022-06-17 18:23:47 +02:00
}