Class LineScrollTextBufferScrolledEvent
Event published by a LineScrollTextBuffer whenever its view offset changes, indicating that the set of visible lines has shifted up or down. Subscribe to this event to refresh a display component when the buffer scrolls.
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
public sealed class LineScrollTextBufferScrolledEvent : ScyllaEvent
Constructors
LineScrollTextBufferScrolledEvent(LineScrollTextBuffer, ScrollDirection, int, int)
Initializes a new LineScrollTextBufferScrolledEvent recording the buffer, scroll direction, and the line offsets before and after the operation.
Declaration
public LineScrollTextBufferScrolledEvent(LineScrollTextBuffer buffer, ScrollDirection direction, int previousOffset, int newOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| LineScrollTextBuffer | buffer | The LineScrollTextBuffer that was scrolled. |
| ScrollDirection | direction | The direction in which the view moved. |
| int | previousOffset | The line-based view offset before the scroll. |
| int | newOffset | The line-based view offset after the scroll. |
Properties
Buffer
Gets the LineScrollTextBuffer that was scrolled.
Declaration
public LineScrollTextBuffer Buffer { get; }
Property Value
| Type | Description |
|---|---|
| LineScrollTextBuffer |
Direction
Gets the direction in which the view window moved.
Declaration
public ScrollDirection Direction { get; }
Property Value
| Type | Description |
|---|---|
| ScrollDirection |
IsAtBottom
Gets whether Buffer is now showing its newest content with no
further down-scroll possible. Returns false when Buffer
is null.
Declaration
public bool IsAtBottom { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsAtTop
Gets whether Buffer is now showing its oldest content with no
further up-scroll possible. Returns false when Buffer
is null.
Declaration
public bool IsAtTop { get; }
Property Value
| Type | Description |
|---|---|
| bool |
NewOffset
Gets the line-based view offset immediately after this scroll operation.
A value of 0 represents the bottom (newest) content.
Declaration
public int NewOffset { get; }
Property Value
| Type | Description |
|---|---|
| int |
PreviousOffset
Gets the line-based view offset immediately before this scroll operation.
A value of 0 represents the bottom (newest) content.
Declaration
public int PreviousOffset { get; }
Property Value
| Type | Description |
|---|---|
| int |