Class Slider

Namespace
Forma
Assembly
Forma.dll

Adjusts a numeric range by dragging a thumb or using the keyboard or mouse wheel.

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

Constructors

Slider(Orientation)

public Slider(Orientation orientation = Orientation.Horizontal)

Parameters

orientation Orientation

Properties

AccessibilityRole

public override AccessibilityRole AccessibilityRole { get; }

Property Value

AccessibilityRole

CustomStep

Godot-style keyboard/gamepad increment override; negative values fall back to Step.

public float CustomStep { get; set; }

Property Value

float

Editable

public bool Editable { get; set; }

Property Value

bool

Orientation

public Orientation Orientation { get; }

Property Value

Orientation

Scrollable

Enables mouse-wheel adjustment, matching Godot's Slider.scrollable property.

public bool Scrollable { get; set; }

Property Value

bool

TickCount

Number of evenly-spaced visual ticks; values below two draw no ticks.

public int TickCount { get; set; }

Property Value

int

TicksOnBorders

public bool TicksOnBorders { get; set; }

Property Value

bool

TicksPosition

public SliderTickPosition TicksPosition { get; set; }

Property Value

SliderTickPosition

Methods

GetCustomStep()

public float GetCustomStep()

Returns

float

GetMinimumSize()

public override Vector2 GetMinimumSize()

Returns

Vector2

GetTickRectangles()

Returns local tick rectangles for deterministic theme-independent validation.

public IReadOnlyList<Rectangle> GetTickRectangles()

Returns

IReadOnlyList<Rectangle>

PointerMoved(Point)

Tracks the pointer while held, matching Godot's Slider::gui_input relative-motion grab (grab.pos/grab.uvalue).

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

Events

DragEnded

Raised when a pointer drag ends; the argument reports whether the ratio actually changed, matching Godot's Slider.drag_ended(value_changed) signal.

public event Action<Slider, bool> DragEnded

Event Type

Action<Slider, bool>

DragStarted

Raised when a pointer drag begins, matching Godot's Slider.drag_started signal.

public event EventHandler DragStarted

Event Type

EventHandler