TreeStyle.cs 1.4 KB

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