AlignmentModes.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Determines alignment modes for <see cref="Alignment"/>.
  4. /// </summary>
  5. [Flags]
  6. public enum AlignmentModes
  7. {
  8. /// <summary>
  9. /// The items will be arranged from start (left/top) to end (right/bottom).
  10. /// </summary>
  11. StartToEnd = 0,
  12. /// <summary>
  13. /// The items will be arranged from end (right/bottom) to start (left/top).
  14. /// </summary>
  15. /// <remarks>
  16. /// Not implemented.
  17. /// </remarks>
  18. EndToStart = 1,
  19. /// <summary>
  20. /// At least one space will be added between items. Useful for justifying text where at least one space is needed.
  21. /// </summary>
  22. /// <remarks>
  23. /// <para>
  24. /// If the total size of the items is greater than the container size, the space between items will be ignored
  25. /// starting from the end.
  26. /// </para>
  27. /// </remarks>
  28. AddSpaceBetweenItems = 2,
  29. /// <summary>
  30. /// When aligning via <see cref="Alignment.Start"/> or <see cref="Alignment.End"/>, the item opposite to the alignment (the first or last item) will be ignored.
  31. /// </summary>
  32. /// <remarks>
  33. /// <para>
  34. /// If the container is smaller than the total size of the items, the end items will be clipped (their locations
  35. /// will be greater than the container size).
  36. /// </para>
  37. /// </remarks>
  38. /// <example>
  39. /// <c>
  40. /// Start: |111 2222 33333|
  41. /// End: |111 2222 33333|
  42. /// </c>
  43. /// </example>
  44. IgnoreFirstOrLast = 4,
  45. }