DimAutoStyle.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 dimension will be computed using both the view's <see cref="View.Text"/> and
  10. /// <see cref="View.Subviews"/> (whichever is larger).
  11. /// </summary>
  12. Auto = Content | Text,
  13. /// <summary>
  14. /// The dimensions will be computed based on the View's non-Text content.
  15. /// <para>
  16. /// If <see cref="View.ContentSize"/> is explicitly set (is not <see langword="null"/>) then
  17. /// <see cref="View.ContentSize"/>
  18. /// will be used to determine the dimension.
  19. /// </para>
  20. /// <para>
  21. /// Otherwise, the Subview in <see cref="View.Subviews"/> with the largest corresponding position plus dimension
  22. /// will determine the dimension.
  23. /// </para>
  24. /// <para>
  25. /// The corresponding dimension of the view's <see cref="View.Text"/> will be ignored.
  26. /// </para>
  27. /// </summary>
  28. Content = 0,
  29. /// <summary>
  30. /// <para>
  31. /// The corresponding dimension of the view's <see cref="View.Text"/>, formatted using the
  32. /// <see cref="View.TextFormatter"/> settings,
  33. /// will be used to determine the dimension.
  34. /// </para>
  35. /// <para>
  36. /// The corresponding dimensions of the <see cref="View.Subviews"/> will be ignored.
  37. /// </para>
  38. /// </summary>
  39. Text = 1
  40. }