Class SliderBase<TValueType>
Base class for Sliders (SliderFloat, SliderInt).
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public abstract class SliderBase<TValueType> : BaseSlider<TValueType, TValueType>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<TValueType>, IValidatableElement<TValueType>, INotifyValueChanging<TValueType>, INotifyValueChanged<TValueType> where TValueType : struct, IEquatable<TValueType>, IComparable
Type Parameters
| Name | Description |
|---|---|
| TValueType | A comparable value type. |
Constructors
SliderBase()
Default constructor.
Declaration
protected SliderBase()
Fields
controlContainerUssClassName
The Slider control container styling class.
Declaration
public static readonly string controlContainerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
controlsUssClassName
The Slider controls styling class.
Declaration
public static readonly string controlsUssClassName
Field Value
| Type | Description |
|---|---|
| string |
handleContainerUssClassName
The Slider handle container styling class.
Declaration
public static readonly string handleContainerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
handleUssClassName
The Slider handle styling class.
Declaration
public static readonly string handleUssClassName
Field Value
| Type | Description |
|---|---|
| string |
inlineValueLabelUssClassName
The Slider inline value label styling class.
Declaration
public static readonly string inlineValueLabelUssClassName
Field Value
| Type | Description |
|---|---|
| string |
inlineValueUssClassName
The Slider inline value styling class.
Declaration
public static readonly string inlineValueUssClassName
Field Value
| Type | Description |
|---|---|
| string |
interactiveAreaUssClassName
The Slider progress container styling class.
Declaration
public static readonly string interactiveAreaUssClassName
Field Value
| Type | Description |
|---|---|
| string |
labelContainerUssClassName
The Slider label container styling class.
Declaration
public static readonly string labelContainerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
labelUssClassName
The Slider label styling class.
Declaration
public static readonly string labelUssClassName
Field Value
| Type | Description |
|---|---|
| string |
noLabelUssClassName
The Slider no label variant styling class.
Declaration
public static readonly string noLabelUssClassName
Field Value
| Type | Description |
|---|---|
| string |
paddedContainerUssClassName
The Slider padded container styling class.
Declaration
public static readonly string paddedContainerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
progressUssClassName
The Slider progress styling class.
Declaration
public static readonly string progressUssClassName
Field Value
| Type | Description |
|---|---|
| string |
sizeUssClassName
The Slider size styling class.
Declaration
public static readonly string sizeUssClassName
Field Value
| Type | Description |
|---|---|
| string |
tickLabelUssClassName
The Slider tick label styling class.
Declaration
public static readonly string tickLabelUssClassName
Field Value
| Type | Description |
|---|---|
| string |
tickLabelVariantUssClassName
The Slider with tick labels variant styling class.
Declaration
public static readonly string tickLabelVariantUssClassName
Field Value
| Type | Description |
|---|---|
| string |
tickUssClassName
The Slider tick styling class.
Declaration
public static readonly string tickUssClassName
Field Value
| Type | Description |
|---|---|
| string |
ticksUssClassName
The Slider ticks container styling class.
Declaration
public static readonly string ticksUssClassName
Field Value
| Type | Description |
|---|---|
| string |
trackUssClassName
The Slider track styling class.
Declaration
public static readonly string trackUssClassName
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The Slider main styling class.
Declaration
public static readonly string ussClassName
Field Value
| Type | Description |
|---|---|
| string |
valueLabelUssClassName
The Slider value label styling class.
Declaration
public static readonly string valueLabelUssClassName
Field Value
| Type | Description |
|---|---|
| string |
Properties
fillOffset
Should be normalized.
Declaration
public float fillOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
filled
If the slider progress is filled.
Declaration
public bool filled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
inlineValue
The inline mode for the slider value element.
Declaration
public InlineValue inlineValue { get; set; }
Property Value
| Type | Description |
|---|---|
| InlineValue |
label
Text which will be used for the Slider label.
Declaration
public string label { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
size
The size of the slider.
Declaration
public Size size { get; set; }
Property Value
| Type | Description |
|---|---|
| Size |
tickCount
The number of ticks to display on the slider.
Declaration
public int tickCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
tickLabel
Should the tick labels be displayed.
Declaration
public bool tickLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Clamp(TValueType, TValueType, TValueType)
Utility method to clamp a TValueType value between specified bounds.
Declaration
protected override TValueType Clamp(TValueType v, TValueType lowBound, TValueType highBound)
Parameters
| Type | Name | Description |
|---|---|---|
| TValueType | v | The value to clamp. |
| TValueType | lowBound | Minimum |
| TValueType | highBound | Maximum |
Returns
| Type | Description |
|---|---|
| TValueType | The clamped value. |
Overrides
GetSliderRect()
Returns the rect of the interactive part of the slider.
Declaration
protected override Rect GetSliderRect()
Returns
| Type | Description |
|---|---|
| Rect | The rect of the interactive part of the slider. |
Overrides
OnSliderRangeChanged()
Called when the low or high value of Slider has changed.
Declaration
protected override void OnSliderRangeChanged()
Overrides
SetValueWithoutNotify(TValueType)
Set the value of the slider without notifying the change.
Declaration
public override void SetValueWithoutNotify(TValueType newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| TValueType | newValue | The new value of the slider. |