Class ScrollBar

Namespace
Forma
Assembly
Forma.dll

Scrolls a numeric range through step buttons, page regions, thumb dragging, or inertial drag-node input.

public class ScrollBar : Range, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
Inheritance
ScrollBar
Implements
Derived
Inherited Members

Constructors

ScrollBar(Orientation)

public ScrollBar(Orientation orientation)

Parameters

orientation Orientation

Properties

AccessibilityActions

public override AccessibilityActions AccessibilityActions { get; }

Property Value

AccessibilityActions

AccessibilityRole

public override AccessibilityRole AccessibilityRole { get; }

Property Value

AccessibilityRole

CustomStep

public float CustomStep { get; set; }

Property Value

float

DragNodeEnabled

public bool DragNodeEnabled { get; set; }

Property Value

bool

DragNodeSpeed

public Vector2 DragNodeSpeed { get; }

Property Value

Vector2

IsDecrementHighlighted

public bool IsDecrementHighlighted { get; }

Property Value

bool

IsDragNodeDecelerating

public bool IsDragNodeDecelerating { get; }

Property Value

bool

IsDragNodeTouching

public bool IsDragNodeTouching { get; }

Property Value

bool

IsDraggingGrabber

public bool IsDraggingGrabber { get; }

Property Value

bool

IsIncrementHighlighted

public bool IsIncrementHighlighted { get; }

Property Value

bool

IsRangeHighlighted

public bool IsRangeHighlighted { get; }

Property Value

bool

IsSmoothScrolling

public bool IsSmoothScrolling { get; }

Property Value

bool

Orientation

public Orientation Orientation { get; }

Property Value

Orientation

ShowStepButtons

Shows the decrement and increment buttons. Hiding them reclaims their track space.

public bool ShowStepButtons { get; set; }

Property Value

bool

SmoothScrollEnabled

public bool SmoothScrollEnabled { get; set; }

Property Value

bool

TargetScroll

public float TargetScroll { get; }

Property Value

float

Methods

BeginDragNodeScroll(bool)

public void BeginDragNodeScroll(bool touchscreenAvailable = true)

Parameters

touchscreenAvailable bool

DragNodeScrollBy(Vector2)

public void DragNodeScrollBy(Vector2 relativeMotion)

Parameters

relativeMotion Vector2

EndDragNodeScroll()

public void EndDragNodeScroll()

GetCustomStep()

public float GetCustomStep()

Returns

float

GetDecrementButtonRectangle()

public Rectangle GetDecrementButtonRectangle()

Returns

Rectangle

GetDragNode()

public string GetDragNode()

Returns

string

GetGrabberRectangle()

public Rectangle GetGrabberRectangle()

Returns

Rectangle

GetIncrementButtonRectangle()

public Rectangle GetIncrementButtonRectangle()

Returns

Rectangle

GetMinimumSize()

public override Vector2 GetMinimumSize()

Returns

Vector2

IsDragNodeEnabled()

public bool IsDragNodeEnabled()

Returns

bool

IsShowingStepButtons()

Gets whether the scrollbar shows decrement and increment buttons.

public bool IsShowingStepButtons()

Returns

bool

IsSmoothScrollEnabled()

public bool IsSmoothScrollEnabled()

Returns

bool

OnContextChanged(UIContext, UIContext)

Called when this control enters, exits, or moves between retained UI contexts.

protected override void OnContextChanged(UIContext previous, UIContext current)

Parameters

previous UIContext
current UIContext

PointerMoved(Point)

The pointer moved over this control, in global coordinates.

protected override void PointerMoved(Point point)

Parameters

point Point

PointerPressed(Point)

A pointer press landed on this control, in global coordinates.

Protected as well as internal so a control defined outside this assembly can take part in pointer input. Without that, an app hosting its own drawing surface has to read raw mouse state instead, which bypasses hit-testing, modal gating and the injection side-channel — so such a surface cannot be driven by a test at all.

protected override void PointerPressed(Point point)

Parameters

point Point

PointerReleased(Point, bool)

The pointer was released, with whether it was still inside this control.

protected override void PointerReleased(Point point, bool isInside)

Parameters

point Point
isInside bool

SetCustomStep(float)

public void SetCustomStep(float customStep)

Parameters

customStep float

SetDragNode(string)

public void SetDragNode(string path)

Parameters

path string

SetDragNodeEnabled(bool)

public void SetDragNodeEnabled(bool enabled)

Parameters

enabled bool

SetShowStepButtons(bool)

Shows or hides the scrollbar's decrement and increment buttons.

public void SetShowStepButtons(bool visible)

Parameters

visible bool

SetSmoothScrollEnabled(bool)

public void SetSmoothScrollEnabled(bool enabled)

Parameters

enabled bool

Events

Scrolling

Raised when user-driven scrolling changes the effective value, matching Godot's scrolling signal.

public event EventHandler Scrolling

Event Type

EventHandler