Class ScrollView
A viewport over one child larger than the room, with a bar along each side that scrolls. The content extends down by default; set DarkEffekt.Terminal.UI.ScrollView.Horizontal for content wider than the view. The wheel, the arrows, Page Up, Page Down, Home, and End scroll, and a change of focus brings the focused element into view. A view that cannot move any further leaves the wheel or the key to the view around it.
The view itself takes focus only when nothing inside it can, so a pane of text is reachable from the keyboard and a pane of controls adds no stop of its own.
Assembly: DarkEffekt.Terminal.UI
Section titled “Assembly: DarkEffekt.Terminal.UI”public sealed class ScrollView : ElementInheritance: System.Object -> DarkEffekt.Terminal.UI.Element
Properties
Section titled “Properties”public Element Child { get; set; }Horizontal
Section titled “Horizontal”True when the content may extend past the right edge. Off, the child takes the view’s width.
public bool Horizontal { get; set; }Vertical
Section titled “Vertical”True when the content may extend past the bottom edge. Off, the child takes the view’s height.
public bool Vertical { get; set; }VerticalBar
Section titled “VerticalBar”public ScrollBarMode VerticalBar { get; set; }HorizontalBar
Section titled “HorizontalBar”public ScrollBarMode HorizontalBar { get; set; }OffsetX
Section titled “OffsetX”The content cell at the view’s left edge.
public int OffsetX { get; set; }OffsetY
Section titled “OffsetY”The content cell at the view’s top edge.
public int OffsetY { get; set; }WheelStep
Section titled “WheelStep”The cells one wheel notch moves.
public int WheelStep { get; set; }ScrollBarStyle
Section titled “ScrollBarStyle”The glyphs of this view’s bars. Null takes the interface’s DarkEffekt.Terminal.UI.TerminalUI.ScrollBarStyle.
public ScrollBarStyle ScrollBarStyle { get; set; }ContentSize
Section titled “ContentSize”The child’s size at the last layout.
public CellSize ContentSize { get; }ViewportSize
Section titled “ViewportSize”The cells the content shows through at the last layout, inside the bars.
public CellSize ViewportSize { get; }Focusable
Section titled “Focusable”True for an element that takes keyboard focus.
public override bool Focusable { get; }ChildCount
Section titled “ChildCount”public override int ChildCount { get; }Methods
Section titled “Methods”ScrollTo(int, int)
Section titled “ScrollTo(int, int)”public void ScrollTo(int x, int y)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Int32 |
x |
System.Int32 |
y |
ScrollBy(int, int)
Section titled “ScrollBy(int, int)”public void ScrollBy(int dx, int dy)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
System.Int32 |
dx |
System.Int32 |
dy |
ScrollIntoView(Element)
Section titled “ScrollIntoView(Element)”Scrolls so that an element inside the view shows, as a change of focus does.
public void ScrollIntoView(Element element)Parameters
Section titled “Parameters”| Type | Name |
|---|---|
| DarkEffekt.Terminal.UI.Element | element |
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 |