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
orientationOrientation
Properties
AccessibilityActions
public override AccessibilityActions AccessibilityActions { get; }
Property Value
AccessibilityRole
public override AccessibilityRole AccessibilityRole { get; }
Property Value
CustomStep
public float CustomStep { get; set; }
Property Value
DragNodeEnabled
public bool DragNodeEnabled { get; set; }
Property Value
DragNodeSpeed
public Vector2 DragNodeSpeed { get; }
Property Value
- Vector2
IsDecrementHighlighted
public bool IsDecrementHighlighted { get; }
Property Value
IsDragNodeDecelerating
public bool IsDragNodeDecelerating { get; }
Property Value
IsDragNodeTouching
public bool IsDragNodeTouching { get; }
Property Value
IsDraggingGrabber
public bool IsDraggingGrabber { get; }
Property Value
IsIncrementHighlighted
public bool IsIncrementHighlighted { get; }
Property Value
IsRangeHighlighted
public bool IsRangeHighlighted { get; }
Property Value
IsSmoothScrolling
public bool IsSmoothScrolling { get; }
Property Value
Orientation
public Orientation Orientation { get; }
Property Value
ShowStepButtons
Shows the decrement and increment buttons. Hiding them reclaims their track space.
public bool ShowStepButtons { get; set; }
Property Value
SmoothScrollEnabled
public bool SmoothScrollEnabled { get; set; }
Property Value
TargetScroll
public float TargetScroll { get; }
Property Value
Methods
BeginDragNodeScroll(bool)
public void BeginDragNodeScroll(bool touchscreenAvailable = true)
Parameters
touchscreenAvailablebool
DragNodeScrollBy(Vector2)
public void DragNodeScrollBy(Vector2 relativeMotion)
Parameters
relativeMotionVector2
EndDragNodeScroll()
public void EndDragNodeScroll()
GetCustomStep()
public float GetCustomStep()
Returns
GetDecrementButtonRectangle()
public Rectangle GetDecrementButtonRectangle()
Returns
- Rectangle
GetDragNode()
public string GetDragNode()
Returns
GetGrabberRectangle()
public Rectangle GetGrabberRectangle()
Returns
- Rectangle
GetIncrementButtonRectangle()
public Rectangle GetIncrementButtonRectangle()
Returns
- Rectangle
GetMinimumSize()
public override Vector2 GetMinimumSize()
Returns
- Vector2
IsDragNodeEnabled()
public bool IsDragNodeEnabled()
Returns
IsShowingStepButtons()
Gets whether the scrollbar shows decrement and increment buttons.
public bool IsShowingStepButtons()
Returns
IsSmoothScrollEnabled()
public bool IsSmoothScrollEnabled()
Returns
OnContextChanged(UIContext, UIContext)
Called when this control enters, exits, or moves between retained UI contexts.
protected override void OnContextChanged(UIContext previous, UIContext current)
Parameters
PointerMoved(Point)
The pointer moved over this control, in global coordinates.
protected override void PointerMoved(Point point)
Parameters
pointPoint
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
pointPoint
PointerReleased(Point, bool)
The pointer was released, with whether it was still inside this control.
protected override void PointerReleased(Point point, bool isInside)
Parameters
pointPointisInsidebool
SetCustomStep(float)
public void SetCustomStep(float customStep)
Parameters
customStepfloat
SetDragNode(string)
public void SetDragNode(string path)
Parameters
pathstring
SetDragNodeEnabled(bool)
public void SetDragNodeEnabled(bool enabled)
Parameters
enabledbool
SetShowStepButtons(bool)
Shows or hides the scrollbar's decrement and increment buttons.
public void SetShowStepButtons(bool visible)
Parameters
visiblebool
SetSmoothScrollEnabled(bool)
public void SetSmoothScrollEnabled(bool enabled)
Parameters
enabledbool
Events
Scrolling
Raised when user-driven scrolling changes the effective value, matching Godot's scrolling signal.
public event EventHandler Scrolling