Vixen
02b45cc4
csharp
public sealed class EditorProperty<T>

A value the editor edits: a signal, plus the fact that writing it is undoable.

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

Remarks

The object model is signal-backed, and this is where that pays off outside the UI framework. The inspector binds to the property; a gizmo drag writes it; the inspector updates. There is no change event to raise, no listener list to unsubscribe from on tab close, and no path by which the two views of one value disagree.

The value is read-only through the signal and written through Set. That asymmetry is the point: a write goes to the owning document's command stack, so "every edit produces a command" is true by construction rather than by every drawer remembering to do it.

Fields and properties (5)

  • public string Name

    What the member is called.

  • public EditorObject Owner

    The object it belongs to.

  • public Type ValueType

    What it holds.

  • public bool CoalescesEdits

    Whether consecutive edits to this property collapse into one undo step.

  • public T Value

    The current value, recording a dependency if something is computing.

Methods (2)

  • public T Peek()

    The current value without recording a dependency.

  • public void Set(T value)

    Changes the value, undoably.

Used by (7)

  • CommandStackPropertyTestsVixen.Editor.Core.Tests
  • CommandStackTestsVixen.Editor.Core.Tests
  • EditorDocumentTestsVixen.Editor.Core.Tests
  • EditorObjectVixen.Editor.Core
  • KnobVixen.Editor.Core.Tests
  • RunVixen.Editor.Core.Tests
  • SetPropertyCommandVixen.Editor.Core