Skip to main content

Class InspectorTypeField

Namespace: Aspid.FastTools.Types.Editors
Assembly: Aspid.FastTools.Editor.dll

TypeField pre-styled as an Inspector property row, so its label aligns with sibling fields.

[UxmlElement]
public sealed class InspectorTypeField : TypeField, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Type>

Inheritance​

object ← CallbackEventHandler ← Focusable ← VisualElement ← BindableElement ← AbstractBaseField ← BaseField<Type> ← TypeField ← InspectorTypeField

Implements​

IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Type>

Extension Methods​

VisualElementExtensions.AddAspidWindowTheme<InspectorTypeField>(InspectorTypeField), VisualElementExtensions.AddOpenScriptCommand<InspectorTypeField>(InspectorTypeField, Object), INotifyValueChangedExtensions.AddValueChanged<InspectorTypeField, TValue>(InspectorTypeField, EventCallback<ChangeEvent<TValue>>), IBindableExtensions.BindPropertyTo<InspectorTypeField>(InspectorTypeField, SerializedProperty), IBindableExtensions.BindTo<InspectorTypeField>(InspectorTypeField, SerializedObject, string), VisualElementExtensions.BindTo<InspectorTypeField>(InspectorTypeField, SerializedObject), VisualElementExtensions.GetOwnerWindow(VisualElement), ProfilerMarkerExtensionsForGenerator.Marker<InspectorTypeField>(InspectorTypeField, int), INotifyValueChangedExtensions.RemoveValueChanged<InspectorTypeField, TValue>(InspectorTypeField, EventCallback<ChangeEvent<TValue>>), IBindableExtensions.SetBindingPath<InspectorTypeField>(InspectorTypeField, string), BaseFieldExtensions.SetLabel<InspectorTypeField, TValue>(InspectorTypeField, string), INotifyValueChangedExtensions.SetValue<InspectorTypeField, TValue>(InspectorTypeField, TValue, bool), VisualElementExtensions.UnbindFrom<InspectorTypeField>(InspectorTypeField)

Constructors​

InspectorTypeField()​

Creates an unbound field with Inspector label alignment.

public InspectorTypeField()

InspectorTypeField(SerializedProperty)​

Creates an Inspector-aligned field labeled with the bound property's display name.

public InspectorTypeField(SerializedProperty property)

Parameters​

property SerializedProperty

The string property storing the assembly-qualified type name.

Exceptions​

ArgumentNullException

property is null.

ArgumentException

property is not a string property, or its path no longer exists on its targets.

InspectorTypeField(string, SerializedProperty)​

Creates an Inspector-aligned field bound to a type-name property.

public InspectorTypeField(string label, SerializedProperty property)

Parameters​

label string

The field label, or null for no label.

property SerializedProperty

The string property storing the assembly-qualified type name.

Remarks​

Before ChangeEvent<T> is sent, a pick writes the property and calls Update on the SerializedObject of property: a change handler reads the picked name from property, and edits it applies through that object keep the pick. Changes not yet applied to that object are lost.

Exceptions​

ArgumentNullException

property is null.

ArgumentException

property is not a string property, or its path no longer exists on its targets.

InspectorTypeField(string)​

Creates an unbound Inspector-aligned field without an initial type.

public InspectorTypeField(string label)

Parameters​

label string

The field label, or null for no label.

InspectorTypeField(string, Type)​

Creates an unbound Inspector-aligned field with an initial type.

public InspectorTypeField(string label, Type defaultValue)

Parameters​

label string

The field label, or null for no label.

defaultValue Type

The initial type, or null for an empty selection.