ViewDiagnostics.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. 
  2. namespace Terminal.Gui;
  3. /// <summary>Enables diagnostic functions for <see cref="View"/>.</summary>
  4. [Flags]
  5. public enum ViewDiagnosticFlags : uint
  6. {
  7. /// <summary>All diagnostics off</summary>
  8. Off = 0b_0000_0000,
  9. /// <summary>
  10. /// When enabled, <see cref="View.OnDrawAdornments"/> will draw a ruler in the Thickness.
  11. /// </summary>
  12. Ruler = 0b_0000_0001,
  13. /// <summary>
  14. /// When enabled, <see cref="View.OnDrawAdornments"/> will draw the first letter of the Adornment name ('M', 'B', or 'P')
  15. /// in the Thickness.
  16. /// </summary>
  17. Padding = 0b_0000_0010,
  18. /// <summary>
  19. /// When enabled, <see cref="Adornment.OnMouseEnter(Gui.MouseEvent)"/> and <see cref="Adornment.OnMouseLeave(Gui.MouseEvent)"/>
  20. /// will invert the foreground and background colors.
  21. /// </summary>
  22. MouseEnter = 0b_0000_00100
  23. }
  24. public partial class View
  25. {
  26. /// <summary>Flags to enable/disable <see cref="View"/> diagnostics.</summary>
  27. public static ViewDiagnosticFlags Diagnostics { get; set; }
  28. }