Vixen
02b45cc4
csharp
public interface IEditMember

One editable thing on an object, reached without knowing what type either of them is.

Read the guide page for this →

Remarks

The narrowest contract an EditProperty needs, and deliberately narrower than any of the descriptors that implement it. The inspector's InspectorMember carries headings, ranges, conditions, asset pickers and curve bounds; a graph node's port carries none of those and a settings row carries different ones again. What all three have in common is a name, a type, a read, a write and the command that makes the write undoable — so that is what the pipeline asks for.

⚠ CreateSetCommand is on the member and not on the pipeline, because the member is the only thing that knows both the owner's type and the value's. A pipeline that built the command itself would have to reach for MakeGenericType, which is the one thing the whole descriptor layer exists to avoid — see SetValuesCommand for the boxed fallback an implementation without typed accessors can use instead.

Fields and properties (5)

  • string Name

    What the member is called in source, which is what a path names it by.

  • string DisplayName

    What a row is labelled.

  • Type ValueType

    What it holds.

  • bool CanWrite

    Whether it can be written at all.

  • bool CoalescesEdits

    Whether consecutive writes collapse into one undo step.

Methods (3)

  • object? Read(object owner)

    Reads it, boxing a value type.

  • void Write(object owner, object? value)

    Writes it, unboxing a value type.

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

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

Used by (12)

  • EditPipelineTestsVixen.Editor.Core.Tests
  • EditPropertyVixen.Editor.Core
  • EditTargetVixen.Editor.Core
  • EmptyEditProviderVixen.Editor.Core
  • IEditProviderVixen.Editor.Core
  • InspectorEditProviderVixen.Editor.Inspector
  • InspectorMemberVixen.Editor.Inspector
  • InspectorTargetVixen.Editor.Inspector
  • MarkupBindingVixen.Editor.Inspector
  • SetValuesCommandVixen.Editor.Core
  • TestMemberVixen.Editor.Core.Tests
  • TestProviderVixen.Editor.Core.Tests