// This code is based on http://objectlistview.sourceforge.net (GPLv3 tree/list controls // by phillip.piper@gmail.com). Phillip has explicitly granted permission for his design // and code to be used in this library under the MIT license. using System.Collections.Generic; namespace Terminal.Gui { /// /// Event args for the event /// /// public class DrawTreeViewLineEventArgs where T : class { /// /// The object at this line in the tree /// public T Model { get; init; } /// /// The that is performing the /// rendering. /// public TreeView Tree { get; init; } /// /// The line within tree view bounds that is being rendered /// public int Y { get; init; } /// /// Set to true to cancel drawing (e.g. if you have already manually /// drawn content). /// public bool Handled { get; set; } /// /// The rune and color of each symbol that will be rendered. Note /// that only is respected. You /// can modify these to change what is rendered. /// /// /// Changing the length of this collection may result in corrupt rendering /// public List RuneCells { get; init; } /// /// The notional index in which contains the first /// character of the text (i.e. /// after all branch lines and expansion/collapse sybmols). /// /// /// May be negative or outside of bounds of if the view /// has been scrolled horizontally. /// public int IndexOfModelText { get; init; } /// /// If line contains a branch that can be expanded/collapsed then this is /// the index in at which the symbol is (or null for /// leaf elements). /// public int? IndexOfExpandCollapseSymbol { get; init; } } }