2
0

TreeStyle.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. 
  2. namespace Terminal.Gui.Views;
  3. /// <summary>Defines rendering options that affect how the tree is displayed.</summary>
  4. public class TreeStyle
  5. {
  6. /// <summary>
  7. /// Symbol to use for branch nodes that can be collapsed (are currently expanded). Defaults to '-'. Set to null to
  8. /// hide.
  9. /// </summary>
  10. public Rune? CollapseableSymbol { get; set; } = Glyphs.Collapse;
  11. /// <summary>Set to <see langword="true"/> to highlight expand/collapse symbols in hot key color.</summary>
  12. public bool ColorExpandSymbol { get; set; }
  13. /// <summary>
  14. /// Symbol to use for branch nodes that can be expanded to indicate this to the user. Defaults to '+'. Set to null
  15. /// to hide.
  16. /// </summary>
  17. public Rune? ExpandableSymbol { get; set; } = Glyphs.Expand;
  18. /// <summary>
  19. /// Set to <see langword="true"/> to cause the selected item to be rendered with only the
  20. /// <see cref="Branch{T}.Model"/> text to be highlighted. If <see langword="false"/> (the default), the entire row will
  21. /// be highlighted.
  22. /// </summary>
  23. public bool HighlightModelTextOnly { get; set; } = false;
  24. /// <summary>Invert console colours used to render the expand symbol.</summary>
  25. public bool InvertExpandSymbolColors { get; set; }
  26. /// <summary>
  27. /// <see langword="true"/> to leave the last row of the control free for overwriting (e.g. by a scrollbar) When
  28. /// <see langword="true"/> scrolling will be triggered on the second last row of the control rather than. the last.
  29. /// </summary>
  30. /// <value></value>
  31. public bool LeaveLastRow { get; set; }
  32. /// <summary>
  33. /// <see langword="true"/> to render vertical lines under expanded nodes to show which node belongs to which
  34. /// parent. <see langword="false"/> to use only whitespace.
  35. /// </summary>
  36. /// <value></value>
  37. public bool ShowBranchLines { get; set; } = true;
  38. }