Alignment.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Determines the position of items when arranged in a container.
  4. /// </summary>
  5. public enum Alignment
  6. {
  7. /// <summary>
  8. /// The items will be aligned to the start (left or top) of the container.
  9. /// </summary>
  10. /// <remarks>
  11. /// <para>
  12. /// If the container is smaller than the total size of the items, the end items will be clipped (their locations
  13. /// will be greater than the container size).
  14. /// </para>
  15. /// <para>
  16. /// The <see cref="AlignmentModes"/> enumeration provides additional options for aligning items in a container.
  17. /// </para>
  18. /// </remarks>
  19. /// <example>
  20. /// <c>
  21. /// |111 2222 33333 |
  22. /// </c>
  23. /// </example>
  24. Start = 0,
  25. /// <summary>
  26. /// The items will be aligned to the end (right or bottom) of the container.
  27. /// </summary>
  28. /// <remarks>
  29. /// <para>
  30. /// If the container is smaller than the total size of the items, the start items will be clipped (their locations
  31. /// will be negative).
  32. /// </para>
  33. /// <para>
  34. /// The <see cref="AlignmentModes"/> enumeration provides additional options for aligning items in a container.
  35. /// </para>
  36. /// </remarks>
  37. /// <example>
  38. /// <c>
  39. /// | 111 2222 33333|
  40. /// </c>
  41. /// </example>
  42. End,
  43. /// <summary>
  44. /// Center in the available space.
  45. /// </summary>
  46. /// <remarks>
  47. /// <para>
  48. /// If centering is not possible, the group will be left-aligned.
  49. /// </para>
  50. /// <para>
  51. /// Extra space will be distributed between the items, biased towards the left.
  52. /// </para>
  53. /// </remarks>
  54. /// <example>
  55. /// <c>
  56. /// | 111 2222 33333 |
  57. /// </c>
  58. /// </example>
  59. Center,
  60. /// <summary>
  61. /// The items will fill the available space.
  62. /// </summary>
  63. /// <remarks>
  64. /// <para>
  65. /// Extra space will be distributed between the items, biased towards the end.
  66. /// </para>
  67. /// </remarks>
  68. /// <example>
  69. /// <c>
  70. /// |111 2222 33333|
  71. /// </c>
  72. /// </example>
  73. Fill,
  74. }