Class ListView
A scrolling list with one selected row. The arrows, Page Up, Page Down, Home, End, the wheel, and a click move the selection; Enter or a second click on the selected row runs DarkEffekt.Terminal.UI.ListView.OnActivate.
Assembly: DarkEffekt.Terminal.UI
Section titled “Assembly: DarkEffekt.Terminal.UI”public sealed class ListView : ElementInheritance: System.Object -> DarkEffekt.Terminal.UI.Element
Properties
Section titled “Properties”public List<string> Items { get; }ScrollBar
Section titled “ScrollBar”When the bar at the right edge shows. Auto shows it while the items overflow the rows.
public ScrollBarMode ScrollBar { get; set; }ScrollBarStyle
Section titled “ScrollBarStyle”The bar’s glyphs. Null takes the interface’s DarkEffekt.Terminal.UI.TerminalUI.ScrollBarStyle.
public ScrollBarStyle ScrollBarStyle { get; set; }ChildCount
Section titled “ChildCount”public override int ChildCount { get; }SelectedIndex
Section titled “SelectedIndex”public int SelectedIndex { get; set; }SelectedItem
Section titled “SelectedItem”public string SelectedItem { get; }OnSelected
Section titled “OnSelected”public Action<int> OnSelected { get; set; }OnActivate
Section titled “OnActivate”public Action<int> OnActivate { get; set; }Focusable
Section titled “Focusable”True for an element that takes keyboard focus.
public override bool Focusable { get; }Methods
Section titled “Methods”GetChild(int)
Section titled “GetChild(int)”public override Element GetChild(int index)Returns
Section titled “Returns”DarkEffekt.Terminal.UI.Element
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Int32 |
index |
MeasureCore(CellSize)
Section titled “MeasureCore(CellSize)”The size this element wants, within the room given.
protected override CellSize MeasureCore(CellSize available)Returns
Section titled “Returns”DarkEffekt.Terminal.UI.CellSize
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.UI.CellSize | available |
ArrangeCore(CellRect)
Section titled “ArrangeCore(CellRect)”Places the children inside this element’s rectangle.
protected override void ArrangeCore(CellRect rect)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.UI.CellRect | rect |
RenderCore(CellCanvas)
Section titled “RenderCore(CellCanvas)”protected override void RenderCore(CellCanvas canvas)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.UI.CellCanvas | canvas |
OnKey(in TermKeyEvent)
Section titled “OnKey(in TermKeyEvent)”A key for this element. Return true when it was used; false passes it to the parent.
public override bool OnKey(in TermKeyEvent e)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.TermKeyEvent | e |
OnMouse(in TermMouseEvent)
Section titled “OnMouse(in TermMouseEvent)”A pointer event on this element. Return true when it was used.
public override bool OnMouse(in TermMouseEvent e)Returns
Section titled “Returns”System.Boolean
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.TermMouseEvent | e |