DimAutoStyle.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /// </summary>
  32. Text = 2,
  33. /// <summary>
  34. /// The dimension will be computed using the largest of the view's <see cref="View.Text"/>, <see cref="View.GetContentSize ()"/>, and
  35. /// <see cref="View.Subviews"/> corresponding dimension
  36. /// </summary>
  37. Auto = Content | Text,
  38. }