AlignmentModes.cs 1.6 KB

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