Class LongField
A NumericalField<TValueType> that only accepts long values.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class LongField : NumericalField<long>, IEventHandler, IVisualElementScheduler, IExperimentalFeatures, ITransitionAnimations, ITransform, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IInputElement<long>, IValidatableElement<long>, ISizeableElement, INotifyValueChanging<long>, INotifyValueChanged<long>
Constructors
LongField()
Default constructor.
Declaration
public LongField()
Methods
AreEqual(long, long)
Check if two values of type TValueType are equal.
Declaration
protected override bool AreEqual(long a, long b)
Parameters
Type | Name | Description |
---|---|---|
long | a | The first value to test. |
long | b | The second value to test. |
Returns
Type | Description |
---|---|
bool | True if both values are considered equals, false otherwise. |
Overrides
GetIncrementFactor(long)
Calculate the increment factor based on a base value.
Declaration
protected override float GetIncrementFactor(long baseValue)
Parameters
Type | Name | Description |
---|---|---|
long | baseValue | The base value. |
Returns
Type | Description |
---|---|
float | The increment factor. |
Overrides
Increment(long, float)
Increment a given value with a given delta.
Declaration
protected override long Increment(long originalValue, float delta)
Parameters
Type | Name | Description |
---|---|---|
long | originalValue | The original value. |
float | delta | The delta used for increment. |
Returns
Type | Description |
---|---|
long | The incremented value. |
Overrides
Max(long, long)
Return the biggest value between a and b.
Declaration
protected override long Max(long a, long b)
Parameters
Type | Name | Description |
---|---|---|
long | a | The first value to test. |
long | b | The second value to test. |
Returns
Type | Description |
---|---|
long | The biggest value. |
Overrides
Min(long, long)
Return the smallest value between a and b.
Declaration
protected override long Min(long a, long b)
Parameters
Type | Name | Description |
---|---|---|
long | a | The first value to test. |
long | b | The second value to test. |
Returns
Type | Description |
---|---|
long | The smallest value. |
Overrides
ParseRawValueToString(long)
Define the conversion from a TValueType value to a string value.
Declaration
protected override string ParseRawValueToString(long val)
Parameters
Type | Name | Description |
---|---|---|
long | val | The TValueType value to convert. |
Returns
Type | Description |
---|---|
string | The converted value. |
Overrides
Remarks
This method is used to convert the value to a string without any formatting.
ParseStringToValue(string, out long)
Define the conversion from the string value to a TValueType value.
Declaration
protected override bool ParseStringToValue(string strValue, out long val)
Parameters
Type | Name | Description |
---|---|---|
string | strValue | The string value to convert. |
long | val | The TValueType value returned. |
Returns
Type | Description |
---|---|
bool | True if the conversion is possible, False otherwise. |
Overrides
ParseValueToString(long)
Define the conversion from a TValueType value to a string value.
Declaration
protected override string ParseValueToString(long val)
Parameters
Type | Name | Description |
---|---|---|
long | val | The TValueType value to convert. |
Returns
Type | Description |
---|---|
string | The converted value. |