Class SearchFieldBase<TextInputType, T>
The base class for a search field.
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public abstract class SearchFieldBase<TextInputType, T> : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, INotifyValueChanged<T> where TextInputType : TextInputBaseField<T>, new()
Type Parameters
Name | Description |
---|---|
TextInputType | |
T |
Constructors
SearchFieldBase()
Declaration
protected SearchFieldBase()
Fields
cancelButtonOffVariantUssClassName
USS class name of cancel buttons in elements of this type, when they are off.
Declaration
public static readonly string cancelButtonOffVariantUssClassName
Field Value
Type | Description |
---|---|
String |
cancelButtonUssClassName
USS class name of cancel buttons in elements of this type.
Declaration
public static readonly string cancelButtonUssClassName
Field Value
Type | Description |
---|---|
String |
popupVariantUssClassName
USS class name of elements of this type, when they are using a popup menu.
Declaration
public static readonly string popupVariantUssClassName
Field Value
Type | Description |
---|---|
String |
searchButtonUssClassName
USS class name of search buttons in elements of this type.
Declaration
public static readonly string searchButtonUssClassName
Field Value
Type | Description |
---|---|
String |
textInputUssClassName
USS class name of text input elements in elements of this type.
Declaration
public static readonly string textInputUssClassName
Field Value
Type | Description |
---|---|
String |
textUssClassName
USS class name of text elements in elements of this type.
Declaration
public static readonly string textUssClassName
Field Value
Type | Description |
---|---|
String |
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Properties
searchButton
The search button.
Declaration
protected Button searchButton { get; }
Property Value
Type | Description |
---|---|
Button |
textInputField
The text field used by the search field to draw and modify the search string.
Declaration
protected TextInputType textInputField { get; }
Property Value
Type | Description |
---|---|
TextInputType |
value
The object currently being exposed by the field.
Declaration
public T value { get; set; }
Property Value
Type | Description |
---|---|
T |
Implements
Remarks
If the new value is different from the current value, this method notifies registered callbacks with a ChangeEvent<T>.
Methods
ClearTextField()
Method used when clearing the text field. You should usually clear the value when overriding the method.
Declaration
protected abstract void ClearTextField()
FieldIsEmpty(T)
Tells if the field is empty. That meaning depends on the type of T.
Declaration
protected abstract bool FieldIsEmpty(T fieldValue)
Parameters
Type | Name | Description |
---|---|---|
T | fieldValue | The value to check. |
Returns
Type | Description |
---|---|
Boolean | True if the parameter is empty. That meaning depends on the type of T. |
SetValueWithoutNotify(T)
Sets the value for the toolbar search field without sending a change event.
Declaration
public virtual void SetValueWithoutNotify(T newValue)
Parameters
Type | Name | Description |
---|---|---|
T | newValue |