Search Results for

    Show / Hide Table of Contents

    Class Slider

    The slider control.

    Inheritance
    System.Object
    Control
    ContainerControl
    Slider
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    ContainerControl.RemoveChildren()
    ContainerControl.DisposeChildren()
    ContainerControl.AddChild<T>()
    ContainerControl.AddChild<T>(T)
    ContainerControl.RemoveChild(Control)
    ContainerControl.GetChild(Int32)
    ContainerControl.GetChild<T>()
    ContainerControl.GetChildIndex(Control)
    ContainerControl.GetChildIndexAt(Float2)
    ContainerControl.GetChildAt(Float2)
    ContainerControl.GetChildAt(Float2, Func<Control, Boolean>)
    ContainerControl.GetChildAtRecursive(Float2)
    ContainerControl.GetClientArea()
    ContainerControl.SortChildren()
    ContainerControl.SortChildrenRecursive()
    ContainerControl.OnChildResized(Control)
    ContainerControl.OnChildrenChanged()
    ContainerControl.GetDesireClientArea(Rectangle)
    ContainerControl.IntersectsChildContent(Control, Float2, Float2)
    ContainerControl.OnNavigate(NavDirection, Float2, Control, List<Control>)
    ContainerControl.CanNavigateChild(Control)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.PerformLayoutBeforeChildren()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.OnDestroy()
    ContainerControl.Update(Single)
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.DrawChildren()
    ContainerControl.ContainsPoint(Float2, Boolean)
    ContainerControl.PerformLayout(Boolean)
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseLeave()
    ContainerControl.OnMouseWheel(Float2, Single)
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)
    ContainerControl.IsTouchPointerOver(Int32)
    ContainerControl.OnTouchEnter(Float2, Int32)
    ContainerControl.OnTouchDown(Float2, Int32)
    ContainerControl.OnTouchMove(Float2, Int32)
    ContainerControl.OnTouchUp(Float2, Int32)
    ContainerControl.OnTouchLeave(Int32)
    ContainerControl.OnCharInput(Char)
    ContainerControl.OnKeyDown(KeyboardKeys)
    ContainerControl.OnKeyUp(KeyboardKeys)
    ContainerControl.OnDragEnter(Float2, DragData)
    ContainerControl.OnDragMove(Float2, DragData)
    ContainerControl.OnDragLeave()
    ContainerControl.OnDragDrop(Float2, DragData)
    ContainerControl.Children
    ContainerControl.ChildrenCount
    ContainerControl.HasChildren
    ContainerControl.ContainsFocus
    ContainerControl.ClipChildren
    ContainerControl.CullChildren
    ContainerControl.IsTouchOver
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Focus()
    Control.Defocus()
    Control.OnGotFocus()
    Control.OnStartContainsFocus()
    Control.OnEndContainsFocus()
    Control.Focus(Control)
    Control.StartMouseCapture(Boolean)
    Control.EndMouseCapture()
    Control.GetNavTarget(NavDirection)
    Control.GetNavOrigin(NavDirection)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnTouchLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    Control.IntersectsContent(Float2, Float2)
    Control.PointToParent(ContainerControl, Float2)
    Control.PointToParent(Float2)
    Control.PointToParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(ContainerControl, Float2)
    Control.PointToWindow(Float2)
    Control.PointFromWindow(Float2)
    Control.PointToScreen(Float2)
    Control.PointFromScreen(Float2)
    Control.OnLocationChanged()
    Control.SetScaleInternal(Float2)
    Control.SetPivotInternal(Float2)
    Control.SetShearInternal(Float2)
    Control.SetRotationInternal(Single)
    Control.OnVisibleChanged()
    Control.OnParentChangedInternal()
    Control.AddUpdateCallbacks(RootControl)
    Control.RemoveUpdateCallbacks(RootControl)
    Control.SetUpdate(Control.UpdateDelegate, Control.UpdateDelegate)
    Control.OnParentResized()
    Control.CompareTo(Object)
    Control.Compare(Control)
    Control.Top
    Control.Bottom
    Control.Left
    Control.Right
    Control.UpperLeft
    Control.UpperRight
    Control.BottomRight
    Control.BottomLeft
    Control.Scale
    Control.Pivot
    Control.Shear
    Control.Rotation
    Control.HasParent
    Control.BackgroundColor
    Control.BackgroundBrush
    Control.Enabled
    Control.EnabledInHierarchy
    Control.Visible
    Control.VisibleInHierarchy
    Control.IsDisposing
    Control.Root
    Control.RootWindow
    Control.DpiScale
    Control.ScreenPos
    Control.AutoFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsDragOver
    Control.Tooltip
    Control.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEngine.GUI
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [ActorToolbox("GUI")]
    public class Slider : ContainerControl, IComparable, IDrawable

    Constructors

    Slider()

    Initializes a new instance of the Slider class.

    Declaration
    public Slider()

    Slider(Single, Single)

    Initializes a new instance of the Slider class.

    Declaration
    public Slider(float width, float height)
    Parameters
    System.Single width

    The width.

    System.Single height

    The height.

    Fields

    _maximum

    The maximum value.

    Declaration
    protected float _maximum
    Field Value
    System.Single

    _minimum

    The minimum value.

    Declaration
    protected float _minimum
    Field Value
    System.Single

    FillTrack

    Whether to fill the track.

    Declaration
    [EditorOrder(42)]
    [Tooltip("Fill the track.")]
    public bool FillTrack
    Field Value
    System.Boolean

    WholeNumbers

    Whether to use whole numbers.

    Declaration
    [EditorOrder(43)]
    [Tooltip("Use whole numbers.")]
    public bool WholeNumbers
    Field Value
    System.Boolean

    Properties

    Direction

    Gets or sets the slider direction.

    Declaration
    [EditorOrder(40)]
    [Tooltip("Slider Direction.")]
    public Slider.SliderDirection Direction { get; set; }
    Property Value
    Slider.SliderDirection

    FillTrackBrush

    Gets or sets the brush used for slider fill track drawing.

    Declaration
    [EditorDisplay("Track Style", null)]
    [EditorOrder(2013)]
    [VisibleIf("FillTrack", false)]
    [Tooltip("The brush used for slider fill track drawing.")]
    public IBrush FillTrackBrush { get; set; }
    Property Value
    IBrush

    Maximum

    Gets or sets the maximum value.

    Declaration
    [EditorOrder(30)]
    [Tooltip("The maximum value.")]
    public float Maximum { get; set; }
    Property Value
    System.Single

    Minimum

    Gets or sets the minimum value.

    Declaration
    [EditorOrder(20)]
    [Tooltip("The minimum value.")]
    public float Minimum { get; set; }
    Property Value
    System.Single

    ThumbBrush

    Gets or sets the brush used for slider thumb drawing.

    Declaration
    [EditorDisplay("Thumb Style", null)]
    [EditorOrder(2033)]
    [Tooltip("The brush of the slider thumb.")]
    public IBrush ThumbBrush { get; set; }
    Property Value
    IBrush

    ThumbColor

    The color of the slider thumb when it's not selected.

    Declaration
    [EditorDisplay("Thumb Style", null)]
    [EditorOrder(2030)]
    [Tooltip("The color of the slider thumb when it's not selected.")]
    [ExpandGroups]
    public Color ThumbColor { get; set; }
    Property Value
    Color

    ThumbColorHighlighted

    The color of the slider thumb when it's highlighted.

    Declaration
    [EditorDisplay("Thumb Style", null)]
    [EditorOrder(2031)]
    [Tooltip("The color of the slider thumb when it's highlighted.")]
    public Color ThumbColorHighlighted { get; set; }
    Property Value
    Color

    ThumbColorSelected

    The color of the slider thumb when it's selected.

    Declaration
    [EditorDisplay("Thumb Style", null)]
    [EditorOrder(2032)]
    [Tooltip("The color of the slider thumb when it's selected.")]
    public Color ThumbColorSelected { get; set; }
    Property Value
    Color

    ThumbSize

    The thumb size.

    Declaration
    [EditorOrder(41)]
    [Tooltip("The size of the thumb.")]
    public Float2 ThumbSize { get; set; }
    Property Value
    Float2

    TrackBrush

    Gets or sets the brush used for slider track drawing.

    Declaration
    [EditorDisplay("Track Style", null)]
    [EditorOrder(2012)]
    [Tooltip("The brush used for slider track drawing.")]
    public IBrush TrackBrush { get; set; }
    Property Value
    IBrush

    TrackFillLineColor

    The color of the slider fill track line

    Declaration
    [EditorDisplay("Track Style", null)]
    [EditorOrder(2011)]
    [VisibleIf("FillTrack", false)]
    [Tooltip("The color of the slider fill track line.")]
    public Color TrackFillLineColor { get; set; }
    Property Value
    Color

    TrackLineColor

    The color of the slider track line

    Declaration
    [EditorDisplay("Track Style", null)]
    [EditorOrder(2010)]
    [Tooltip("The color of the slider track line.")]
    [ExpandGroups]
    public Color TrackLineColor { get; set; }
    Property Value
    Color

    TrackThickness

    The height of the track.

    Declaration
    [EditorOrder(40)]
    [Tooltip("The track height.")]
    public int TrackThickness { get; set; }
    Property Value
    System.Int32

    Value

    Gets or sets the value (normalized to range 0-100).

    Declaration
    [EditorOrder(10)]
    [Tooltip("The current value.")]
    public float Value { get; set; }
    Property Value
    System.Single

    Methods

    Draw()

    Draw the control and the children.

    Declaration
    public override void Draw()
    Overrides
    ContainerControl.Draw()

    OnEndMouseCapture()

    When mouse goes up/down not over the control but it has user focus so remove that focus from it (used by scroll bars, sliders etc.)

    Declaration
    public override void OnEndMouseCapture()
    Overrides
    Control.OnEndMouseCapture()

    OnLostFocus()

    When control losts input focus

    Declaration
    public override void OnLostFocus()
    Overrides
    Control.OnLostFocus()

    OnMouseDown(Float2, MouseButton)

    When mouse goes down over control's area

    Declaration
    public override bool OnMouseDown(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseDown(Float2, MouseButton)

    OnMouseMove(Float2)

    When mouse moves over control's area

    Declaration
    public override void OnMouseMove(Float2 location)
    Parameters
    Float2 location

    Mouse location in Control Space

    Overrides
    ContainerControl.OnMouseMove(Float2)

    OnMouseUp(Float2, MouseButton)

    When mouse goes up over control's area

    Declaration
    public override bool OnMouseUp(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseUp(Float2, MouseButton)

    OnSizeChanged()

    Called when control size gets changed.

    Declaration
    protected override void OnSizeChanged()
    Overrides
    ContainerControl.OnSizeChanged()

    Events

    SlidingEnd

    Occurs when sliding ends.

    Declaration
    public event Action SlidingEnd
    Event Type
    System.Action

    SlidingStart

    Occurs when sliding starts.

    Declaration
    public event Action SlidingStart
    Event Type
    System.Action

    ValueChanged

    Occurs when value gets changed.

    Declaration
    public event Action ValueChanged
    Event Type
    System.Action

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat