Vixen
02b45cc4
csharp
public abstract class InspectorMember

What an inspector needs to draw a row, without knowing what type the row holds.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Everything here was decided by a generator reading the source, so a member's attributes are facts about the build rather than a reflection pass over whatever assemblies happened to load. That is the same bet Vixen.Core.Reflection makes; what this adds is the inspector's own vocabulary — headings, conditions, asset pickers, curves — which do not belong in a serialisation-facing descriptor.

The boxed accessors below are the un-generic path, taken by the search box, the copy-property command and any drawer that does not care what it is editing. InspectorMember`2 is the typed one.

It is an IEditMember, which is how the editing pipeline reaches it. That contract is five of the members below and nothing else — the headings, the ranges and the conditions are the inspector's business and stay here. The three implementations are explicit because this type already names each of them something better suited to a descriptor than to a pipeline.

Fields and properties (19)

  • public string Name

    The member's name in source, which is what a condition names it by.

  • public string DisplayName

    What the row is labelled.

  • public abstract Type MemberType

    What it holds.

  • public abstract Type OwnerType

    What it belongs to.

  • public string? Header

    The section this member starts, or if it starts none.

  • public string? Tooltip

    What hovering the row says.

  • public InspectorRange? Range

    The bounds it is edited within, if it has any.

  • public ColorUsage? Color

    How it is edited if it is a colour.

  • public CurveUsage? Curve

    How it is edited if it is a curve.

  • public Type? AssetType

    What kind of asset it picks, if it picks one.

  • public bool AllowNull

    Whether an empty asset reference is allowed.

  • public int Lines

    How many lines a string member is edited over, or zero for one.

  • public string? Condition

    The bool member that decides whether this one is shown, if any.

  • public bool ConditionNegated

    Whether the condition is inverted — [HideIf] rather than [ShowIf].

  • public bool IsReadOnly

    Whether the inspector refuses to write it.

  • public bool CoalescesEdits

    Whether consecutive edits to it collapse into one undo step.

  • public int Order

    Where it sits among its type's members.

  • public IReadOnlyList<Type> Attributes

    The attribute types found on it, in the order they were declared.

  • public abstract bool CanWrite

    Whether it can be written at all, condition and read-only flag aside.

Methods (6)

  • public abstract object? GetBoxed(object owner)

    Reads it, boxing a value type.

  • public abstract void SetBoxed(object owner, object? value)

    Writes it, unboxing a value type.

  • public abstract IEditorCommand CreateSetCommand(IReadOnlyList<object> targets, object? value, EditorDocument? document)

    Builds the undoable command that sets this member across a selection.

  • protected InspectorMember(string name, string? displayName)

    Describes a member.

  • public override string ToString()

    Renders the member as Name : Type.

  • public static string Humanise(string name)

    Turns FoamWidth into Foam Width.

Used by (91, showing 40)

  • AssetDrawerVixen.Editor.Inspector
  • AssetFieldDropVixen.Editor.App
  • AssetPickerVixen.Editor.App
  • AssetPickerTestsVixen.Editor.App.Tests
  • BehaviorAuthoringTestsVixen.Editor.App.Tests
  • BrushInspectorMarkupTestsVixen.Editor.Terrain.Tests
  • Color3DrawerVixen.Editor.Inspector
  • ColorDrawerVixen.Editor.Inspector
  • ComponentDrawerVixen.Editor.Inspector
  • ComponentTestsVixen.Editor.App.Tests
  • ComponentsViewVixen.Editor.App
  • CompositeTestsVixen.Editor.Inspector.Tests
  • CurveDrawerVixen.Editor.Inspector
  • Describes_Vixen_Editor_App_ContentBuildSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_EditorPreferencesVixen.Editor.App
  • Describes_Vixen_Editor_App_EnvironmentSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_LightingSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_NavigationSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_PhysicsSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_ProjectAssetVixen.Editor.App
  • Describes_Vixen_Editor_App_ProjectInfoSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_SceneEntityVixen.Editor.App
  • Describes_Vixen_Editor_App_Tests_PickerFixtureVixen.Editor.App.Tests
  • Describes_Vixen_Editor_AssetEditors_Content_AddressableGroupEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Importing_AddressableEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Importing_ModelImportEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Importing_TextureImportEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_ColourParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_FlagParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_MaterialHeaderEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_ScalarParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_TextureParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_VectorParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_Inspector_Tests_AttributionVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_BoundsVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_EmitterVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_InspectedEntityVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_RecursiveVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_SparkEmitterVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_UncreatableVixen.Editor.Inspector.Tests