DimAutoStyle.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Specifies how <see cref="Dim.Auto"/> will compute the dimension.
  4. /// </summary>
  5. [Flags]
  6. public enum DimAutoStyle
  7. {
  8. /// <summary>
  9. /// The dimensions will be computed based on the View's <see cref="View.GetContentSize ()"/> and/or <see cref="View.SubViews"/>.
  10. /// <para>
  11. /// If <see cref="View.ContentSizeTracksViewport"/> is <see langword="true"/>, <see cref="View.GetContentSize ()"/> will be used to determine the dimension.
  12. /// </para>
  13. /// <para>
  14. /// Otherwise, the SubView in <see cref="View.SubViews"/> with the largest corresponding position plus dimension
  15. /// will determine the dimension.
  16. /// </para>
  17. /// <para>
  18. /// The corresponding dimension of the view's <see cref="View.Text"/> will be ignored.
  19. /// </para>
  20. /// </summary>
  21. Content = 1,
  22. /// <summary>
  23. /// <para>
  24. /// The corresponding dimension of the view's <see cref="View.Text"/>, formatted using the
  25. /// <see cref="View.TextFormatter"/> settings,
  26. /// will be used to determine the dimension.
  27. /// </para>
  28. /// <para>
  29. /// The corresponding dimensions of <see cref="View.GetContentSize ()"/> and/or <see cref="View.SubViews"/> will be ignored.
  30. /// </para>
  31. /// <para>
  32. /// If <see cref="DimAuto.MaximumContentDim"/> is set, the dimension will be the maximum of the formatted text and the
  33. /// dimension provided by <see cref="DimAuto.MaximumContentDim"/>. Otherwise, the dimension will be that of the formatted text.
  34. /// </para>
  35. /// </summary>
  36. Text = 2,
  37. /// <summary>
  38. /// The dimension will be computed using the largest of the view's <see cref="View.Text"/>, <see cref="View.GetContentSize ()"/>, and
  39. /// <see cref="View.SubViews"/> corresponding dimension
  40. /// </summary>
  41. Auto = Content | Text,
  42. }