VisualRole.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. namespace Terminal.Gui.Drawing;
  2. /// <summary>
  3. /// Represents the semantic visual role of a visual element rendered by a <see cref="View"/>. Each VisualRole maps to
  4. /// a property of <see cref="Scheme"/> (e.g., <see cref="Scheme.Normal"/>).
  5. /// </summary>
  6. /// <remarks>
  7. /// A single View may render as one or multiple elements. Each element can be associated with a different
  8. /// <see cref="VisualRole"/>.
  9. /// </remarks>
  10. public enum VisualRole
  11. {
  12. /// <summary>
  13. /// The default visual role for unfocused, unselected, enabled elements.
  14. /// </summary>
  15. Normal,
  16. /// <summary>
  17. /// The visual role for <see cref="Normal"/> elements with a <see cref="View.HotKey"/> indicator.
  18. /// </summary>
  19. HotNormal,
  20. /// <summary>
  21. /// The visual role when the element is focused.
  22. /// </summary>
  23. Focus,
  24. /// <summary>
  25. /// The visual role for <see cref="Focus"/> elements with a <see cref="View.HotKey"/> indicator.
  26. /// </summary>
  27. HotFocus,
  28. /// <summary>
  29. /// The visual role for elements that are active or selected (e.g., selected item in a <see cref="ListView"/>). Also
  30. /// used
  31. /// for headers in, <see cref="HexView"/>, <see cref="CharMap"/> and <see cref="TabView"/>.
  32. /// </summary>
  33. Active,
  34. /// <summary>
  35. /// The visual role for <see cref="Active"/> elements with a <see cref="View.HotKey"/> indicator.
  36. /// </summary>
  37. HotActive,
  38. /// <summary>
  39. /// The visual role for elements that are highlighted (e.g., when the mouse is inside over a <see cref="Button"/>).
  40. /// </summary>
  41. Highlight,
  42. /// <summary>
  43. /// The visual role for elements that are disabled and not interactable.
  44. /// </summary>
  45. Disabled,
  46. /// <summary>
  47. /// The visual role for elements that are editable (e.g., <see cref="TextField"/> and <see cref="TextView"/>).
  48. /// </summary>
  49. Editable,
  50. /// <summary>
  51. /// The visual role for elements that are normally editable but currently read-only.
  52. /// </summary>
  53. ReadOnly
  54. }