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
orientationOrientation
Properties
AccessibilityRole
public override AccessibilityRole AccessibilityRole { get; }
Property Value
CustomStep
Godot-style keyboard/gamepad increment override; negative values fall back to Step.
public float CustomStep { get; set; }
Property Value
Editable
public bool Editable { get; set; }
Property Value
Orientation
public Orientation Orientation { get; }
Property Value
Scrollable
Enables mouse-wheel adjustment, matching Godot's Slider.scrollable property.
public bool Scrollable { get; set; }
Property Value
TickCount
Number of evenly-spaced visual ticks; values below two draw no ticks.
public int TickCount { get; set; }
Property Value
TicksOnBorders
public bool TicksOnBorders { get; set; }
Property Value
TicksPosition
public SliderTickPosition TicksPosition { get; set; }
Property Value
Methods
GetCustomStep()
public float GetCustomStep()
Returns
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
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
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
DragStarted
Raised when a pointer drag begins, matching Godot's Slider.drag_started signal.
public event EventHandler DragStarted